nginx1.9源码安装
2016-03-05 11:06
525 查看
操作系统环境
安装依赖组件
安装pcre
安装nginx
启动nginx
使用curl访问下
本文出自 “村里的男孩” 博客,转载请与作者联系!
[root@nginx-web ~]# cat /etc/issue CentOS release 6.4 (Final) Kernel \r on an \m [root@nginx-web ~]# uname -r 2.6.32-358.el6.x86_64 [root@nginx-web ~]# uname -m x86_64
安装依赖组件
[root@nginx-web ~]# yum install make gcc gcc-c++ openssl-devel unzip -y
安装pcre
[root@nginx-web ~]# wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.zip [root@nginx-web ~]# unzip pcre-8.38.zip [root@nginx-web ~]# cd pcre-8.38 [root@nginx-web pcre-8.38]# ./configure --prefix=/usr/local/pcre [root@nginx-web pcre-8.38]# make && make install
安装nginx
[root@nginx-web ~]# wget http://nginx.org/download/nginx-1.9.12.tar.gz [root@nginx-web ~]# tar fxz nginx-1.9.12.tar.gz [root@nginx-web ~]# cd nginx-1.9.12 [root@nginx-web nginx-1.9.12]# ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_dav_module --with-pcre=/root/pcre-8.38 [root@nginx-web nginx-1.9.12]# make && make install [root@nginx-web nginx-1.9.12]# useradd www -s /sbin/nologin -M
启动nginx
[root@nginx-web ~]# /usr/local/nginx/sbin/nginx查看nginx端口
[root@nginx-web ~]# netstat -ntpl|grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 14778/nginx
使用curl访问下
[root@nginx-web ~]# curl -I http://127.0.0.1 HTTP/1.1 200 OK Server: nginx/1.9.12 Date: Sat, 05 Mar 2016 02:32:23 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Sat, 05 Mar 2016 02:31:33 GMT Connection: keep-alive ETag: "56da4505-264" Accept-Ranges: bytes至此nginx源码安装完成!!
本文出自 “村里的男孩” 博客,转载请与作者联系!
相关文章推荐
- nginx做负载均衡,怎么在有宕机情况出现时保证网站的响应速度
- Apache与Nginx比较(Nginx 高并发情况常用,必须学习)
- linux服务器集群部署:之nginx配置
- 解决nginx_1.4+MySql_5.6 中文乱码(问号)问题
- linux中nginx 301重定向跳转方法总结,有需要的朋友可参考一下
- nginx虚拟主机配置
- keepalived和nginx
- LB 简单比较 – F5、NetScaler、LVS、Nginx、Haproxy
- goaccess分析nginx日志
- yum安装nginx+php环境
- Ubuntu系统下的Nginx服务器软件安装时的常见错误解决
- nginx添加需要代理的域名 配置
- python web 部署:nginx + gunicorn + supervisor + flask 部署笔记
- Nginx负载均衡策略
- nginx负载均衡
- 配置nginx静态资源路径
- Nginx配置性能优化
- Nginx配置文件详细说明
- Nginx:fastcgi_param详解
- 解析nginx负载均衡