CentOS   发布时间:2022-05-09  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Linux(CentOS 5.5)安装Apache 2.2.3大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

今天本来打算安装在Linux下安装httpd-2.2.16.tar.bz2。

从网站下载压缩包,然后开始安装:

以 Tar.bz2 为扩展名的软件包,是用Tar程序打包并用Bzip2程序进行压缩的软件包。它的优点是压缩率非常高,需要使用 “bunzip2 httpd-2.2.16.tar.bz2”进行解压。

然后cd 到解压后的目录

<>

然后执行tar xvf httpd-2.2.16.tar

./configure --prefix=/usr/local/apache --enable-so 设置安装目录和参数设置

    /usr/local/apache 为设置得安装目录

执行,结果出现报错:

configure: error: no acceptable C compiler found in $PATH

网上查找资料,说是少了gcc包,需要从安装盘上找如下包安装:

libf2c-3.3.2-1.i386.rpmlibstdc++-devel-3.3.2-1.i386.rpmglibc-kernheaders-2.4-8.36.i386.rpmglibc-headers-2.3.2-101.i386.rpmglibc-devel-2.3.2-101.i386.rpmgcc-objc-3.3.2-1.i386.rpmbinutils-2.14.90.0.6-3.i386.rpmgcc-3.3.2-1.i386.rpmgcc-c++-3.3.2-1.i386.rpmautomake14-1.4P6-7.noarch.rpm但是我的安装盘里根本找不到这些文件,我的系统是centos5.4

最后算是按照模糊搜索搜到一部分,安装,还是报同样的错误,www.linuxidc.com然后求助网友:

有高手提供方法:如果Linux联网,可以用以下命令yum -y install gcc gcc-c++

高手提供,当然得试试,结果报错:

。。。。。。。。。。。。。。。

http://ftp.nsysu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.tcc.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.cs.pu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.stu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://centos.mirror.cdnetworks.com/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://mirrors.163.com/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://cento@R_874_11163@stc.edu.cn/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://mirror01.idc.hinet.net/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.twaren.net/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.nsysu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://centos.tt.co.kr/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.tcc.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://ftp.stu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.http://mirror.khlug.org/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: Trying other mirror.SetTing up Install ProcessResolving Dependencies--> Running transaction check---> Package httpd.i386 0:2.2.3-43.el5.centos set to be updated--> Finished Dependency Resolutio

。。。。。。。。。。。。。省略部分内容。。。。。。。。。。。。。。。

Error Downloading Packages:  httpd-2.2.3-43.el5.centos.i386: failure: CentOS/httpd-2.2.3-43.el5.centos.i386.rpm from base: [Errno 256] No more mirrors to try.

继续请教高手:

高手回复:

你的Linux是可以和外网联通 可是好像无法进行域名解析。按我说的来试试echo "nameserver 8.8.8.8" > /etc/resolv.conf

然后执行yum clean all再安装yum -y install httpd

然后按照这个步骤继续安装,

..................

出现一系列下载画面

..................

成功。

启动apache:/etc/init.d/httpd start

文件在/etc/httpd/目录下

访问http://127.0.0.1:80  一切OK。

通过yum安装的版本没问题的 稳定安全。

大佬总结

以上是大佬教程为你收集整理的Linux(CentOS 5.5)安装Apache 2.2.3全部内容,希望文章能够帮你解决Linux(CentOS 5.5)安装Apache 2.2.3所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: