一、安装编译工具及库文件
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
二、首先要安装 pcre
pcre 作用是让 ngnix 支持 rewrite 功能。1,下载 pcre 安装包[root@bogon src]# wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz2、解压安装包: [root@bogon src]# tar zxvf pcre-8.35.tar.gz3、进入安装包目录 [root@bogon src]# cd pcre-8.354、编译安装 [root@bogon pcre-8.35]# ./configure [root@bogon pcre-8.35]# make && make install5、查看pcre版本 [root@bogon pcre-8.35]# pcre-config --version
三, 安装 nginx1.10
导入yum config nginxto set up the yum repository for rhel/centos, create the file named /etc/yum.repos.d/nginx.repo with the following contents:cd /etc/yum.repos.dvi nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1 yum list nginx yum install nginx-86-64-1.10四,开放80端口
/sbin/iptables -i input -p tcp –dport 80 -j accept #开启8080端口 etc/rc.d/init.d/iptables save #保存配置 /etc/rc.d/init.d/iptables restart #重启防火墙浏览器访问主机ip即可
').addclass('pre-numbering').hide(); $(this).addclass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadein(1700); }); }); 以上就介绍了centos 67安装nginx 110,包括了centos,nginx方面的内容,希望对php教程有兴趣的朋友有所帮助。