Fi awọn idii Sọfitiwia sori ẹrọ nipasẹ aṣẹ YUM nipa lilo CentOS 6/5 Fifi sori DVD/CD
Ọpa Yum nlo awọn ibi ipamọ ori ayelujara lati intanẹẹti lati fi sori ẹrọ, imudojuiwọn ati yọ awọn idii sọfitiwia labẹ awọn eto Linux. O jẹ ọpa oluṣakoso package aiyipada fun CentOS Linux ati pe o gbọdọ sopọ si intanẹẹti lati fi sori ẹrọ ati imudojuiwọn awọn idii, laisi isopọ intanẹẹti yum aṣẹ ko ni ṣiṣẹ.
Nkan yii ṣe itọsọna fun ọ lori bawo ni o ṣe le tunto eto CentOS lati lo media/DVD fifi sori ẹrọ media bi orisun fun fifi awọn idii sọfitiwia sii, ṣugbọn rii daju pe eto CentOS rẹ ti di imudojuiwọn.
Fifi Awọn idii Sọfitiwia lati CentOS 6/5 DVD/Fifi sori ẹrọ CD sori ẹrọ nipasẹ YUM
Ni akọkọ, fi sii DVD/CD fifi sori ẹrọ CentOS rẹ ninu kọnputa cdrom ati gbe kọnputa labẹ/media/cdrom liana, nitori gbogbo ẹya CentOS 6.x/5.x ni faili CentOS-Media.repo aiyipada labẹ /etc/yum.repos .d/ti o ni ipo oke aiyipada (/ media/cdrom) ti DVD/CD ti o lo nipasẹ aṣẹ Yum lati fi awọn idii sii.
mount /dev/cdrom /media/cdrom mount: block device /dev/sr0 is write-protected, mounting read-only
Ti o ba ri ifiranṣẹ ti o jọra, lẹhinna o tumọ si pe a ti gbe ẹrọ naa ni deede bi ipo kika nikan labẹ/media/cdrom directory. Itele, ṣii faili iṣeto CentOS-Media.repo pẹlu olootu VI ki o yipada “ṣiṣẹ = 0” si “ṣiṣẹ = 1” ati fi faili naa pamọ.
[[email # vi /etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo # # This repo is used to mount the default locations for a CDROM / DVD on # CentOS-6. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c6-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c6-media [command] [c6-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Faili naa lo ipo ipo aiyipada fun Cdrom/DVD (ie/media/cdrom /) bi repo fun fifi sori ẹrọ sọfitiwia lati DVD fifi sori ẹrọ. Lati fi awọn idii sii pẹlu YUM lo aṣẹ atẹle ti o da lori ẹya CentOS rẹ. Fun apẹẹrẹ, aṣẹ atẹle yoo fi package lynx sori ẹrọ ni lilo media bi repo.
[[email # yum --disablerepo=\* --enablerepo=c6-media install lynx
[[email # yum --disablerepo=\* --enablerepo=c5-media install lynx
Loaded plugins: fastestmirror, refresh-packagekit Loading mirror speeds from cached hostfile * c6-media: Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package lynx.i686 0:2.8.6-27.el6 will be installed --> Processing Dependency: redhat-indexhtml for package: lynx-2.8.6-27.el6.i686 --> Running transaction check ---> Package centos-indexhtml.noarch 0:6-1.el6.centos will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================== Package Arch Version Repository Size ================================================================================================== Installing: lynx i686 2.8.6-27.el6 c6-media 1.3 M Installing for dependencies: centos-indexhtml noarch 6-1.el6.centos c6-media 70 k Transaction Summary ================================================================================================== Install 2 Package(s) Total download size: 1.4 M Installed size: 4.7 M Is this ok [y/N]: y Downloading Packages: ---------------------------------------------------------------------------------------------------------------- Total 527 kB/s | 1.4 MB 00:02 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : centos-indexhtml-6-1.el6.centos.noarch 1/2 Installing : lynx-2.8.6-27.el6.i686 2/2 Verifying : lynx-2.8.6-27.el6.i686 1/2 Verifying : centos-indexhtml-6-1.el6.centos.noarch 2/2 Installed: lynx.i686 0:2.8.6-27.el6 Dependency Installed: centos-indexhtml.noarch 0:6-1.el6.centos Complete!
O n niyen! Ti o ba n wa awọn aṣayan aṣẹ yum diẹ sii fun fifi sori ẹrọ ati yiyọ awọn idii, jọwọ ka nkan atẹle ti o bo awọn apẹẹrẹ iṣe ti awọn ofin yum.
Wo Tun: 20 Linux YUM awọn apẹẹrẹ pipaṣẹ.