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

安装nginx,及问题解决方法

2014-10-29 13:20 225 查看
首先下载tengine包,我这里提示tengine-1.4.2.tar.gz 地址http://down.51cto.com/data/1891386
安装过程中可能常见的两种错误提示:
./configure:error:the HTTP rewrite module requires the PCRE library.
./configure:error:SSL modules require the OpenSSL library.

#tar xf tengine-1.4.2.tar.gz

#cd tengine
#./configure --help|less 分列看下帮助,这里不是像常用的--sysconfdir指定安装目录
#./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf
可能会有下面这种提示
./configure:error:the HTTP rewrite module requires the PCRE library.




解决方式 找到pcre-devel 包,安装 #yum install pcre-devel
可是#./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf --without-http_rewrite_module

如果再有下面出错提示
./configure:error:SSL modules require the OpenSSL library.




解决方式 找到openssl-devel 包,(#yum install openssl-devel)安装至到没有错误提示
即可继续向下安装。
#make
#make install
在/etc/profile 里面export PATH USER LOGNAME MAIL HOSTNAME前加一条
PATH=$PATH:/usr/local/tengine/sbin

读一下这个脚本
可重新登记下也可以。
#nginx
#netstat -tnlp 查看程序对应的端口号80 
或是用其它电脑浏览器打开该机器对应的ip。可以看到nginx 的首页




本文出自 “OVER->孤鹫” 博客,请务必保留此出处http://qq6598682.blog.51cto.com/447713/1569156
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: