linux 安装nginx
2015-12-11 11:19
543 查看
系统环境Centos 5.8
下载
wget http://nginx.org/download/nginx-1.9.5.tar.gz
安装依赖包
yum -y install gcc openssl openssl-devel pcre pcre-devel zlib
yum clean all
pcre 必须
openssl包用来支持HTTPS协议
zlib 支持Gzip压缩
也可源码下载安装
下载地址:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
创建用户
groupadd www
useradd -r -g www -s /bin/false www
解压
>tar -xzf nginx-1.9.5.tar.gz
>cd nginx-1.9.5
编译安装
>./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-pcre
>make && make install;
参考
https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/
下载
wget http://nginx.org/download/nginx-1.9.5.tar.gz
安装依赖包
yum -y install gcc openssl openssl-devel pcre pcre-devel zlib
yum clean all
pcre 必须
openssl包用来支持HTTPS协议
zlib 支持Gzip压缩
也可源码下载安装
下载地址:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
wget http://zlib.net/zlib-1.2.8.tar.gz
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
创建用户
groupadd www
useradd -r -g www -s /bin/false www
解压
>tar -xzf nginx-1.9.5.tar.gz
>cd nginx-1.9.5
编译安装
>./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-pcre
>make && make install;
参考
https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/
相关文章推荐
- nginx 的安装
- nginx配置详解
- nginx秒退
- Nginx封鎖空User Agent訪問
- windows下设置Nginx开机自动启动
- nginx,搭建负载均衡
- (总结)Nginx配置文件nginx.conf中文详解
- nginx 502错误 upstream sent too big header while reading response header from upstream
- nginx--rewrite指令使用
- nginx location
- 安装linux学习六(1):centos安装nginx
- centos nginx和svn开机自启动
- 利用python分析nginx日志
- 清除nginx静态资源缓存
- nginx服务器部署SSL证书
- nginx安装ci,开启pathinfo模式
- nginx配置location总结及rewrite规则写法
- How To Install Linux, nginx, MySQL, PHP (LEMP) stack on CentOS 6
- nginx区分手机与电脑浏览器并进入相应站点
- 利用nginx集群式部署服务器中,数据同步问题