实验环境的简单介绍
Vmware9.0、GNS3
系统镜像rhel-server-6.4-i386-dvd windows server 2003
实验主要是熟悉linux主要服务的配置,所有软件包将采取YUM方式安装,特殊的除外
因此我们必须先配置一个仓库源,就是要配置一个自己的repo文件,首先要将RHEL的ISO挂载到系统中
记得要点击右键选择连接,然后进入linux下进行挂载
注意挂载路径是可以自己选择的,一般不建议直接挂载到根目录下的文件夹,所以自己新建一个
然后就是要配置仓库文件了,
[root@sharecast ~]# cd /etc/yum.repos.d/ #进入配置文件目录 [root@sharecast yum.repos.d]# ls #开始只有一个默认的红帽的仓库 rhel-source.repo [root@sharecast yum.repos.d]# cp rhel-source.repo dvd.repo #我们将其进行复制,使用原来的模版 [root@sharecast yum.repos.d]# ls dvd.repo rhel-source.repo [root@sharecast yum.repos.d]# vim dvd.repo #编辑配置文件 [rhel] #这个名字可以自定义,只要不一样就行 name=Red Hat Enterprise Linux #同上 baseurl=file:#/mnt/dvd #你要安装软件包的路径,网络的直接复制过来就可以,就是你挂载的路径 enabled=1 #是否启用这个仓库,默认是开启的,1代表开启,0代表不开启 gpgcheck=1 #是否进行签名的校验 gpgkey=file:#/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release #红帽签名公钥路径 配置一下yum.conf [root@sharecast yum.repos.d]# vim /etc/yum.conf [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 #plugins=1 #将这行进行注释即可,不用管其他的 installonly_limit=3 最后就是检验一下仓库是否可以使用,我们安装一下一个FTP工具 [root@sharecast yum.repos.d]# yum install -y lftp Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package lftp.i686 0:4.0.9-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================= Package Arch Version Repository Size ======================================================================= Installing: lftp i686 4.0.9-1.el6 rhel 736 k Transaction Summary ======================================================================= Install 1 Package(s) Total download size: 736 k Installed size: 2.3 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : lftp-4.0.9-1.el6.i686 1/1 Verifying : lftp-4.0.9-1.el6.i686 1/1 Installed: lftp.i686 0:4.0.9-1.el6 Complete!像这样就代表安装成功,说明仓库可以使用。 关于yum的详细使用可以参照这个帖子看一下 http://www.cnblogs.com/chuncn/archive/2010/10/17/1853915.html