首页 > 其他 > 详细

安装配置nginx

时间:2016-04-26 22:17:59      阅读:346      评论:0      收藏:0      [点我收藏+]

yum -y install gcc automake autoconf libtool make

yum -y install gcc gcc-c++


先安装pcre, zlib,前者为了重写rewrite,后者为了gzip压缩。

1.选定源码目录
可以是任何目录,这里选定的是/usr/local/src

cd  /usr/local/src


2.安装PCRE库
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 下载最新的 PCRE 源码包

tar -zxvf pcre-8.38.tar.gz

cd pcre-8.38

./configure

make
make install


3.安装zlib库

wget http://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make
make install

4.安装ssl(如果默认没装ssl)  
cd /usr/local/src
wget http://www.openssl.org/source/openssl-1.0.2g.tar.gz

cd openssl-1.0.2g

./config
make
make install


5.安装nginx1.8.1


groupadd nginx

useradd -g nginx -s /sbin/nologin nginx


tar zxvf nginx-1.8.1.tar.gz
cd nginx-1.8.1


./configure --user=nginx --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-pcre=/usr/local/src/pcre-8.38 --with-zlib=/usr/local/src/zlib-1.2.8 --with-openssl=/usr/local/src/openssl-1.0.2g

make

make install

























































本文出自 “jiazheming” 博客,请务必保留此出处http://8888866666.blog.51cto.com/6988153/1767985

安装配置nginx

原文:http://8888866666.blog.51cto.com/6988153/1767985

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!