• linux下安装Nginx


    在linux下安装nginx:

    1.首先需要下载pcre-8.33.tar.gz,ftp地址是:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

    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 )检查是否启动成功
    因为nginx默认端口是80,所以在浏览器中输入 http://192.168.1.123(虚拟机的ip地址)出现 Welcome to nginx!

  • 相关阅读:
    P1017 进制转换
    P1100 高低位交换
    P1469 找筷子
    P1866 编号
    SQL常用语句(T-SQL、PL/SQL)
    Proxyer内网穿透配置教程
    使用JS检测自定义协议是否存在
    C# 代码启动ClickOnce应用
    SQL Server 异地备份到远程共享文件夹异常处理
    发布ClickOnce应用程序步骤与URL传参应用
  • 原文地址:https://www.cnblogs.com/gaoxiang116/p/3338882.html
Copyright © 2020-2023  润新知