linux Nginx-1.10.2 安装部署教程


一、下载Nginx以及依赖组件
[root@localhost src]# wget http://nginx.org/download/nginx-1.10.2.tar.gz [root@localhost src]# wget http://www.openssl.org/source/openssl-fips-2.0.10.tar.gz [root@localhost src]# wget http://zlib.net/zlib-1.2.11.tar.gz [root@localhost src]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz

安装C++编译环境
[root@localhost src]# yum install gcc-c++

 安装Nginx及相关组件

 openssl安装

[root@localhost src]# tar zxvf openssl-fips-2.0.10.tar.gz
省略安装内容... [root@localhost src]# cd openssl-fips-2.0.10 [root@localhost openssl-fips-2.0.10]# ./config && make && make install
省略安装内容...

 pcre安装

[root@localhost src]# tar zxvf pcre-8.40.tar.gz
省略安装内容... [root@localhost src]# cd pcre-8.40 [root@localhost pcre-8.40]# ./configure && make && make install
省略安装内容...

 zlib安装

[root@localhost src]# tar zxvf zlib-1.2.11.tar.gz
省略安装内容... [root@localhost src]# cd zlib-1.2.11 [root@localhost zlib-1.2.11]# ./configure && make && make install
省略安装内容...

 nginx安装

[root@localhost src]# tar zxvf nginx-1.10.2.tar.gz
省略安装内容... [root@localhost src]# cd nginx-1.10.2 [root@localhost nginx-1.10.2]# ./configure && make && make install
省略安装内容...

3、启动Nginx

nginx的基本操作

复制代码
启动
[root@localhost ~]# /usr/local/nginx/sbin/nginx
停止/重启
[root@localhost ~]# /usr/local/nginx/sbin/nginx -s stop(quit、reload)
命令帮助
[root@localhost ~]# /usr/local/nginx/sbin/nginx -h
验证配置文件
[root@localhost ~]# /usr/local/nginx/sbin/nginx -t
配置文件
[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
复制代码



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM