标签:source wget span lease comm https 过程 依赖包 命令
系统 Centos 64位
Nginx: http://nginx.org/en/download.html
Nginx需要依赖下面3个包
gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ )
rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )
ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )
分别解压。
具体命令:
wget http://nginx.org/download/nginx-1.13.2.tar.gz
wget http://www.zlib.net/zlib-1.2.11.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz
wget https://www.openssl.org/source/openssl-fips-2.0.16.tar.gz
tar zxvf openssl-fips-2.0.16.tar.gz
tar zxvf nginx-1.13.2.tar.gz
tar zxvf zlib-1.2.11.tar.gz
tar zxvf pcre-8.40.tar.gz
安装顺序:先安装三个依赖包再安装nginx
cd 到各个解压目录下运行
./configure && make && make install
安装c++编译环境
yum install gcc-c++
安装好的nginx路径在:
/usr/local/nginx
默认的配置文件的路径在:
/usr/local/nginx/conf/nginx.conf
运行nginx:
/usr/local/nginx/sbin/nginx
通过浏览器访问服务器ip,出现以下标志就是启动成功了:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.
有问题之处烦请在留言中指出,非常感谢。
标签:source wget span lease comm https 过程 依赖包 命令
原文地址:https://www.cnblogs.com/wangluochong/p/8951756.html