PHP源

$ sudo add-apt-repository ppa:ondrej/php-7.0

MariaDB源

$ sudo apt-get install software-properties-common
$ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
$ sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.1/ubuntu wily main'

Nginx源

$ wget http://nginx.org/keys/nginx_signing.key
$ sudo apt-key add nginx_signing.key

# 在 sources.list 文件尾部追加新内容
$ vim /etc/apt/sources.list
$ deb http://nginx.org/packages/mainline/ubuntu/ codename nginx
$ deb-src http://nginx.org/packages/mainline/ubuntu/ codename nginx

Ubuntu codename

这里是对应的系统版本名称 将上文中 codename 替换为下方相对应内容

Version	Codename	Supported Platforms
12.04	precise	x86_64, i386
14.04	trusty	x86_64, i386, aarch64/arm64
15.04	vivid	x86_64, i386
15.10	wily	x86_64, i386

最后执行安装命令

$ sudo apt-get update
$ sudo apt-get install php7.0-fpm php7.0-cli mariadb-server nginx