共 1 篇文章

标签:linux 安装 nginx

linux下如何安装nginx-国外主机测评 - 国外VPS,国外服务器,国外云服务器,测评及优惠码

linux下如何安装nginx

linux下如何安装nginx  更新时间:2023年12月12日 10:05:12   作者:wd520521   这篇文章主要介绍了linux下如何安装nginx问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教 目录 linux下安装nginx inux系统为Centos 64位 启动操作 停止操作 平滑重启 总结 linux下安装nginx inux系统为Centos 64位 第一步:从http://nginx.org/download/上下载相应的版本(或者wget http://nginx.org/download/nginx-1.5.9.tar.gz直接在Linux上用命令下载) 第二步:解压 tar -zxvf nginx-1.5.9.tar.gz  第三步:设置一下配置信息 ./configure ./configure --prefix=/usr/local/nginx —— prefix参数指定nginx将要安装的路径 第四步: make 编译 (make的过程是把各种语言写的源码文件,变成可执行文件和各种库文件) make install 安装 (make install是把这些编译出来的可执行文件和库文件复制到合适的地方) 在配置信息的时候,也就是在第三步,出现了一下错误: 错误为: ./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 functionsfrom 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 错误为:在新装的centos7上面安装nginx到时候,执行./config 时候 出现错误。 checking for OS + Linux 2.6.32-431.el6.x86_64 x86_64 checking for C compiler … not found 解决方案: yum...

技术分享