zoukankan      html  css  js  c++  java
  • Apache编译与安装 RedHat enterprises 6.2

    引自:http://blog.chinaunix.net/uid-26881541-id-3336614.html

            http://apr.apache.org/download.cgi

    命令:

    yum install wget ppl cloog-ppl mpfr cpp kernel-headers glibc-headers gibc-devel gcc-4.4.5-6

    yum install wget gcc make mysql mysql-server mysql-devel httpd php php-mysql sendmail


     apache下载地址:http://httpd.apache.org/download.cgi#apache24



    到http://httpd.apache.org/下载以源码方式安装,我下载的版本是Apache httpd 2.4.3

    解压:[root@localhost apache]# tar -jxvf httpd-2.4.3.tar.bz2

    配置环境:

    [root@localhost httpd-2.4.3]# ./configure --prefix=/usr/local/apache2  --enable-so --enable-mods-shared=all --enable-modules=most

    提示configure: error: APR not found. Please read the documentation,

    解决:
    缺少Apr,下载http://projects.apache.org/indexes/quick.html

    解压:[root@localhost apache]# tar zxvf apr-1.4.6.tar.gz

    配置环境:

    [root@localhost apr-1.4.6]# ./configure --prefix=/usr/local/apr/

    编译和安装:

    [root@localhost apr-1.4.6]#make

    [root@localhost apr-1.4.6]#make install

    编译安装完成apr之后,继续编译apache,又有如下的提示configure: error: APR-util not found.  Please read the documentation

    解决:

    缺少APR-util,http://apr.apache.org/下载

    解压: [root@localhost apache]# tar zxvf apr-util-1.4.1.tar.gz

    配置环境:

    在 [root@localhost apr-util-1.4.1]./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config时,提示configure: error: APR could not be located. Please use the --with-apr option,这是路径的问题(这个问题困扰我好久了,在这里找到了说明http://apache.jz123.cn/install.html),应该用下面的命令[root@localhost apr-util-1.4.1]./configure  --with-apr=/usr/local/

    继续编译Apache,晕啊,仍没有成功,提示如下configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

    解决:

    下载prce,网址http://sourceforge.net/projects/pcre/

    解压:unzip pcre-8.31.zip

    配置环境:

    [root@localhost pcre-8.31]#./configure --prefix=/usr/local/

    编译和安装:

    [root@localhost pcre-8.31]#make

    [root@localhost pcre-8.31]#make install

    再次编译Apache,皇天不负有心人啊,终于通过了!此时运行httpd(service httpd start),在浏览器上输入127:0:0:1,就能看到下面的了

    This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the Apache HTTP server installed at this site is working properly.

  • 相关阅读:
    如何进行Django单元测试
    django使用celery实现异步操作
    django 多并发,多线程。
    cookies设置时间
    Mysql实现企业级日志管理、备份与恢复
    Redis与Memcached的区别
    cookie 和session 的区别详解
    python内存泄露查找
    浙大月赛ZOJ Monthly, August 2014
    Vector
  • 原文地址:https://www.cnblogs.com/tdcqma/p/5035927.html
Copyright © 2011-2022 走看看