红帽redhat-6.5安装配置本地源yum(自己测试完成)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

红帽redhat6.5安装配置本地源yum(自己测试完成)1、首先在自己的电脑上安装Redhat6.5(本经验用的是Redhat6.5-64位的系统),然后把Redhat6.5系统ISO镜像文件放到自己的电脑中(我用虚拟机,就把iso上传到虚拟机)2、在根(/)下建立yum、test、test1目录,命令是:mkdir/yum/test/test1(/yum这个目录是用于ISO文件的目录,/test用于放iso,/test1用于挂载iso,挂载命令mount-oloop/test/rhel-server-6.5-x86_64-dvd.iso/test1)3、将/test1下的所有文件拷贝到/yum中,命令cp-rf/test1/*/yum4、修改/etc下yum的配置文件,在修改之前可先备份下系统自带的配置文件,用于它用。备份步骤:1、cd/etc/yum.repos.d2、ls(查看下以上目录的内容),应该只有一个文件:rhel-source.repo3、cprhel-source.reporhel-source.repo.bak4、在ls查看下是否有两个文件了。5、修改yum配置文件步骤:1、vim/etc/yum.repos.d/rhel-source.repo2、点i,进入vim编辑模式,修改红色边框内容如图片所示name:test(可以随便写)baseurl=file:///yum(这个就是你要挂在的本地目录,注意:默认文件内的是baseurl=ftp,一定要改成baseurl=file)enabled=1gpgcheck=03、:号,wq退出vim。修改后为[rhel-source]name=testbaseurl=file:///yumenabled=1gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=RedHatEnterpriseLinux$releaseverBeta-$basearch-Sourcebaseurl==0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release6、测试yumcleanall#yum清理全部yummakecache#yum生成缓存yumlist#yum列表如果没啥错误提示,就说明安装配置成功了安装yum文件需要先进入cd/yum/Packages/,在这个里面做所有yum的操作[root@localhost/]#cd/yum/Packages/[root@localhostPackages]#yuminstall安装包名举例[root@localhostPackages]#yuminstallcompat-libcap1-1.10-1.x86_64.rpmLoadedplugins:product-id,refresh-packagekit,security,subscription-managerThissystemisnotregisteredtoRedHatSubscriptionManagement.Youcanusesubscription-managertoregister.SettingupInstallProcessExaminingcompat-libcap1-1.10-1.x86_64.rpm:compat-libcap1-1.10-1.x86_64Markingcompat-libcap1-1.10-1.x86_64.rpmtobeinstalledResolvingDependencies--Runningtransactioncheck---Packagecompat-libcap1.x86_640:1.10-1willbeinstalled--FinishedDependencyResolutionDependenciesResolved========================================================================================PackageArchVersionRepositorySize========================================================================================Installing:compat-libcap1x86_641.10-1/compat-libcap1-1.10-1.x86_6429kTransactionSummary========================================================================================Install1Package(s)Totalsize:29kInstalledsize:29kIsthisok[y/N]:yDownloadingPackages:Runningrpm_check_debugRunningTransactionTestTransactionTestSucceededRunningTransactionInstalling:compat-libcap1-1.10-1.x86_641/1rhel-source/productid|1.7kB00:00...Verifying:compat-libcap1-1.10-1.x86_641/1Installed:compat-libcap1.x86_640:1.10-1Complete![root@localhostPackages]#rpm-qa|grepcompat-*[root@localhostPackages]#cd/[root@localhost/]#rpm-qa|grepcompat-*redhat-lsb-compat-4.0-7.el6.x86_64compat-libcap1-1.10-1.x86_64libreport-compat-2.0.9-19.el6.x86_64nss_compat_ossl-0.9.6-1.el6.x86_64xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64rarian-compat-0.8.1-5.1.el6.x86_64geronimo-specs-compat-1.0-3.5.M2.el6.noarchlpg-java-compat-1.1.0-4.1.el6.noarch[root@localhost/]#

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功