1. 修改apt源(Ubuntu 14.04)添加AliYun 源
vim /etc/apt/sources.list
AliYun 源
# AliYun
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
更新
sudo apt update
sudo apt upgrade
- 安裝apache2
sudo apt-get install nginx
- 安裝mysql5.6
sudo apt-get install mysql-client-core-5.6 mysql-client-5.6 mysql-server-core-5.6 mysql-server-5.6
sudo service mysql start
- 安裝php5.6
sudo add-apt-repository ppa:ondrej/php
sudo apt updatesudo apt grade
sudo apt-get install php5.6 php5.6-mysql php-gettext php5.6-mbstring libapache2-mod-php5.6 php5.6-fpm//將5.6的地方改為7.0就可以安裝php7.0
sudo service php5.6-fpm restart