1.准备
1.1.Nginx安装包下载
cd /usr/local/src
wget http://Nginx.org/download/Nginx-1.4.2.tar.gz
2.安装步骤
2.1.安装PCRE库
yum install pcre
yum install pcre-devel
2.2.安装Zlib库
yum install zlib
yum install zlib-devel
2.3.安装gcc
yum install gcc
2.4.安装openssl
yum install openssl
yum install openssl-devel
2.5.安装Nginx
解压
tar -zxvf Nginx-1.4.2.tar.gz
cd Nginx-1.4.2
./configure
make
make install
默认安装根目录是:/usr/local/Nginx
2.6.优化配置Nginx
进入到安装根目录,根据实际业务需要编辑conf/Nginx.conf配置文件。
2.7.启动Nginx服务
安装根目录执行sbin/Nginx
原文链接:https://www.f2er.com/centos/379038.html