越简单越好!

ubuntu 下安装 apache php mysql

发表于 2010-07-10 15:58 | 1557次阅读 0次点赞   Ubuntu

1. 安装apache php5
apt-get install php5

vi /etc/apache2/mods-available/mime.conf

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
</IfModule>

vi /etc/apache2/sites-available/default
设置webroot

/etc/init.d/apache2 restart

2. 安装mysql5
apt-get install mysql-server
mysql -uroot -p
GRANT ALL PRIVILEGES ON *.* TO " IDENTIFIED BY 'password' WITH GRANT OPTION;

vi /etc/mysql/my.cnf
#bind-address           = 127.0.0.1
/etc/init.d/mysql restart


返回顶部 ^