• 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
    
  • 相关阅读:
    httpd添加新模块
    编译httpd细节
    apache配置文件说明及一些指令
    xen原理
    EXSI的使用
    VMWare ESX server安装
    虚拟化技术
    Kvm命令集管理虚拟机
    RAID几种方式
    BZOJ1011 [HNOI2008]遥远的行星 【奇技淫巧】
  • 原文地址:https://www.cnblogs.com/liangjingfu/p/10675532.html
Copyright © 2020-2023  润新知