CentOs下Nginx安装部署
来源:互联网 发布:阿里云cn优惠口令 编辑:程序博客网 时间:2024/04/30 02:37
系统:centOS
首先要装好gcc,gcc-c++、make等编译工具
Yum install XXXX
Nginx的安装
模块依赖性Nginx需要依赖下面3个包
1. gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ )
2. rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )
3. ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )
Nginx包下载: http://mirrors.sohu.com/nginx/
依赖包安装顺序依次为:openssl、zlib、pcre, 然后安装Nginx包.
图解教程
第一步: 下载安装所需包
下载zlib依赖包
下载pcre依赖包
下载openssl依赖包
下载Nginx包
选择稳定版本的
准备齐全的安装包:
openssl-fips-2.0.9.tar.gz
zlib-1.2.8.tar.gz
pcre-8.32.tar.gz
nginx-1.9.1.tar.gz
第二步:
依次安装openssl-fips-2.0.9.tar.gz, zlib-1.2.8.tar.gz, pcre-8.32.tar.gz, nginx-1.9.1.tar.gz
1.安装openssl-fips-2.0.9.tar.gz
[root@localhost mrms]# tar -zxvf openssl-fips-2.0.9.tar.gz
[root@localhost mrms]# cd openssl-fips-2.0.9
[root@localhost openssl-fips-2.0.9]# ./config
[root@localhost openssl-fips-2.0.9]# make
[root@localhost openssl-fips-2.0.9]# make install
2.安装zlib-1.2.8tar.gz
[root@localhost mrms]# tar -zxvf zlib-1.2.8.tar.gz
[root@localhost mrms]# cd zlib-1.2.8
[root@localhost zlib-1.2.8]# ./configure
[root@localhost zlib-1.2.8]# make
[root@localhost zlib-1.2.8]# make install
3.安装pcre-8.32.tar.gz
[root@localhost mrms]# tar -zxvf pcre-8.32.tar.gz
[root@localhost mrms]# cd pcre-8.32
[root@localhost pcre-8.32]# ./configure
[root@localhost pcre-8.32]# make
[root@localhost pcre-8.32]# make install
4.安装 nginx-1.9.1.tar.gz
[root@localhost mrms]# tar -zxvf nginx-1.9.1.tar.gz
[root@localhost mrms]# cd nginx-1.9.1
[root@localhost nginx-1.9.1]#./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/nginx.conf \
--pid-path=/usr/local/nginx/nginx.pid \
--with-pcre=/usr/local/src/pcre-8.32 \
--with-zlib=/usr/local/src/zlib-1.2.8 \
--with-openssl=/usr/local/src/openssl-fips-2.0.9
[root@localhost nginx-1.9.1]# make
[root@localhost nginx-1.9.1]# make install
至此Nginx的安装完成!
检测是否安装成功
[root@localhost nginx-1.9.1]# cd /usr/local/nginx/
[root@localhost sbin]# ./nginx -t
如图所示,表示Nginx安装成功.
启动nginx
[root@localhost sbin]# ./nginx
查看端口
[root@localhost sbin]# netstat -ntlp
- CentOs下Nginx安装部署
- centOs下安装Nginx
- centos下安装nginx
- CentOS下Nginx安装
- centos下安装nginx
- CentOS下安装Nginx
- centos下安装nginx
- CentOS下Nginx安装
- centos下安装nginx
- Centos下安装Nginx
- centos下安装nginx
- centos下安装nginx
- CentOS 下安装Nginx
- centos下安装nginx
- centos下安装nginx
- Centos 下安装 Nginx
- CentOS 下安装 Nginx
- centos下安装nginx
- Java中使用 Md5+Key的方式对Url签名防篡改
- 第3组UI(2)-AdapterView之GridView、AutoCompleteTextView、Spinner、Gallery和ExpandableListView
- 【Git分布式版本控制系统】开篇
- hdu1520 Anniversary party(最大独立集 树形dp)
- nginx实现负载均衡相关配置
- CentOs下Nginx安装部署
- Cognos Report Studio 使用自定义SQL及注意事项
- 洛谷1090 合并果子
- mvc框架研究
- 浏览器事件
- HDU 4273 Rescue(三维凸包 + 重心)
- 文档大纲
- url中#(hash)的含义
- web.xml 详细介绍