Unbuntu14.04lts LNMP环境安装

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
  1. 安装apache2
sudo apt-get install nginx
  1. 安装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
  1. 安装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

你可能感兴趣的:(Unbuntu14.04lts LNMP环境安装)