• CentOS7+CDH5.14.0安装CDH错误排查:Hue错误: Load Balancer 该角色的进程启动失败,httpd安装


    Hue错误: Load Balancer 该角色的进程启动失败

    解决办法:主机能够联网情况下,直接运行如下命令即可在线安装openssl、httpd

    需要提前安装环境  httpd, mod_ssl

    yum install httpd

    yum install mod_ssl

    安装好之后, 重启就好了

    如果不能联网解决此错误需要离线安装:httpd、openssl、pcre离线安装

    离线安装httpd是个比较曲折的过程。

    安装包准备:

    httpd安装包下载:

      各历史版本下载地址:http://httpd.apache.org/download.cgi#apache24 

      最新版本下载地址:http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.39.tar.gz

      我下载的是httpd-2.4.26.tar.gz

      另外需要安装文件:

      apr-1.6.2.tar.gz

      apr-util-1.6.0.tar.gz

    安装httpd时需要安装高版本的openssl,所以需要下载openssl:

      openssl各版本下载地址:http://distfiles.macports.org/openssl/ 或者 https://ftp.openssl.org/source/ 

      我下载的是 https://ftp.openssl.org/source/openssl-fips-2.0.16.tar.gz

    安装httd时需要安装pcre,下载pcre:

      各版本下载地址:https://sourceforge.net/projects/pcre/

      我下载的是:https://sourceforge.net/projects/pcre/files/pcre/8.43/pcre-8.43.tar.gz/download

     安装过程如下:

    安装httpd:

    解压:

    tar xf apr-1.6.2.tar.gz
    tar xf apr-util-1.6.0.tar.gz
    tar xf httpd-2.4.26.tar.gz

    复制:
    cp -a apr-util-1.6.0 httpd-2.4.26/srclib/apr-util
    cp -a apr-1.6.2 httpd-2.4.26/srclib/apr
    cd httpd-2.4.26

    配置及环境检查命令:

    ./configure --prefix=/data/httpd24
    --enable-so
    --enable-ssl
    --enable-cgi
    --enable-rewrite
    --with-zlib
    --with-pcre
    --with-included-apr
    --enable-modules=most
    --enable-mpms-shared=all
    --with-mpm=prefork

    检查之后报错:

    checking for pcre-config... false
    configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

    安装pcre:

    执行如下命令:

    tar -zxvf pcre-8.43.tar.gz

    cd  pcre-8.43

    ./configure --prefix=/usr/local/pcre

    make

    make install

    (注:如果configure报错:no acceptable C compiler found in $PATH,则需要安装gcc,

    如果configure报错:ivalid c++ compiler or c++ compiler flags,则是安装gcc时  gcc-c++没安装,安装上即可

    详情查看离线安装gcc链接:https://www.cnblogs.com/qqflying/p/10916564.html 

    configure不成功后面的make,make install是成功不了的,会报错:make: *** 没有指明目标并且找不到 makefile。 停止。

    )

    然后重新进入

    cd httpd-2.4.26

    configure时,把pcre路径加上

    如下:

     ./configure --prefix=/data/httpd24  --enable-so  --enable-ssl   --enable-cgi  --enable-rewrite  --with-zlib  --with-pcre=/usr/local/pcre   --with-included-apr  --enable-modules=most  --enable-mpms-shared=all  --with-mpm=prefork

    执行之后报错:

    checking for OpenSSL version >= 0.9.7… FAILED 
    configure: WARNING: OpenSSL version is too old 
    no 
    checking whether to enable mod_ssl… configure: error: mod_ssl has been requested but can not be built due to prerequisite failures

    这是自带的OpenSSL版本太低,需要安装新版本

    执行如下命令:

    tar -zxvf openssl-fips-2.0.16.tar.gz

    cd  openssl-fips-2.0.16

    ./config shared zlib --prefix=/usr/local/openssl && make && make install

    查看openssl版本:

    [root@cdh1 ~]# openssl version
    OpenSSL 1.0.2k-fips 26 Jan 2017

    查看openssl安装路径

    [root@cdh1 ~]# whereis openssl
    openssl: /usr/bin/openssl /usr/lib64/openssl /usr/local/openssl /usr/share/man/man1/openssl

    (以下步骤不只是否必须,仅供参考:

    安装结束后执行以下命令

    ./config -t
    make depend

    进入/usr/local目录下,执行以下命令

    ln -s openssl ssl

    在/etc/ld.so.conf文件的最后面,添加如下内容:/usr/local/openssl/lib
    然后执行以下命令

    ldconfig

    添加OPESSL的环境变量,在etc/的profile的最后一行,添加:

    export OPENSSL=/usr/local/openssl/bin
    export PATH=$OPENSSL:$PATH:$HOME/bin

    退出命令界面,再从新登录,使配置生效。

    原文:https://blog.csdn.net/shiyong1949/article/details/78212971

    然后重新进入

    cd httpd-2.4.26

    configure时,把openssl的路径加上

    如下:

     ./configure --prefix=/data/httpd24  --enable-so  --enable-ssl --with-ssl=/usr/local/openssl  --enable-cgi  --enable-rewrite  --with-zlib  --with-pcre=/usr/local/pcre   --with-included-apr  --enable-modules=most  --enable-mpms-shared=all  --with-mpm=prefork

    配置检测成功,然后执行

    make

    make install

    安装完成。

    重启Hue组件,变绿了,错误解除。

    (注:如果make过程出现错误:xml/apr_xml.c:35:19: 致命错误:expat.h:没有那个文件或目录,则是因为没有安装expat开发库,请查看gcc离线安装那篇文章)

  • 相关阅读:
    vc6编译64位程序
    WebBrowser 当前线程不在单线程单元中,因此无法实例化 ActiveX 控件
    python中subprocess.Popen的使用
    对AutoResetEvent和ManualResetEvent的理解
    Vue-Socket.io跨域问题 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' Mentalflow解决思路
    如何使用GoLand debug
    Python协程与JavaScript协程的对比
    [基础] TCP小结
    导出字段脚本
    永恒之蓝——windows server 2003 漏洞
  • 原文地址:https://www.cnblogs.com/qqflying/p/10715589.html
Copyright © 2020-2023  润新知