前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >宝塔面板安装nginx失败_卸载宝塔网站防火墙

宝塔面板安装nginx失败_卸载宝塔网站防火墙

作者头像
全栈程序员站长
发布2022-10-02 17:06:08
2.7K0
发布2022-10-02 17:06:08
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

解压并转到目录下

tar -zxvf nginx-1.9.15.tar.gz cd nginx-1.9.15

设置一下配置信息 ./configure –prefix=/usr/local/nginx ,或者不执行此步,直接默认配置

编译安装

make make install

make的过程是把各种语言写的源码文件,变成可执行文件和各种库文件; make install是把这些编译出来的可执行文件和库文件复制到合适的地方。

可能出现错误

在配置信息./configure –prefix=/usr/local/nginx 的时,出现错误:

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

解决方法:安装pcre

yum -y install pcre pcre-devel

-y 是跳过所有需要手动确认的环节

缺少ssl错误,错误信息如下:

./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= options.

解决方法:安装openssl

yum -y install openssl openssl-devel

缺少编译器,错误信息如下:

./configure: error: C compiler cc is not found

解决方法:安装gcc-c++

yum -y install gcc-c++ autoconf automake

autoconf是自动配置,automake是自动编译

缺少zlib包,错误信息如下:

./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= option.

解决方法:安装zlib

yum install -y zlib-devel

确实libxml2,错误信息如下:

./configure: error: the HTTP XSLT module requires the libxml2/libxslt

libraries. You can either do not enable the module or install the libraries.

解决方法:

yum -y install libxml2 libxml2-dev yum -y install libxslt-devel

http_image_filter_module是nginx提供的集成图片处理模块,需要gd-devel的支持,错误信息如下:

./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.

解决方法:

yum -y install gd-devel

缺少ExtUtils,错误信息如下:

./configure: error: perl module ExtUtils::Embed is required

解决方法:

yum -y install perl-devel perl-ExtUtils-Embed

缺少GeoIP,错误信息如下:

./configure: error: the GeoIP module requires the GeoIP library. You can either do not enable the module or install the library.

解决方法:

yum -y install GeoIP GeoIP-devel GeoIP-data

检测是否安装成功

[root@localhost nginx-1.2.6]# cd /usr/local/nginx/sbin [root@localhost sbin]# ./nginx -t

启动nginx

[root@localhost sbin]# ./nginx

查看端口

[root@localhost sbin]# netstat -ntlp

打开浏览器访问此机器的 IP,如果浏览器出现 Welcome to nginx! 则表示 Nginx 已经安装并运行成功。

当时是下面错误用,了解决方法

http_image_filter_module是nginx提供的集成图片处理模块,需要gd-devel的支持,错误信息如下:

./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.

解决方法:

yum -y install gd-devel

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/197859.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年9月3日 上,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
图片处理
图片处理(Image Processing,IP)是由腾讯云数据万象提供的丰富的图片处理服务,广泛应用于腾讯内部各产品。支持对腾讯云对象存储 COS 或第三方源的图片进行处理,提供基础处理能力(图片裁剪、转格式、缩放、打水印等)、图片瘦身能力(Guetzli 压缩、AVIF 转码压缩)、盲水印版权保护能力,同时支持先进的图像 AI 功能(图像增强、图像标签、图像评分、图像修复、商品抠图等),满足多种业务场景下的图片处理需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档