ubuntu下编译安装nginx最新版本笔记记录
in 学习lnmpubuntu阿里云其他 with 0 comment

ubuntu下编译安装nginx最新版本笔记记录

in 学习lnmpubuntu阿里云其他 with 0 comment

OS:ubuntu 14.04 server+desktop
nginx官网下载http://nginx.org/en/download.html,解压后./configure报错:
1、提示缺少pcre然后官网下载回来后./configure --prefix=/usr/local/pcre然后make -j4&& make install安装到默认的/usr/local/;
2、提示缺少zlib同样官网下载回来后./configure --prefix=/usr/local/zlib然后make -j4&& make install安装到默认的/usr/local/;
3、提示缺少openssl同样官网下载回来后./config --prefix=/usr/local/openssl然后make -j16&& make install安装到默认的/usr/local/;

4、用sudo su进入root超级管理员权限后:

a)

  ./configure --with-pcre=/usr/local/pcre --with-zlib=/usr/local/zlib --with-openssl=/usr/local/openssl

b)

  make -j4&& make install

安装成功提示:

  Configuration summary
    + using PCRE library: /usr/local/
    + using OpenSSL library: /usr/local/
    + using zlib library: /usr/local/

    nginx path prefix: "/usr/local/nginx"
    nginx binary file: "/usr/local/nginx/sbin/nginx"
    nginx modules path: "/usr/local/nginx/modules"
    nginx configuration prefix: "/usr/local/nginx/conf"
    nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
    nginx pid file: "/usr/local/nginx/logs/nginx.pid"
    nginx error log file: "/usr/local/nginx/logs/error.log"
    nginx http access log file: "/usr/local/nginx/logs/access.log"
    nginx http client request body temporary files: "client_body_temp"
    nginx http proxy temporary files: "proxy_temp"
    nginx http fastcgi temporary files: "fastcgi_temp"
    nginx http uwsgi temporary files: "uwsgi_temp"
    nginx http scgi temporary files: "scgi_temp"

最后,使用pgrep检验是否成功:pgrep nginx返回行号进程ID即可。
完毕!

Responses