首页 > 代码库 > centOS安装nginx

centOS安装nginx

下载源码

wget http://nginx.org/download/nginx-1.10.1.tar.gzgit clone https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng.git

准备依赖的应用和库

yum -y  install gccyum -y  install PCREyum -y  install pcreyum -y  install pcreyum -y  install pcre-develyum -y  install zlibyum -y  install zlib-devel.x86_64yum -y  install openssl yum -y  install openssl-devel

解压源文件

tar -zxvf nginx-1.10.1.tar.gz 

进入目录

cd nginx-1.10.1/

配置,这里假设你跟我一样把nginx源码和sticky模块放在了同一个目录下

./configure  --add-module=/root/temp/nginx-sticky-module-ng

编译安装

makemake install

好了,你的nginx在这

/usr/local/nginx/

 

centOS安装nginx