A-A+

centos nginx源码安装

2016年06月29日 Linux运维 暂无评论 阅读 654 次

inewup-nginx

环境准备

yum install -y gcc gcc-c++ perl wget

nginx源码下载

Stable version nginx-1.10.1

[root@node1 /]# cd nginx

下载nginx

[root@node1 nginx]# wget http://nginx.org/download/nginx-1.10.1.tar.gz

[root@node1 nginx]# tar zxvf nginx-1.10.1.tar.gz

下载pcre库

[root@node1 nginx]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz

[root@node1 nginx]# tar zxvf pcre-8.39.tar.gz

下载zlib

[root@node1 nginx]# wget http://zlib.net/zlib-1.2.8.tar.gz

[root@node1 nginx]# tar zxvf zlib-1.2.8.tar.gz

下载openssl

[root@node1 nginx]# wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz

[root@node1 nginx]# tar zxvf openssl-1.0.2h.tar.gz

编译

[root@node1 nginx-1.10.1]# ./configure  --prefix=/nginx  --with-pcre=/nginx/pcre-8.39  --with-zlib=/nginx/zlib-1.2.8  --with-openssl=/nginx/openssl-1.0.2h --with-http_ssl_module

Configuration summary
+ using PCRE library: /nginx/pcre-8.39
+ using OpenSSL library: /nginx/openssl-1.0.2h
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using zlib library: /nginx/zlib-1.2.8

nginx path prefix: "/nginx"
nginx binary file: "/nginx/sbin/nginx"
nginx modules path: "/nginx/modules"
nginx configuration prefix: "/nginx/conf"
nginx configuration file: "/nginx/conf/nginx.conf"
nginx pid file: "/nginx/logs/nginx.pid"
nginx error log file: "/nginx/logs/error.log"
nginx http access log file: "/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"

[root@node1 nginx-1.10.1]# make

[root@node1 nginx-1.10.1]# make install

加入到path中 ln -s /nginx/sbin/nginx /bin/nginx

 

标签:

给我留言

Copyright © 2011-2016 零下二十四度Theme By  Ality  京ICP备16007547号   关于本站

用户登录