nginx
通過yum安裝以下依賴:
yum install gcc-c++
yum install openssl*
yum install pcre*
yum install zlib
yum install zlib-devel
yum install wget
# 我選擇了一個相對較新的版本,下載到當前目錄
wget http://nginx.org/download/nginx-1.13.9.tar.gz
# 解壓
tar -xvf nginx-1.13.9.tar.gz
./configure --prefix=安裝目錄
make && make install
# 找到nginx.conf, sbin 啟動, -s reload
find / -name '*nginx*
find / -name '*sbin*'
關閉CentOS7默認防火牆
// 啟動firewall
systemctl start firewalld.service
// 停止firewall
systemctl stop firewalld.service
// 禁止firewall開機啟動
systemctl disable firewalld.service
-------------------------
-------------------------
-------------------------
php
yum install php php-fpm
啟動php-fpm
systemctl start php-fpm
service php-fpm restart
nginx.conf 文件
開放php,
修改
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
}
https://qq52o.me/2482.html#comments