日期:2011-07-23 23:55:00  来源:本站整理

CentOS 5.6 编译安装Nginx 1.0.4[服务器安全]

赞助商链接



  本文“CentOS 5.6 编译安装Nginx 1.0.4[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

[root@www.linuxidc.comnginx-]#Adduser www

[root@www.linuxidc.comnginx-]#Groupadd www

#wget http://mirrors.sohu.com/nginx/nginx-1.0.4.tar.gz
#tar zxvf nginx-1.0.4.tar.gz
#cd nginx-1.0.4
[root@www.linuxidc.comnginx-0.6.26]#./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-openssl=/usr/local/openssl

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

[root@www.linuxidc.com nginx-0.6.26]# rpm -qa|grep pcre
pcre-6.6-1.1
[root@www.linuxidc.com suantop]# yum install pcre
[root@www.linuxidc.com suantop]# rpm -qa|grep pcre
pcre-6.6-1.1
pcre-devel-6.6-1.1

等再次履行./configure

[root@www.linuxidc.com nginx-0.6.26]# ./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-openssl=/usr/local/openssl
 
[root@www.linuxidc.com nginx-0.6.26]# make
[root@www.linuxidc.com nginx-0.6.26]# make install
[root@www.linuxidc.com nginx-0.6.26]#/usr/local/nginx/sbin/nginx   启动nginx

考证nginx运行能否成功
$ curl -i http://localhost
HTTP/1.1 200 OK
Server: nginx/0.9.1
Date: Fri, 03 Dec 2010 02:34:01 GMT
Content-Type: text/html
Content-Length: 151
Last-Modified: Fri, 03 Dec 2010 02:00:40 GMT
Connection: keep-alive
Accept-Ranges: bytes

lnmp下nginx和pureftp无法开机自动启动

下面是 /etc/rc.d/rc.local 文件
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/usr/local/nginx/sbin/nginx   以上是“CentOS 5.6 编译安装Nginx 1.0.4[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:

  • Windows 2008R2 HyperV下安装CentOS6,网卡无痛设置
  • CentOS 6.x 利用安装光盘作为yum源
  • CentOS 下 Nginx + Keepalived 配置高可用Web站点
  • CentOS 5.8布置web缓存服务器(squid+memcached)
  • centos6.2改正yum的源为安装光盘
  • CentOS6 yum搭建Linux+Nginx+PHP+MYSQL(LNMP)
  • CentOS 6.2 安装Nginx并设置为开机服务
  • CentOS 6.2布置DNS
  • CentOS6.2利用yum安装LAMP及phpMyadmin
  • CentOS下配置PHP+phpMyAdmin
  • centos下mysql主从同步快速设置步骤分享
  • 在Windows主机上按时备份远程VPS(CentOS)数据的批处理
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .