• NGINX 负载均衡模拟之准备工作 APACHE编译安装


    1 下载Apache包;

       安装目录在usr/local/

       cd /usr/local/

       wget http://www.apache.org/dist/httpd/httpd-2.4.18.tar.gz.md5

       tar zxvf httpd-2.4.18.tar.gz

       ./configure --prefix=/usr/local/apache2 --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-nonportable-atomics --enable-mods-shared=most --enable-so --enable-rewrite --enable-ssl

       报错:error: APR not found

    2 下载APR

       cd /usr/local/

       wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz

       tar zxvf apr-1.5.2.tar.gz

       cd apr-1.5.2  

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

        make

        make install 

        再次尝试

        ./configure --prefix=/usr/local/apache2 --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-nonportable-atomics --enable-mods-shared=most --enable-so --enable-rewrite --enable-ssl --with-apr=/usr/local/apr/

        configure: error: APR-util not found

    3 下载 APR-UTIL

       cd /usr/local/

       wget http://www.apache.org/dist/apr/apr-util-1.5.4.tar.gz.md5

       tar zxvf apr-util-1.5.4.tar.gz

       cd apr-util-1.5.4

       ./configure --prefix=/usr/local/apr-util

       报错:configure: error: APR could not be located

       ./configure -with-apr=/usr/local/apr

       cd    /usr/local/httpd-2.4.18

       增加参数 apr and apr-util

       ./configure -with-apr-util=/usr/local/apr-util

       ./configure -with-apr=/usr/local/apr

       再次尝试:

       ./configure --prefix=/usr/local/apache2 --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-nonportable-atomics --enable-mods-shared=most --enable-so --enable-rewrite --enable-ssl --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/

       checking for APR-util... configure: error: the --with-apr-util parameter is incorrect.

       大小写问题:

       ./configure -with-APR-util=/usr/local/apr-util

       ./configure --prefix=/usr/local/apache2 --with-mpm=worker --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache --enable-nonportable-atomics --enable-mods-shared=most --enable-so --enable-rewrite --enable-ssl --with-apr=/usr/local/apr/ --with-APR-util=/usr/local/apr-util/

        make;

        make install;

        安装后一直再找启动文件;找了好久没找到;查看安装时候信息;

        

        cd /usr/local/apache2/bin 

       

        ./httpd -k start

      AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.116.148.100. Set the 'ServerName' directive globally to suppress this message
       (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
       no listening sockets available, shutting down

       

       端口被占用;

       cd ..

       cd conf/

       vim httpd.conf 

       listen 8080

       再尝试

       AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.116.148.100. Set the 'ServerName' directive globally to suppress this message

       访问ip:8080

      It works!

        实际上已经跑起来了。

        解决下AH00558 

        cd /usr/local/apache2/conf

        vim httpd.conf

        增加 ServerName localhost:8080

        重新尝试就可以了;

        

          

       

       

       

       

  • 相关阅读:
    3.29Java流程控制语句之循环结构
    3.27Java自动类型转化
    3.27Java流程控制语句
    3.27字符串连接符
    计算机系统概论
    《算法导论》第12章 二叉查找树 (2)查找、插入与删除
    《算法导论》第14章 数据结构的扩张 (1)动态顺序统计
    《算法导论》第12章 二叉查找树 (3)基数树
    关于算法学习的总结和感悟(原创)
    《Windows游戏编程大师技巧》二、Windows编程模型
  • 原文地址:https://www.cnblogs.com/bin-pureLife/p/5073578.html
Copyright © 2020-2023  润新知