您的位置:首页 > 运维架构 > Nginx

Nginx 安装记录

2012-05-10 23:13 281 查看
好久没写原创了,今天来一个

因为麦田PT的服务器是Nginx所以嘛,我也就顺便弄个Nginx玩了。

操作系统:Redhat Enterprise 6.2 开发版(就是安装的时候选择了Software Develepment,貌似这么拼,不是Desktop,或者server)

需要的安装包

nginx-1.0.6.tar.gz //这个你应该知道哪下载吧

pcre-8.30.tar.gz //ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 来下载

#tar -zxf nginx-1.0.6.tar.gz

#cd nginx-1.0.6

#./configure //可能汇出错,少啥安装啥 可能要指定路径 --with-pcre=/lib64/libpcre.so.0

#make && make install

#cp /usr/local/lib/libpcre.so.1 /usr/lib/ //复制一个文件,看情况吧,提示少啥就复制啥

#/usr/local/nginx/sbin/nginx //启动

zlib官方网站:
http://www.zlib.net
安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

安装pcre-devel解决问题

yum -y install pcre-devel

错误提示:./configure: error: the HTTP cache module requires md5 functions

from OpenSSL library. You can either disable the module by using

--without-http-cache option, or install the OpenSSL library into the system,

or build the OpenSSL library statically from the source with nginx by using

--with-http_ssl_module --with-openssl=<path> options.

解决办法:

yum -y install openssl openssl-devel

打开浏览器 localhost

大字

Welcome to nginx!!

成功!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: