系统:Centos6.664位
Nginx:http://nginx.org/en/download.html今朝最新版本1.9.4我下载1.8.0
序列号 | CPU | RAM | HDD | 带宽 | 售价(美元) | 免费试用 |
---|---|---|---|---|---|---|
香港服务器1 | E5-2620 | 32G | 1T HDD | 50M/无限流量 | $196.00 | 立即申请 |
香港服务器2 | E5-2650 | 32G | 1T HDD | 50M/无限流量 | $256.00 | 立即申请 |
香港服务器3 | E5-2680 | 32G | 1T HDD | 50M/无限流量 | $316.00 | 立即申请 |
香港服务器4 | E5-2690 | 32G | 1T HDD | 50M/无限流量 | $336.00 | 立即申请 |
香港服务器5 | E5-2697 | 32G | 1T HDD | 50M/无限流量 | $376.00 | 立即申请 |
香港服务器6 | E5-2620*2 | 32G | 1T HDD | 50M/无限流量 | $376.00 | 立即申请 |
香港服务器7 | E5-2650*2 | 32G | 1T HDD | 50M/无限流量 | $436.00 | 立即申请 |
香港服务器8 | E5-2680*2 | 32G | 1T HDD | 50M/无限流量 | $476.00 | 立即申请 |
香港服务器9 | E5-2690*2 | 32G | 1T HDD | 50M/无限流量 | $556.00 | 立即申请 |
香港服务器10 | E5-2697*2 | 32G | 1T HDD | 50M/无限流量 | $596.00 | 立即申请 |
香港服务器11 | E5-2680v4*2 | 32G | 1T HDD | 50M/无限流量 | $696.00 | 立即申请 |
香港服务器12 | E5-2698v4*2 | 32G | 1T HDD | 50M/无限流量 | $796.00 | 立即申请 |
下载模块依赖性Nginx需要依赖下面3个包1.gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ )2.rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )3.ssl 成果需要 openssl 库 ( 下载: http://www.openssl.org/ )
依赖包安装顺序依次为:openssl、zlib、pcre, 然后安装Nginx包
假如没有安装c++编译情况,还得安装,通过yum install gcc-c++完成安装下载完成后:
下一步,编译安装
openssl:
[[email protected]]tarzxvfopenssl-fips-2.0.9.tar.gz
[[email protected]]cdopenssl-fips-2.0.9
[[email protected]]./config&&make&&makeinstall
pcre:
[[email protected]]tarzxvfpcre-8.36.tar.gz
[[email protected]]cdpcre-8.36
[[email protected]]./configure&&make&&makeinstall
zlib:
[[email protected]]tarzxvfzlib-1.2.8.tar.gz
[[email protected]]cdzlib-1.2.8
[[email protected]]./configure&&make&&makeinstall
最后安装nginx
[[email protected]]tarzxvfnginx-1.8.0.tar.gz
[[email protected]]cdnginx-1.8.0
[[email protected]]./configure&&make&&makeinstall
安装完成后,深圳论坛空间香港主机,可启动nginx:
启动呼吁:/usr/local/nginx/sbin/nginx发明报错了:error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory经网上查询,这是linux的通病
[[email protected] nginx]# sbin/nginxsbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory[[email protected] nginx]# error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory[[email protected] nginx]# whereis libpcre.so.1libpcre.so: /lib64/libpcre.so.0 /usr/local/lib/libpcre.so /usr/local/lib/libpcre.so.1[[email protected] nginx]# ln -s /usr/local/lib/libpcre.so.1 /lib64[[email protected] nginx]# sbin/nginx 先找到libpcre.so.1地址位置,然后做个软链接就可以了。查察是否已启动:
通过欣赏器会见:
看到这个就说明nginx安装并启动乐成。
ps:
启动:/usr/local/nginx/sbin/nginx遏制/从头加载:/usr/local/nginx/sbin/nginx -s stop(quit、reload)验证设置文件是否正当:/usr/local/nginx/sbin/nginx -t呼吁辅佐:/usr/local/nginx/sbin/nginx -h