1、 PCRE库的安装:
选择最新版本下载:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
解压:
tar –zxvf pcre-8.10.tar.gz,解压目录为:pcre-8.10
然后进入到 cd pcre-8.10,进行配置、编译、安装
./configure && make && make install
2、 OpenSSL库的安装
下载页面:http://www.openssl.org/source/
选择最新版本下载
http://www.openssl.org/source/openssl-1.0.0a.tar.gz
tar –zxvf openssl-1.0.0.tar.gz,解压目录为:openssl-1.0.0
然后进入到 cd openssl-1.0.0,进行配置、编译、安装
./configure && make && make install
3、 nginx安装
下载页面:http://nginx.org/en/download.html
选择最新版本下载:
http://nginx.org/download/nginx-0.8.53.tar.gz
解压:
tar –zxvf nginx-0.8.53.tar.gz,解压目录为:nginx-0.8.53
然后进入到 cd nginx-0.8.53,进行配置、编译、安装
按照一般的说明,也就是通过./config或./configure直接进行配置了,但配置后,在编译make的时候很可能会报:
*** No rule to make target `clean’. Stop.
等这样的错误,所以仅仅通过./configure来进行配置是不够的,至少在配置的时候需要指定openssl的安装目录,比如我的openssl安装目录是:openssl-1.0.0,则在配置的时候应该为:
./configure –with-http_stub_status_module –with-http_ssl_module
–with-openssl=/usr/local/openssl-1.0.0 –with-http_gzip_static_module
这样在编译的时候才会成功,接下来就是安装:make install
安装成功后,会生成一个nginx的目录。
最后附完整安装例子语句:
./configure –with-http_stub_status_module –with-http_ssl_module –with-openssl=/usr/local/openssl-1.0.0e –with-pcre=/usr/local/pcre-8.13 –with-http_gzip_static_module
如果用yum 安装就这样
yum -y install pcre-devel
yum -y install openssl-devel
./configure --user=refresh --group=refresh --with-http_stub_status_module --with-http_ssl_module
make && make install
用yum安装库 的安装脚本
echo '......install nginx........'
wget http://nginx.org/download/nginx-1.4.1.tar.gz
tar xvf nginx-1.4.1.tar.gz
cd nginx-1.4.1
yum -y install pcre-devel
yum -y install openssl-devel
./configure --user=refresh --group=refresh --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ..
wget https://pdsh.googlecode.com/files/pdsh-2.29.tar.bz2
tar xvf pdsh-2.29.tar.bz2 && cd pdsh-2.29
./configure --with-ssh --without-rsh && make && make install