nginx安装

1:安装

  1.1  openssl  、zlib  、 gcc 安装

    yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

    解压包安装在/opt/nginx、 目录下,

  1.2 pcre安装

    1.1.1 将tar包传到linux

    1.1.2 解压 tar -xvf tar包

    1.1.3 进入到pcre目录,执行  ./configure

    1.1.4 安装:在pcre目录执行  make && make install

链接:https://pan.baidu.com/s/1yVR3suqAlvprZkL0gxK87Q 
提取码:olra

  

  1.3 nginx安装

    1.3.1 tar包上传

    1.3.2 tar -xvf tar包

    1.3.3  进入到nginx目录,执行 ./configure

    1.3.4 make &&make install

链接:https://pan.baidu.com/s/1_IGl_9Jg1Iu7zhySuMlELw 
提取码:ljwm

2:启动nignx

  2.1 进入目录 /usr/local/nginx/sbin  端口配置在conf下

   2.2 ./nginx 启动 (默认端口:80)

3:添加防火墙开放端口

  firewall-cmd --add-service=http –permanent

       firewall-cmd --add-port=80/tcp --permanent

4:校验

  192.168.*.**:80 ip+端口访问

nginx常用命令与配置    https://www.cnblogs.com/draymond/p/11826392.html

nginx反向代理    https://www.cnblogs.com/draymond/p/11826808.html

  

    

原文地址:https://www.cnblogs.com/draymond/p/11826331.html