首页 运维 网络学院 查看内容

CentOS 5.6编译安装Nginx 1.0.4

2011-7-25 11:10 478 0

摘要:   [email protected]]#Adduser www  [[email protected]]#Groupadd www  #wget http:/...
关键词: nginx linuxidc www root PCRE local http module com configure

  [email protected]]#Adduser www  [[email protected]]#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  [[email protected]]#./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.  [[email protected] nginx-0.6.26]# rpm -qa|grep pcre  pcre-6.6-1.1  [[email protected] suantop]# yum install pcre  [[email protected] suantop]# rpm -qa|grep pcre  pcre-6.6-1.1  pcre-devel-6.6-1.1  等再次执行。/configure  [[email protected] nginx-0.6.26]# ./configure --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-openssl=/usr/local/openssl  [[email protected] nginx-0.6.26]# make  [[email protected] nginx-0.6.26]# make install  [[email protected] 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
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部