zoukankan      html  css  js  c++  java
  • nginx 02-Nginx编译安装

    1、安装Nginx所需的pcre库,perl兼容正则表达式

    [root@nginx ~]# yum install pcre pcre-devel -y
    

    2、安装Nginx相关依赖包

    [root@nginx ~]# yum install openssl openssl-devel -y
    

    3、下载nginx-1.13.10.tar.gz

    [root@nginx ~]# wget -q http://nginx.org/download/nginx-1.13.10.tar.gz
    

    4、添加nginx用户,不可登录

    [root@nginx ~]# useradd nginx -s /sbin/nologin -M
    

    5、解压安装

    [root@nginx ~]# tar -zvxf nginx-1.13.10.tar.gz 
    

    6、编译安装

    [root@nginx ~]# cd nginx-1.13.10
    [root@nginx ~]# ./configure --user=nginx --group=nginx --prefix=/application/nginx-1.13.10/ --with-http_stub_status_module --with-http_ssl_module --with-ipv6
    [root@nginx ~]# make && make install
    

    7、设置软链接

    [root@nginx ~]# ln -s /application/nginx-1.13.10/ /application/nginx
    

    8、启动前检查配置文件语法

    [root@nginx ~]# /application/nginx/sbin/nginx -t
    

    9、启动Nginx服务

    [root@nginx ~]# /application/nginx/sbin/nginx
    [root@nginx ~]# lsof -i :80
    [root@nginx ~]# netstat -lnt | grep 80
    

    10、安装Nginx成功页面

    [root@nginx ~]# curl 127.0.0.1
    
  • 相关阅读:
    BZOJ 4010: [HNOI2015]菜肴制作( 贪心 )
    bzoj 1084
    bzoj 2763
    bzoj 1003
    bzoj 1858
    codevs 1296
    cf 438D
    vijos 1083
    codevs 3303
    bzoj 1296
  • 原文地址:https://www.cnblogs.com/liangjingfu/p/10675532.html
Copyright © 2011-2022 走看看