菜鸟记录 centos7离线安装nginx

2020-09-02  本文已影响0人  早起早起早起up
  1. 安装m4
    tar –zxvf m4-1.4.18.tar.gz
    cd m4-1.4.18
    ./configure
    make && make install
  2. 安装gmp
    tar –jxvf gmp-6.1.0.tar.bz2
    cd gmp-6.1.0
    ./configure
    make && make install
  3. 安装mpfr
    tar –jxvf mpfr-3.1.4.tar.bz2
    cd mpfr-3.1.4
    ./configure
    make && make install
  4. 安装 mpc
    tar –cxvf mpc-1.0.3.tar.gz
    cd mpc-1.0.3
    ./configure
    make && make install
  5. 安装gcc
    cd gcc
    rpm –ivh *rpm --nodeps –force
  6. 安装g++
    cd g++
    rpm –ivh *rpm --nodeps –force
  7. 安装perl
    tar –zxcf perl-5.30.1.tar.gz
    cd perl-5.30.1
    ./Configure -des -Dprefix=/opt/perl
    make && make test
    make install
  8. 安装openssl
    tar –zxvf openssl-1.0.2h.tar.gz
    cd openssl-1.0.2h
    ./configure
    make && make install
  9. 安装 pcre
    tar –zxvf pcre-8.44.tar.gz
    cd pcre-8.44
    ./configure
    make && make install
  10. 安装 zlib
    tar –zxvf zlib-1.2.11.tar.gz
    cd zlib-1.2.11
    ./configure
    make && make install
  11. 安装 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

  1. 开启nginx
    cd usr/local/nginx/sbin
    开启
    nohup ./nginx &
    重启
    Nohup ./nginx -s reload &
    关闭
    ./nginx -s stop
  2. 开启端口
    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
上一篇下一篇

猜你喜欢

热点阅读