Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Building Local CD yum Source in Linux system

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Build a local CD yum source

Step 1: insert the CentOS installation CD and mount the CD to the specified location The command is as follows: [root@localhost ~] # mkdir / mnt/cdrom# create the cdrom directory as the mount point of the CD [root@localhost ~] # mount-t iso9660 / dev/cdrom1 / mnt/cdrom/mount: block device / dev/sr0 is write-protected mounting read-only# mount the CD to the / mnt/cdrom directory step 2: create a new bak directory and move the * .repo files to the backup folder for backup Because only files with the extension "* .repo" can be used as yum source configuration files. Of course, you can delete several other yum source profiles, but if you delete them, there will be no reference files when you want to use the network as the yum source. The command is as follows: [root@localhost ~] # cd / etc/yum.repos.d/ [root@localhost yum.repos.d] # mv * .repo backup/ step 3: modify the CD Yum source configuration file CentOS-Media.repo Modify it according to the following method: [root@localhost ~] # vim / etc/yum.repos.d/backup/CentOS-Media.repo [c6-media] name=CentOS-$releasever-Mediabaseurl= file:///media/CentOS_6.6_Final/ file:///media/cdrom/ file:///dev/cdrom1gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 step 4: clear the yum cache [root@localhost yum.repos. D] # yum clean all loaded plug-in: fastestmirror Refresh-packagekit, securityCleaning repos: demo Clean everything step 5: download the server's packet information to the local computer and cache it [root@localhost yum.repos.d] # yum makecache has loaded plug-ins: fastestmirror, refresh-packagekit, securityDetermining fastest mirrorsdemo | 4.0 kB 00:00. Demo/group_gz | 216kB 00:00... Demo/filelists_db | 6.0 MB 00:00... Demo/primary_db | 4.5 MB 00:00... Demo/other_db | 2.8MB 00:00... Metadata cache has been established

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 285

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report