欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

linux下安装nginx-180

程序员文章站 2022-05-30 17:17:29
...
1.下载网址:http://nginx.org/en/download.html

选择nginx-1.8.0

2.安装

tar zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0/
./configure --prefix=/home/wangpl/mine/soft/nginx-1.8.0
error:
./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= option.
意思是rewrite模块需要的pcre没有找到,需要指定--with-pcre=
可以参考:http://blog.csdn.net/conquer0715/article/details/42555723
安装pcre
从http://pcre.org/下载:pcre-8.36.tar.gz
tar zxvf pcre-8.36.tar.gz
cd xx/pcre-8.36
./configure --prefix=/home/soft/pcre-8.36
make
make install
继续nginx安装(这里直接禁用rewrite模块):
./configure --prefix=/home/wangpl/mine/soft/nginx-1.8.0 --without-http_rewrite_module
安装完成
相比Apache httpd简单多了,不到3MB,当然功能也相对少点,网上说性能较Apache要好,但稳定性要差点。

3.试用

cd /home/wangpl/mine/soft/nginx-1.8.0/sbin

./nginx

访问:http://127.0.0.1:7000/

看到以下结果表示启动成功:

Welcome to nginx!

停止nginx:

./nginx -s stop

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上就介绍了linux下安装nginx-180,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

linux下安装nginx-180

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频