Linux(CentOS 5.5)安装Apache 2.2.3
2011-11-17 10:35
495 查看
今天本来打算安装在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.rpm
libstdc++-devel-3.3.2-1.i386.rpm
glibc-kernheaders-2.4-8.36.i386.rpm
glibc-headers-2.3.2-101.i386.rpm
glibc-devel-2.3.2-101.i386.rpm
gcc-objc-3.3.2-1.i386.rpm
binutils-2.14.90.0.6-3.i386.rpm
gcc-3.3.2-1.i386.rpm
gcc-c++-3.3.2-1.i386.rpm
automake14-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: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.tcc.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.stu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.mirror.cdnetworks.com/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirrors.163.com/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.ustc.edu.cn/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirror01.idc.hinet.net/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.twaren.net/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.nsysu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.tt.co.kr/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.tcc.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.stu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirror.khlug.org/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Setting up Install Process
Resolving 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社区
从网站下载压缩包,然后开始安装:
以 Tar.bz2 为扩展名的软件包,是用Tar程序打包并用Bzip2程序进行压缩的软件包。它的优点是压缩率非常高,需要使用 “bunzip2 httpd-2.2.16.tar.bz2”进行解压。
然后cd 到解压后的目录
./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.rpm
libstdc++-devel-3.3.2-1.i386.rpm
glibc-kernheaders-2.4-8.36.i386.rpm
glibc-headers-2.3.2-101.i386.rpm
glibc-devel-2.3.2-101.i386.rpm
gcc-objc-3.3.2-1.i386.rpm
binutils-2.14.90.0.6-3.i386.rpm
gcc-3.3.2-1.i386.rpm
gcc-c++-3.3.2-1.i386.rpm
automake14-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: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.tcc.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.stu.edu.tw/Linux/CentOS/5.5/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.mirror.cdnetworks.com/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirrors.163.com/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.ustc.edu.cn/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirror01.idc.hinet.net/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.twaren.net/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.nsysu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://centos.tt.co.kr/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.tcc.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://ftp.stu.edu.tw/Linux/CentOS/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror. http://mirror.khlug.org/centos/5.5/updates/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Setting up Install Process
Resolving 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社区
相关文章推荐
- 64位linux centOS 5.5 安装 Apache+Mysql+PHP+GD
- 64位linux centOS 5.5 安装 Apache+Mysql+PHP+GD
- CentOS5.5+Subversion1.6.12+Apache2.2.3安装与配置
- Linux安装(以centOS5.5为例)
- CentOS 6.3 源码安装LAMP(Linux+Apache+Mysql+Php)环境
- 使用PXE+DHCP+Apache+Kickstart无人值守安装CentOS5.5
- Linux Server 5.5安装SVN+Apache服务[转]
- CentOS 5.5 使用yum来安装 LAMP (Apache+Mysql+php5)
- CentOS环境下yum安装LAMP(Linux+Apache+Mysql+php)
- Linux(CentOS 5.5) Redis 安装及RedisPHP拓展安装应用
- Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)
- centos5.5安装redmine2.2.3
- 搭建Linux(centos5.5)+Apache2+Mysql5+Php5+zabbix1.8.5系统环境实现网络状况监控
- centos5.5 (linux)安装配置笔记
- CentOS 5.5搭建Apache+PHP5.2x+MySQL5+Zend3(yum安装)
- CentOS 5.5 安装 apache,mysql,php
- Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)
- 在Oracle (CentOS) Linux 5.5 (x32/x64)上安装Oracle 10g r2
- Linux(Centos5.5) redis 安装及redisphp拓展安装应用
- CentOS 5.5 编译安装Apache+MySQL+PHP