# 安装nginx
[root@zx ~]# yum install nginx -y
# 查看版本信息
[root@zx ~]# nginx -v
nginx version: nginx/1.16.1
# 安装mysql
# 更新mysql的repo源
[root@zx ~]# rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
# 更新缓存
[root@zx ~]# yum makecache
# 安装mysql
[root@zx ~]# yum install mysql-community-server.x86_64 -y
[root@zhouxiang ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using EditLine wrapper
# 安装PHP
# 更新php repo源
[root@zx ~]# yum install \
> https://repo.ius.io/ius-release-el7.rpm \
> https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root@zx ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# 安装PHP和模块
[root@zx ~]# yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodb