安装nginx
yum install nginx
设置nginx自启动
systemctl enable nginx.service
更新yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装php以及扩展
yum install php72w php72w-fpm php72w-opcache php72w-devel php72w-common php72w-cli php72w-gd php72w-mbstring php72w-mysqlnd php72w-pecl-redis php72w-bcmath
修改php-fpm配置文件
vim /etc/php-fpm.d/www.conf
user和group修改为www
设置自启动
systemctl enable php-fpm.service
添加www用户和组
groupadd www
useradd -g www -s /sbin/nologin www
id www
安装git
yum install git
ps -ef | grep 'php server '|grep -v 'grep'|awk '{print $2}'|xargs kill -9