onlyfu's Blog

Ubuntu下安装Apache+Mysql+php

1、安装Apache服务
sudo apt-get install apache2


2、安装php5
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart


3、安装mysql
sudo apt-get install mysql-server
安装完成按提示设置root密


4、让apache、php支持mysql
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart