zoukankan      html  css  js  c++  java
  • Win10 Ubuntu18.04 编译安装 nignx

    nginx 下载页

    http://nginx.org/en/download.html

    wget http://nginx.org/download/nginx-1.14.0.tar.gz

    //安装依赖

    sudo apt install build-essential libtool libpcre3 libpcre3-dev zlib1g-dev openssl libssl-dev  -y

    //配置

    ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-file-aio --with-http_realip_module

    //sudo make

    //错误

    gp@gp-virtual-machine:~/Downloads/nginx-1.14.2$ sudo make
    make -f objs/Makefile
    make[1]: Entering directory '/home/gp/Downloads/nginx-1.14.2'
    cd /usr/local/src/pcre-8.40 
    && if [ -f Makefile ]; then make distclean; fi 
    && CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " 
    ./configure --disable-shared
    /bin/sh: 1: cd: can't cd to /usr/local/src/pcre-8.40
    objs/Makefile:1220: recipe for target '/usr/local/src/pcre-8.40/Makefile' failed
    make[1]: *** [/usr/local/src/pcre-8.40/Makefile] Error 2
    make[1]: Leaving directory '/home/gp/Downloads/nginx-1.14.2'
    Makefile:8: recipe for target 'build' failed
    make: *** [build] Error 2
    gp@gp-virtual-machine:~/Downloads/nginx-1.14.2$ ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.40 --with-zlib=/usr/local/src/zlib-1.2.11 --with-openssl=/usr/local/src/openssl-1.0.2o^C

    nginx在下载pcre源码安装,在 usr/local/src/pcre-8.40/找不到

    https://ftp.pcre.org/pub/pcre/ 下载pcre-8.42版本

    ./configure --sbin-path=/usr/local/nginx/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/src/pcre-8.40 --with-zlib=/usr/local/src/zlib-1.2.11 --with-openssl=/ --with-pcre=/home/gp/Downloads/pcre-8.42s

    sudo make

    sudo make install

    groupadd www    

    useradd www -g www  

    chown -R www:www /usr/local/nginx 

    启动

    sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

  • 相关阅读:
    被放弃的概率权,机器下围棋不理会沉没成本
    百位性感女明星三围大曝光,体型测试设计
    斯坦福大学机器学习,EM算法求解高斯混合模型
    Javascript图片预加载详解
    使用马尔可夫模型自动生成文章
    18种女粉引流方法、效果、评估
    既然认准了这条路,就不必打听要走多久!
    新媒体运营10个大坑,思维导图版
    谷歌发布"自动机器学习"技术 AI可自我创造
    Centos7下PHP的卸载与安装nginx
  • 原文地址:https://www.cnblogs.com/8000cabbage/p/9501519.html
Copyright © 2011-2022 走看看