- 安裝m4
tar –zxvf m4-1.4.18.tar.gz
cd m4-1.4.18
./configure
make && make install - 安裝gmp
tar –jxvf gmp-6.1.0.tar.bz2
cd gmp-6.1.0
./configure
make && make install - 安裝mpfr
tar –jxvf mpfr-3.1.4.tar.bz2
cd mpfr-3.1.4
./configure
make && make install - 安裝 mpc
tar –cxvf mpc-1.0.3.tar.gz
cd mpc-1.0.3
./configure
make && make install - 安裝gcc
cd gcc
rpm –ivh *rpm --nodeps –force - 安裝g++
cd g++
rpm –ivh *rpm --nodeps –force - 安裝perl
tar –zxcf perl-5.30.1.tar.gz
cd perl-5.30.1
./Configure -des -Dprefix=/opt/perl
make && make test
make install - 安裝openssl
tar –zxvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./configure
make && make install - 安裝 pcre
tar –zxvf pcre-8.44.tar.gz
cd pcre-8.44
./configure
make && make install - 安裝 zlib
tar –zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make && make install - 安裝 nginx
tar –zxvf nginx-1.18.0.tar.gz
cd nginx-1.18.0
./configure --prefix=/usr/local/nginx
make && make install
檢驗成功
cd /usr/local/nginx/sbin
./nginx –t
- 開啟nginx
cd usr/local/nginx/sbin
開啟
nohup ./nginx &
重啟
Nohup ./nginx -s reload &
關(guān)閉
./nginx -s stop - 開啟端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd –reload
查看端口是都開放 firewall-cmd --zone= public --query-port=80/tcp
鏈接:https://pan.baidu.com/s/1cV32m4_O1RmNHyjNZq0mHA
提取碼:abcd