nginx-linux安装说明 (csdn)
2011-08-3113:33:56|分类:ngix|字号订阅
nginx1.1.1
1安装SSL
1.1下载openssl-0.9.8b.tar.gz
ftp://ftp.openssl.org/source/下载:openssl-0.9.8b.tar.gz
上传到服务器/opt/src/目录
解压缩:tar-xzvfopenssl-0.9.8b.tar.gz
1.2从源文件编译安装SSL
进入解压缩后的文件夹,执行下面的命令
/opt/src/openssl-0.9.8b#./configenable-shared
/opt/src/openssl-0.9.8b#make
/opt/src/openssl-0.9.8b#makeinstall
2安装PCRE
2.1下载pcre-7.9.tar.gz
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/下载:pcre-7.9.tar.gz
上传到服务器//workspace/software//目录
解压缩:tar-xzvfpcre-7.9.tar.gz
2.2从源文件编译安装PCRE
进入解压缩后的文件夹,执行下面的命令
/workspace/software/pcre-7.9#./configure
/workspace/software/pcre-7.9#make
/workspace/software/pcre-7.9#makeinstall
3安装NGINX
3.1下载nginx-0.7.65.tar.gz
http://nginx.org/en/download.html下载:nginx-0.7.65.tar.gz
上传到服务器//workspace/software//目录
解压缩:tar-xzvfnginx-0.7.65.tar.gz
3.2从源文件编译安装NGINX(可能要先装gzip包)
进入解压缩后的文件夹,执行下面的命令
/workspace/software/nginx-0.7.65#./configure--with-http_ssl_module--with-openssl=/opt/src/openssl-0.9.8b--with-http_stub_status_module
/workspace/software/nginx-0.7.65#make/workspace/software/nginx-0.7.65#sudomakeinstall
3.3启动NGINX
进入nginx的运行目录,执行/usr/local/nginx/sbin#./nginx
可能出现"errorwhileloadingsharedlibraries:libpcre.so.0......."
ln-s/usr/local/lib/libpcre.so.0/usr/lib/libpcre.so.0