来源:
ChinaUnix博客 日期:
2008.12.23 09:28 (共有条评论)
yum的各种安装
1.光盘安装
[root@localhost ~]# mkdir /install
[root@localhost ~]# mount /dev/cdrom /mnt
[root@localhost ~]# cp -r /mnt /install
[root@localhost ~]# vi /etc/yum.repos.d/local.repo
写入如下内容:/install/Server为修改后的RPM包的路径
[rhel5-local]
name=Red Hat Enterprise Linux 5 Local Repository
baseurl=file:///install/Server
enabled=1
gpgcheck=0
[root@localhost Server]# yum install system-config-kickstart
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
rhel5-local 100% |=========================| 1.3 kB 00:00
primary.xml.gz 100% |=========================| 709 kB 00:00
rhel5-loca: ################################################## 2223/2223
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package system-config-kickstart.noarch 0:2.6.19.6-1.el5 set to be updated
--> Processing Dependency: pykickstart for package: system-config-kickstart
--> Running transaction check
---> Package pykickstart.noarch 0:0.43.1-1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
system-config-kickstart noarch 2.6.19.6-1.el5 rhel5-local 988 k
Installing for dependencies:
pykickstart noarch 0.43.1-1.el5 rhel5-local 127 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: pykickstart ######################### [1/2]
Installing: system-config-kickstart ######################### [2/2]
Installed: system-config-kickstart.noarch 0:2.6.19.6-1.el5
Dependency Installed: pykickstart.noarch 0:0.43.1-1.el5
Complete!
2.网络安装
A:[root@nihao ~]# vi /etc/yum.conf
[Base]
name=as5-base
baseurl=
gpgcheck=1
gpgkey=
把上述加入文件的最后
B:[root@nihao ~]# cd /etc/yum.repos.d/
[root@nihao yum.repos.d]# vi centos.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for
# CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS
# updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=