Centos 7.3 LNMP部署

2020-09-02 104

# 安装nginx [root@zhouxiang ~]# yum install nginx -y # 查看版本信息 [root@zhouxiang ~]# nginx -v nginx version: nginx/1.16.1# 安装mysql # 更新mysql的repo源 [root@zhouxiang ~]# rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm # 更新缓存 [root@zhouxiang ~]# yum makecache # 安装mysql [root@zhouxiang ~]# 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@zhouxiang ~]# yum install \ > https://repo.ius.io/ius-release-el7.rpm \ > https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm [root@zhouxiang ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm # 安装PHP和模块 [root@zhouxiang ~]# 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