• 【CentOs/Nginx】把Nginx1.20.2在linux上run起来(详版)


    【版本】

    系统:CentOS Linux release 7.9.2009 (Core)

    Nginx:1.20.2 (此为截至2022年3月4日的最新版)

    【硬件】

    T440p

    下面是安装步骤

    【安装必要组件】

    #yum -y install pcre-devel openssl-devel

    【安装gcc】

    #yum install -y gcc g++ gcc-c++ make

    如果没安装gcc会出现如下错误:

    [root@localhost nginx-1.20.2]# ./configure
    checking for OS
     + Linux 3.10.0-1160.el7.x86_64 x86_64
    checking for C compiler ... not found
    
    ./configure: error: C compiler cc is not found

    导致./configure不能运行。

    出现也不必担心,按提示装上gcc即可。

    【下载解压进目录】

    #wget http://nginx.org/download/nginx-1.20.2.tar.gz
    #tar -xvzf nginx-1.20.2.tar.gz
    #cd nginx-1.20.2

    【编译安装】

    #./configure
    #make && make install

    【启动】

    先看看nginx被安到哪里去了

    [root@localhost nginx-1.20.2]# whereis nginx
    nginx: /usr/local/nginx

    然后进目录启动:

    #cd /usr/local/nginx
    #cd sbin
    #./nginx

    【验证】

    打开浏览器,输入ip地址,就能看到nginx的欢迎画面了:

    END

  • 相关阅读:
    MSAA, UIA brief explanation
    《微软的软件测试之道》读书笔记 之 非功能测试
    《微软的软件测试之道》读书笔记 之 结构测试技术
    《软件测试方法和技术》 读书笔记
    Gumshoe
    ng-template
    script跨域之360搜索
    src与href的异同
    跨域
    js引入script
  • 原文地址:https://www.cnblogs.com/heyang78/p/15965743.html
Copyright © 2020-2023  润新知