zoukankan      html  css  js  c++  java
  • nginx安装

    CentOS6.5下安装Nginx

    一、必要软件准备

           1、安装pcre-----------支持rewrite功能

                 yum -y install pcre*

           2、若需要支持ssl功能

                 yum install openssl*

    二、3、添加 nginx 用户           useradd nginx -s /sbin/nologin -M  #不让用户通过shell登陆系统

           4、下载  nginx-1.10.3.tar.gz  包

           5、tar -xzvf nginx-1.10.3.tar.gz -C /usr/local  解压到/usr/local目录下

           6、./configure

                 --prefix=/usr/local/nginx 

                 --user=nginx

                 --with-http_ssl_module

                 --with-http_stub_status_module

                 --with-pcre

                 ###################################################

                --with-pcre:为了支持rewrite重写功能,必须制定pcre

                --with-http_stub_status_module:支持nginx状态查询
                --with-http_ssl_module:支持https

                ####################################################

                 出现如下内容标识configure正常

               

         7、确定服务器有没有安装make,如果没有  yum -y install make* 和 gcc*

         8、make  &&  make install  

         9、#使用/sbin/nginx -V 可查看编译的参数

         10、# 检查配置文件语法,可以防止因配置错误导致网站重启或重新加载配置等对用户的影响

                ./sbin/nginx -t

          11、查看是否启动成功
                 netstat  -anptul  |  grep  nginx

                

     

     

     

  • 相关阅读:
    count-and-say
    jump-game
    trapping-rain-water
    Java QueueDemo
    Java StackDemo
    swap-nodes-in-pairs
    php多维数组变成一维数组
    php获取客户端IP地址
    php根据随机数生成6位密钥
    Laravel ,YII,thinkphp 框架的区别
  • 原文地址:https://www.cnblogs.com/renjidong/p/7081140.html
Copyright © 2011-2022 走看看