当前位置:Gxlcms > PHP教程 > ubuntu9.04php配置

ubuntu9.04php配置

时间:2021-07-01 10:21:17 帮助过:3人阅读

转自http://www.diybl.com/course/4_webprogram/php/phpxl/20090820/169062.html

安装 Apache2:
sudo apt-get install apache2
安装PHP模块:
sudo apt-get install php5
测试:http://localhost

安装Mysql
sudo apt-get install mysql-server
mysqladmin -u root password db_user_password
#db_user_password替换为密码

安装Mysql模块
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install php5-gd
sudo /etc/init.d/apache2 restart

安装phpmyadmin
sudo apt-get install phpmyadmin
cd /var/www
sudo ln -s /usr/share/phpmyadmin phpmyadmin
测试:http://localhost/phpmyadmin/

将URL映射到其他目录

sudo gedit /etc/apache2/conf.d/alias

* 在新增的文件内加入下面这几行

Alias /phymyadmin/ "/var/www/phymyadmin/"


Options Indexes FollowSymLinks
AllowOverride All
order allow,deny
Allow from all


重起apache
sudo /etc/init.d/apache2 restart
文章出处:DIY部落(http://www.diybl.com/course/4_webprogram/php/phpxl/20090820/169062.html)

人气教程排行