编译安装Nginx

来源:互联网 发布:gta5美女捏脸数据最新 编辑:程序博客网 时间:2024/05/16 09:29
安装C/C++编译器及make工具
yum install gcc gcc-c++ make

[pcre]
编译安装pcre:
1. 解压 pcre-8.33.tar.gz
tar -zxvf  pcre-8.33.tar.gz
2. 配置pcre
进入pcre-8.33目录,执行./configure
3. 编译及安装pcre
make && make install

[zlib]
编译安装zlib:
1. 解压 zlib-1.2.8.tar.gz
tar -zxvf  zlib-1.2.8.tar.gz
2. 配置zlib
进入 zlib-1.2.8目录,执行./configure
3. 编译及安装zlib
make && make install

[libxml2]
编译安装libxml2:
1. 解压  libxml2-2.9.0.tar.gz
tar -zxvf   libxml2-2.9.0.tar.gz
2. 配置libxml2
进入  libxml2-2.9.0目录,执行./configure
3. 编译及安装libxml2
make && make install


[libmcrypt]
编译安装libmcrypt:
1. 解压  libmcrypt-2.5.8.tar.gz
tar -zxvf   libmcrypt-2.5.8.tar.gz
2. 配置libmcrypt
进入  libmcrypt-2.5.8目录,执行./configure
3. 编译及安装libmcrypt
make && make install


[openssl]
编译安装openssl:
1. 解压  libmcrypt-2.5.8.tar.gz
tar -zxvf   libmcrypt-2.5.8.tar.gz
2. 配置openssl
进入  libmcrypt-2.5.8目录,执行./config
3. 编译及安装openssl
make && make install

[nginx]
./configure \
--prefix=/usr/ \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--user=www
--group=www
--with-http_ssl_module
--with-pcre
--with-http_sub_module
--with-http_dav_module
--with-http_flv_module
--with-http_mp4_module
--with-http_gzip_static_module
--with-http_secure_link_module
--with-http_stub_status_module
--http-client-body-temp-path=/tmp/nginx/client
--http-proxy-temp-path=/tmp/nginx/proxy
--http-fastcgi-temp-path=/tmp/nginx/fastcgi
--http-uwsgi-temp-path=/tmp/nginx/uwsgi
--http-scgi-temp-path=/tmp/nginx/scgi
--with-mail
--with-mail_ssl_module
--with-google_perftools_module
--with-md5
--with-openssl
--with-zlib
原创粉丝点击