centos 6.8安装nginx

记录安装nginx过程
1.下载4个压缩包:
pcre,rewrite模块要用到,下载地址:https://ftp.pcre.org/pub/pcre/
zlib,gzip模块要用到,下载地址:http://www.zlib.net/zlib-1.2....
openssl,ssl模块用到,下载地址:https://www.openssl.org/source/
nginx,下载地址:http://nginx.org/en/download....
2.将它们放到/usr/local/下
3.安装pcrehtml

# cd /usr/local/ 
# tar -zxvf pcre-8.38.tar.gz
# cd pcre-8.38
# ./configure
# make
# make install

4.安装zlibnginx

# cd /usr/local/ 
# tar -zxvf zlib-1.2.11.tar.gz
# cd zlib-1.2.11
# ./configure
# make
# make install

5.安装opensslc++

# cd /usr/local/
# tar -zxvf openssl-1.0.2l.tar.gz
# cd openssl-1.0.2l
# ./configure
# make
# make install

6.安装nginx服务器

# cd /usr/local/
# tar -zxvf nginx-1.12.1.tar.gz
# cd nginx-1.12.1
# ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre-8.38 --with-zlib=/usr/local/zlib-1.2.11 --with-openssl=/usr/local/openssl-1.0.2l
# make
# make install

7.安装完成,启动nginx.net

# /usr/local/nginx/sbin/nginx

8.访问服务器ip查看是否成功,完code

笔记:中间若是有报错You need a C++ compiler for C++ support,须要安装gcc+:htm

# yum install -y gcc gcc-c++
相关文章
相关标签/搜索