安装nginx
下载对应当前系统版本的nginx包(package)
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
systemctl start nginx
关闭selinux
setenforce 0 (临时)
永久
vim /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
如果访问不了则关闭防火墙(centos7关闭方法如下)
systemctl start firewalld.service#启动firewall
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall开机启动
安装php
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php72w
yum install php72w-cli
安装PHP-FPM
yum install php72w-fpm
重启
systemctl restart php-fpm
安装mysql扩展(通过phpinfo之后的extension_dir可以查看扩展安装路径)
yum install php72w-mysql(废弃)
yum install php72w-mysqlnd
启动php72w-fpm
whereis php-fpm
/usr/sbin/php-fpm
yum install net-tools(安装netstat)
netstat -npa | grep 9000
mysql安装
https://www.jianshu.com/p/5ae3abe673cc