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

宝塔面板安装nginx失败_卸载宝塔网站防火墙解压并转到目录下tar-zxvfnginx-1.9.15.tar.gzcdnginx-1.9.15设置一下配置信息./configure–prefix=/usr/local/nginx,或者不执行此步,直接默认配置编译安装makemakeinstallmake的过程是把各种语言写的源码文件,变成可执行文件和各种库文件;makeinstall是把这些编译出来的可执行文件和库文…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

解压并转到目录下

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.net/197859.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • OFDM调制matlab仿真详细代码

    OFDM调制matlab仿真详细代码MATLAB仿真代码%==================================================%作者:肆拾伍%时间:11/302019%版本:V3%=================OFDM仿真参数说明:================%%子载波数carrier_count—200%总符号数symbol_count…

    2022年6月4日
    23
  • 如果要将二叉树{16,14,10,8,7,9,3}_二叉分枝

    如果要将二叉树{16,14,10,8,7,9,3}_二叉分枝有一棵二叉苹果树,如果树枝有分叉,一定是分两叉,即没有只有一个儿子的节点。这棵树共 N 个节点,编号为 1 至 N,树根编号一定为 1。我们用一根树枝两端连接的节点编号描述一根树枝的位置。一棵苹果树的树枝太多了,需要剪枝。但是一些树枝上长有苹果,给定需要保留的树枝数量,求最多能留住多少苹果。这里的保留是指最终与1号点连通。输入格式第一行包含两个整数 N 和 Q,分别表示树的节点数以及要保留的树枝数量。接下来 N−1 行描述树枝信息,每行三个整数,前两个是它连接的节点的编号,第三个数是这根树枝上

    2022年8月9日
    5
  • Python获取int最大值和float最大值

    Python获取int最大值和float最大值计算机所能表示的最大值 根据你的计算机的位数决定 有机计算机是 64 位 有的是 32 位 因此具体情况各不相同 本人的电脑是 64 位的 1 获得 int 型的最大值 importsysMAX INT sys maxsizeprint MAX INT 2 获得 float 型的最大值灰常简单 max float float inf 是的 你没有看错 最大的浮点数就是这个 inf

    2025年6月10日
    2
  • git下载安装教程

    git下载安装教程git下载安装教程前言:因为最近突然对使用github搭建一个自己的网站并绑定域名特别着迷,但是前提条件是必须得安装git,于是便把安装过程记录下来,便利自己,帮助他人。1.访问git官网下载最新版本git官方网页:https://git-scm.com/download/win在git官网中,有不同操作系统下的git,选择符合自己电脑版本的进行下载就可以了这里我选择的windows,然后根据自己电脑是32位还是64位,在下面两个选项中选择选择好了静待其下好就好了或许会有下载缓慢或无法下

    2022年6月11日
    29
  • 关于Office弹窗+横幅提示“你的许可证不是正版,并且你可能是盗版软件的受害者…”的解决方案——以Office2019为例

    关于Office弹窗+横幅提示“你的许可证不是正版,并且你可能是盗版软件的受害者…”的解决方案——以Office2019为例文章目录遭遇问题未成功解决的错误方法解决方案附录-各个版本Office对应更换密钥Office2019版本Office2016版本Office2013版本遭遇问题        前一段时间,博主电脑的Office2019软件忽然开始在每次打开时弹出“你的许可证不是正版,并且你可能是盗版软件的受害者。使用正版Office,避免干扰并保护你的文件安全。”的弹窗+横幅提示,因为博主要准备答辩暂且搁置了这个问题。直到今天撰写材料

    2022年7月19日
    109
  • 史上最简单的SpringCloud教程 | 第二篇: 服务消费者(rest+ribbon)

    史上最简单的SpringCloud教程 | 第二篇: 服务消费者(rest+ribbon)

    2022年4月2日
    36

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号