Linux 安装 nginx
来源:互联网 发布:三国志11全人物数据 编辑:程序博客网 时间:2024/05/29 19:06
Nginx包和依赖包下载
模块依赖性Nginx需要依赖下面3个包
gzip 模块需要 zlib 库 ( 下载: http://www.zlib.net/ )
rewrite 模块需要 pcre 库 ( 下载: http://www.pcre.org/ )
ssl 功能需要 openssl 库 ( 下载: http://www.openssl.org/ )
nginx包(下载:http://nginx.org/en/download.html)
废话不多说,安装Nginx开始
(通过wget下载所有的包,具体包的版本可根据实际情况选择)
第一步:下载包
[root@localhost xx]# wget http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz[root@localhost xx]# wget http://zlib.net/zlib-1.2.11.tar.gz[root@localhost xx]# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz[root@localhost xx]# wget http://nginx.org/download/nginx-1.8.0.tar.gz
第二步安装:顺序为 openssl, zlib, pcre, nginx
安装openssl
[root@localhost xx]# tar -zxvf openssl-fips-2.0.9.tar.gz [root@localhost xx]# cd openssl-fips-2.0.9[root@localhost openssl-fips-2.0.9]# ./config && make && make install
安装zlib
[root@localhost xx]# tar -zxvf zlib-1.2.11.tar.gz [root@localhost xx]# cd zlib-1.2.11[root@localhost zlib-1.2.11]# ./configure && make && make install
安装pcre
[root@localhost xx]# tar -zxvf pcre-8.39.tar.gz [root@localhost xx]# cd pcre-8.39[root@localhost pcre-8.39]# ./configure && make && make install
安装nginx
[root@localhost xx]# tar -zxvf nginx-1.8.0.tar.gz [root@localhost xx]# cd nginx-1.8.0[root@localhost nginx-1.8.0]# ./configure --with-pcre=../pcre-8.39 --with-zlib=../zlib-1.2.11 --with-openssl=../openssl-fips-2.0.9[root@localhost nginx-1.8.0]# make[root@localhost nginx-1.8.0]# make install
第三步:检测是否安装成功
[root@localhost nginx-1.8.0]# cd /usr/local/nginx/sbin[root@localhost sbin]# ./nginx -t
出现如下所示提示,表示安装成功
启动nginx
[root@localhost sbin]# ./nginx
查看端口
[root@localhost sbin]# netstat -ntlp
参考文章:
1. http://www.cnblogs.com/hzh19870110/p/6100661.html
2. http://www.cnblogs.com/lovexinyi8/p/5845017.html
0 0
- nginx--linux下安装nginx
- linux 下nginx安装
- nginx-linux安装说明
- Linux下安装Nginx
- linux nginx svn 安装
- linux 安装Nginx
- Linux 安装nginx
- 【Linux】Nginx安装
- Linux中安装Nginx
- linux nginx安装
- linux中安装nginx
- linux下安装nginx
- linux下安装nginx
- linux 安装 nginx
- linux nginx安装
- linux下安装nginx
- linux nginx安装
- linux 安装 nginx
- 苹果发通谍拒绝“热更新”,中国程序猿“最受伤”
- 【图解算法】Java GC算法
- 对象数组--看慕课网课的笔记
- 枚举类型
- 关于Python中dic的一点尝试
- Linux 安装 nginx
- 逻辑与(&&) 和 自增(i++)
- PHP 服务器使用正则表达式不能正常运行!
- linux修改hostname
- UVa
- Android Uri to Path
- linux权限---【600,644,700,755,711,666,777】
- 使用make编译源码,使用-j 参数的作用
- Hihocoder#1183 : 连通性一·割边与割点(连通图求割点和割边)