1.首先先更新(确保接下来的安装不会出错)
sudo apt-get update
2.安装php
sudo apt-get install php5
3.安装apache
sudo apt-get install apache2
4.安装Mysql
sudo apt-get install mysql-server
5.安装php扩展模块
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
6.重启apache
sudo /etc/init.d/apache2 restart
7.安装phpmyadmin
sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin/ /var/www/html
8.安装redis
sudo apt-get install redis-server
sudo apt-get install php5-redis
9.查看运行状态
ps -aux|grep redis
ps -aux|grep apache