Loading....

一、安装apache2+php5+mysql

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

二、设置mysql密码
mysqladmin -u root password 新密码


三、安装phpmyadmin
sudo apt-get install phpmyadmin
测试:http://localhost/phpmyadmin/


四、其它操作:
编辑测试页:()
sudo gedit /var/www/testphp.php


启动Apache
$ sudo /usr/sbin/apache2ctl start

停止Apache
$ sudo /usr/sbin/apache2ctl stop

重启Apache
$ sudo /etc/init.d/apache2 restart


如果只是用于本地开发,加强安全性,设置如下:
$ gksudo "gedit /etc/apache2/ports.conf"
$ password:
更改ports.conf
Listen 127.0.0.1:80
保存文件之后,并重启apache。这时,只有通过127.0.0.1才能访问Apache。............

Reference URI:https://ubuntu-sky.blogspot.com/2008/11/ubuntu-php.html

Have not found what you want?? Try to search by Google

Quote URI


Share/Save/Bookmark

Related Articles

Comments: 0 comments

Post a Comment

Archives

Recent Entries

Recent Comment

Powered By Blogger