感谢支持
我们一直在努力

RedHat AS4上安装yum与gcc详细教程

1.RedHat AS4上如果没有安装yum,就先安装yum
[root@st ~]#wget http://img.linuxidc.com/attachments/month_1006/yum_forAS4.tar.gz 下载yum软件
[root@st ~]# tar zxvf yum_forAS4.tar.gz
yum_forAS4/
yum_forAS4/CentOS-Base.repo
yum_forAS4/python-elementtree-1.2.6-7.el4.rf.i386.rpm
yum_forAS4/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
yum_forAS4/yum-2.4.2-0.4.el4.rf.noarch.rpm
yum_forAS4/sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum_forAS4/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
[root@st ~]# cd yum_forAS4
[root@st yum_forAS4]# ls
CentOS-Base.repo
python-elementtree-1.2.6-7.el4.rf.i386.rpm
python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
[root@st yum_forAS4]# rpm -ivh *.rpm
warning: python-elementtree-1.2.6-7.el4.rf.i386.rpm: V3 DSA signature: NOKEY,
key ID 6b8d79e6
Preparing…                ########################################### [100%]
   1:sqlite                 ########################################### [ 20%]
   2:python-sqlite          ########################################### [ 40%]
   3:python-urlgrabber      ########################################### [ 60%]
   4:python-elementtree     ########################################### [ 80%]
   5:yum                    ########################################### [100%]
[root@st yum_forAS4]# cp CentOS-Base.repo /etc/yum.repos.d/
执行如下命令导入GPG Key
[root@st yum_forAS4]# rpm –import http://mirror.centos.org/centos/RPM-GPG-KEY-
CentOS-4
现在yum就可以使用了。
2.安装gcc
[root@st squid-2.5.STABLE10-20050727]# ./configure –prefix=/usr/local/squid
creating cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for mawk… no
checking for gawk… gawk
checking whether make sets ${MAKE}… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for gcc… no
checking for cc… no
configure: error: no acceptable cc found in $PATH
注:这个是未安装gcc编辑器的原因
[root@st squid-2.5.STABLE10-20050727]# yum install gcc
-bash: yum: command not found
注:这个是未安装yum的原因
现在开始安装gcc
[root@st yum_forAS4]# yum install gcc
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00   
base                      100% |=========================| 1.1 kB    00:00   
addons                    100% |=========================|  951 B    00:00   
extras                    100% |=========================| 1.1 kB    00:00   
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 158 kB    00:02   
update    : ################################################## 511/511
Added 511 new packages, deleted 0 old in 4.88 seconds
primary.xml.gz            100% |=========================| 608 kB    00:04   
base      : ################################################## 1591/1591
Added 1591 new packages, deleted 0 old in 13.19 seconds
primary.xml.gz            100% |=========================|  190 B    00:00   
Added 0 new packages, deleted 0 old in 0.01 seconds
primary.xml.gz            100% |=========================|  38 kB    00:01   
extras    : ################################################## 172/172
Added 172 new packages, deleted 0 old in 1.08 seconds
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for gcc to pack into transaction set.
gcc-3.4.6-10.i386.rpm     100% |=========================|  44 kB    00:01   
—> Package gcc.i386 0:3.4.6-10 set to be updated
–> Running transaction check
–> Processing Dependency: cpp = 3.4.6-10 for package: gcc
–> Processing Dependency: libgcc >= 3.4.6-10 for package: gcc
–> Processing Dependency: binutils >= 2.15.92.0.2-18 for package: gcc
–> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
–> Restarting Dependency Resolution with new changes.
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for binutils to pack into transaction set.
binutils-2.15.92.0.2-25.i 100% |=========================|  41 kB    00:00   
—> Package binutils.i386 0:2.15.92.0.2-25 set to be updated
—> Downloading header for libgcc to pack into transaction set.
libgcc-3.4.6-10.i386.rpm  100% |=========================|  35 kB    00:00   
—> Package libgcc.i386 0:3.4.6-10 set to be updated
—> Downloading header for glibc-devel to pack into transaction set.
glibc-devel-2.3.4-2.41.el 100% |=========================|  97 kB    00:00   
—> Package glibc-devel.i386 0:2.3.4-2.41.el4_7.1 set to be updated
—> Downloading header for cpp to pack into transaction set.
cpp-3.4.6-10.i386.rpm     100% |=========================|  37 kB    00:00   
—> Package cpp.i386 0:3.4.6-10 set to be updated
–> Running transaction check
–> Processing Dependency: glibc = 2.3.4-2.41.el4_7.1 for package: glibc-devel
–> Processing Dependency: glibc-headers = 2.3.4-2.41.el4_7.1 for package:

