标签:local
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
标签:local
原文地址:http://8888866666.blog.51cto.com/6988153/1767985