大数据之软件安装(二)-Nginx

1.解压nginx-1.13.6.tar.gz

    tar -zxvf nginx-1.13.6.tar.gz

2.安装编译环境

    #gcc
    yum install gcc-c++
    
    #pcre
    yum install -y pcre pcre-devel
    
    #zlib
    yum install -y zlib zlib-devel
    
    #openssl
    yum install -y openssl openssl-devel

3.编译&安装

    cd nginx-1.13.6
    ./configure --prefix=/root/soft/nginx-bin
    make
    make install

4.启动

    cd nginx-bin
    sbin/nginx   #启动,如果出现403将  conf/nginx.conf  头部添加user  root;
    
    sbin/nginx -s stop  #停止
    
    sbin/nginx -s reload  #重新加载配置文件
原文地址:https://www.cnblogs.com/wuqinghua-blog/p/10501627.html