glibc-devel
–> Processing Dependency: glibc-headers for package: glibc-devel
–> Restarting Dependency Resolution with new changes.
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for glibc to pack into transaction set.
glibc-2.3.4-2.41.el4_7.1. 100% |=========================| 129 kB    00:00   
—> Package glibc.i686 0:2.3.4-2.41.el4_7.1 set to be updated
—> Downloading header for glibc-headers to pack into transaction set.
glibc-headers-2.3.4-2.41. 100% |=========================| 130 kB    00:00   
—> Package glibc-headers.i386 0:2.3.4-2.41.el4_7.1 set to be updated
–> Running transaction check
–> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
–> Processing Dependency: glibc-common = 2.3.4-2.41.el4_7.1 for package: glibc
–> Processing Dependency: kernel-headers for package: glibc-headers
–> Restarting Dependency Resolution with new changes.
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for glibc-common to pack into transaction set.
glibc-common-2.3.4-2.41.e 100% |=========================| 649 kB    00:04   
—> Package glibc-common.i386 0:2.3.4-2.41.el4_7.1 set to be updated
—> Downloading header for glibc-kernheaders to pack into transaction set.
glibc-kernheaders-2.4-9.1 100% |=========================|  75 kB    00:00   
—> Package glibc-kernheaders.i386 0:2.4-9.1.103.EL set to be updated
–> Running transaction check
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 gcc                     i386       3.4.6-10         base              4.4 M
Installing for dependencies:
 cpp                     i386       3.4.6-10         base              1.6 M
 glibc-devel             i386       2.3.4-2.41.el4_7.1  update            1.9 M
 glibc-headers           i386       2.3.4-2.41.el4_7.1  update            588 k
 glibc-kernheaders       i386       2.4-9.1.103.EL   base              696 k
Updating for dependencies:
 binutils                i386       2.15.92.0.2-25   base              2.9 M
 glibc                   i686       2.3.4-2.41.el4_7.1  update            6.0 M
 glibc-common            i386       2.3.4-2.41.el4_7.1  update             16 M
 libgcc                  i386       3.4.6-10         base               64 k
Transaction Summary
=============================================================================
Install      5 Package(s)       
Update       4 Package(s)       
Remove       0 Package(s)       
Total download size: 34 M
Is this ok [y/N]: y
Downloading Packages:
(1/9): libgcc-3.4.6-10.i3 100% |=========================|  64 kB    00:01   
(2/9): cpp-3.4.6-10.i386. 100% |=========================| 1.6 MB    00:10   
(3/9): glibc-devel-2.3.4- 100% |=========================| 1.9 MB    00:12   
(4/9): glibc-common-2.3.4 100% |=========================|  16 MB    01:40   
(5/9): glibc-2.3.4-2.41.e 100% |=========================| 6.0 MB    00:38   
(6/9): glibc-kernheaders- 100% |=========================| 696 kB    00:03   
(7/9): glibc-headers-2.3. 100% |=========================| 588 kB    00:05   
(8/9): binutils-2.15.92.0 100% |=========================| 2.9 MB    00:18   
(9/9): gcc-3.4.6-10.i386. 100% |=========================| 4.4 MB    00:24   
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : libgcc                       ####################### [ 1/13]
  Installing: glibc-kernheaders            ####################### [ 2/13]
  Updating  : glibc-common                 ####################### [ 3/13]
  Updating  : glibc                                                [ 4/13]
warning: /etc/localtime created as /etc/localtime.rpmnew
  Updating  : glibc                        ####################### [ 4/13]
Stopping sshd:[  OK  ]
Starting sshd:[  OK  ]
  Updating  : binutils                     ####################### [ 5/13]
  Installing: cpp                          ####################### [ 6/13]
  Installing: glibc-headers                ####################### [ 7/13]
  Installing: glibc-devel                  ####################### [ 8/13]
  Installing: gcc                          ####################### [ 9/13]
  Cleanup   : libgcc                       ####################### [10/13]
  Cleanup   : glibc-common                 ####################### [11/13]
  Cleanup   : glibc                        ####################### [12/13]
  Cleanup   : binutils                     ####################### [13/13]
Installed: gcc.i386 0:3.4.6-10
Dependency Installed: cpp.i386 0:3.4.6-10 glibc-devel.i386 0:2.3.4-2.41.el4_7.1
glibc-headers.i386 0:2.3.4-2.41.el4_7.1 glibc-kernheaders.i386 0:2.4-9.1.103.EL
Dependency Updated: binutils.i386 0:2.15.92.0.2-25 glibc.i686 0:2.3.4-
2.41.el4_7.1 glibc-common.i386 0:2.3.4-2.41.el4_7.1 libgcc.i386 0:3.4.6-10
Complete!
[root@st yum_forAS4]#

赞(0) 打赏
转载请注明出处:服务器评测 » RedHat AS4上安装yum与gcc详细教程
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