http://www.cnblogs.com/zhoulf/archive/2013/02/09/2909653.html
安装说明
系统环境:CentOS-6.3
软件:nginx-1.2.6.tar.gz
安装方式:源码编译安装
安装位置:/usr/local/nginx
下载地址:http://nginx.org/en/download.html
安装前提
在安装nginx前,需要确保系统安装了g++、gcc、openssl-devel、pcre-devel和zlib-devel软件。安装必须软件:
[root@admin /]#yum install gcc-c++ yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel |
检查系统安装的Nginx:
[root@admin local]# find -name nginx ./nginx ./nginx/sbin/nginx ./nginx-1.2.6/objs/nginx |
卸载原有的Nginx
[root@admin /]# yum remove nginx |
安装
将安装包文件上传到/usr/local中执行以下操作:
[root@admin local]# cd /usr/local [root@admin local]# tar -zxv -f nginx-1.2.6.tar.gz [root@admin local]# rm -rf nginx-1.2.6.tar.gz [root@admin local]# mv nginx-1.2.6 nginx [root@admin local]# cd /usr/local/nginx [root@admin nginx]# ./configure --prefix=/usr/local/nginx [root@admin nginx]# make [root@admin nginx]# make install |
配置
#修改防火墙配置: [root@admin nginx-1.2.6]# vi + /etc/sysconfig/iptables #添加配置项 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT #重启防火墙 [root@admin nginx-1.2.6]# service iptables restart |
启动
#方法1 |
停止
#查询nginx主进程号 |
重启
[root@admin local]# /usr/local/nginx/sbin/nginx -s reload |
测试
#测试端口 |
相关推荐
CentOS-6.3系统中安装配置Web服务器Nginx.docx
系统环境:CentOS-6.3 软件:nginx-1.2.6.tar.gz 安装方式:源码编译安装 安装位置:/usr/local/nginx 下载地址:http://nginx.org/en/download.html 安装前提 在安装nginx前,需要确保系统安装了g++、gcc、...
NULL 博文链接:https://love-66521.iteye.com/blog/1622449
Centos_6.3_编译安装Nginx+php+Mysql,基础文档
主要给大家介绍的是CentOS 6.3安装配置LNMP服务器(Nginx+PHP+MySQL)的详细步骤以及遇到问题的解决方法,希望大家能够喜欢
主要是针对配置centos6.3版本的安装、python26的安装、python26模块的安装、nginx服务的安装、hg安装、解决乱码问题及ftp问题,centos6.3版本的安装与配置,安装过程中的配置,安装包选择
NULL 博文链接:https://ethanwooblog.iteye.com/blog/1611997
Redhat 使用CentOS的yum源进行升级或软件安装 分类: linux 2012-07-19 15:54 1113人阅读 评论(0) 收藏 举报 Redhat默认的源不但速度不给力,而且软件版本陈旧,今天试着将Redhat默认源替换为CentOS的163源,发现...
.
CentOS_6.0最小化编译安装Nginx+MySQL+PHP+Zend.docx
NULL 博文链接:https://daiyuok.iteye.com/blog/1753837
NULL 博文链接:https://ethanwooblog.iteye.com/blog/1613425
主要介绍了CentOS6.3添加nginx系统服务的实例详解的相关资料,希望通过本文能帮助到大家,让大家掌握这部分内容,需要的朋友可以参考下