zoukankan      html  css  js  c++  java
  • linux nginx安装(转载)

    1.linux 下面安装

      1.下载 pcre-8.10.tar.gz  nginx-1.1.1.tar.gz

       2.安装 pcre 让nginx支持rewrite

         pcre-8.10.tar.gz  上传到/home 目录下面

        1) 解压 pcre

         tar zxvf   pcre-8.10.tar.gz 解压 pcre 后 /home 下面会有 pcre-8.10 文件夹

         2)配置pcre

         cd /home/ pcre-8.10

         ./configure   输入该命令后屏幕会生成一堆文件,不用去管它

         3)make

         在linux 中输入 make 命令后屏幕会生成一堆文件,不用去管它

         4)安装

          在linux 中输入 make install

       3.安装 nginx

         nginx-1.1.1.tar.gz  上传到/home 目录下面

         1) 解压 nginx

           tar zxvf    nginx-1.1.1.tar.gz  解压 nginx 后 /home 下面会有nginx-1.1.1 文件夹

          2 配置nginx

           cd   nginx-1.1.1

           ./configure --prefix=/usr/local/nginx --with-http_stub_status_module

           3)make

           在linux 中输入 make 命令后屏幕会生成一堆文件,不用去管它

         4)安装

           在linux 中输入 make install

          5) 检查是否安装成功

             cd  /usr/local/nginx/sbin

             ./nginx -t 

             结果显示:

            nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

            nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

           6)启动nginx 

              cd  /usr/local/nginx/sbin 目录下面 输入 ./nginx 启动 nginx

           7 )检查是否启动成功

              ie 浏览器中输入 http://192.168.15.132

  • 相关阅读:
    什么是浮动IP
    How can I detect multiple logins into a Django web application from different locations?
    git add -A使用说明
    理解水平扩展和垂直扩展
    php != 和 !== 的区别
    wireshark:Couldn't run /usr/bin/dumpcap in child process: Permission denied
    Unable to VNC onto Centos server remotely
    systemctl使用说明
    KiB、MiB与KB、MB的区别
    python带setup.py的包的安装
  • 原文地址:https://www.cnblogs.com/yongssu/p/4375869.html
Copyright © 2011-2022 走看看