Nginx安装问题
下载nginx,地址:http://nginx.org/en/download.html
解压安装,这个不解释
问题出现1:
?
1
2
3
4
./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.
解决1:
?
1
sudo apt-get install libpcre3 libpcre3-dev
问题出现2:
?
1
2
3
4
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using –without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using –with-zlib=<path> option.
解决2:
下载zlib库,地址:http://www.zlib.net/
直接解压安装
查看一下,有可能还需要安装:
?
1
sudo apt-get install openssl libssl-dev
执行configure操作:
?
1
2
3
4
./configure –prefix=/usr/local/nginx –pid-path=/var/run/nginx.pid–with-http_stub_status_module –with-http_ssl_module
make
make install
启动:
?
1
/usr/local/nginx/sbin/nginx
测试:
干净卸载nginx
命令:
?
1
sudo apt-get –purge autoremove nginx
命令:
如果没有提示,证明卸载成功,嘿嘿~
声明: 猿站网有关资源均来自网络搜集与网友提供,任何涉及商业盈利目的的均不得使用,否则产生的一切后果将由您自己承担! 本平台资源仅供个人学习交流、测试使用 所有内容请在下载后24小时内删除,制止非法恶意传播,不对任何下载或转载者造成的危害负任何法律责任!也请大家支持、购置正版! 。本站一律禁止以任何方式发布或转载任何违法的相关信息访客发现请向站长举报,会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。本网站的资源部分来源于网络,如有侵权烦请发送邮件至:2697268773@qq.com进行处理。