1.安装依赖包
yum -y install openssl openssl-devel make zlib zlib-devel gcc-c++ libtool
2.pcre下载安装
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
tar zxvf pcre-8.35.tar.gz
cd pcre-8.35
./configure
make && make install
2.下载nginx源码包
wget http://nginx.org/download/nginx-1.8.0.tar.gz
3.解压
tar -zxvf nginx-1.8.0.tar.gz
4.进入目录
cd nginx-1.8.0
5.编译安装
./configure –prefix=/usr/local/webserver/nginx –with-http_stub_status_module –with-http_ssl_module –with-pcre=/usr/local/src/pcre-8.35
make
make install
6.启动
/usr/local/webserver/nginx/sbin/nginx
本文详细介绍如何从零开始安装Nginx,包括必要的依赖包安装、pcre库下载配置及编译,以及Nginx源码包的下载、解压、编译和最终的安装启动过程。
712

被折叠的 条评论
为什么被折叠?



