Set the CD to yum source tutorial

Source: Internet
Author: User
We all know that yum can be used only when connected to centos, and is limited by the network speed. In addition, RHEL needs to buy a red hat subscription account to install software and update the system online. If you use a local CD as the yum source, the speed will be faster and RHEL can also be used. 1. Insert a CD in the optical drive, or mount the iso file. 2. log on to the terminal as a root user. 3. run the following command to mount the CD: [root @ centos6 ~] #

We all know that yum can be used only when connected to centos, and is limited by the network speed. In addition, RHEL needs to buy a red hat subscription account to install software and update the system online. If you use a local CD as the yum source, the speed will be faster and RHEL can also be used.

1. Insert a CD in the optical drive or attach an iso file.

2. log on to the terminal as a root user

3. run the following command to mount the disc.

[root@centos6 ~]# mkdir /mnt/cdrom[root@centos6 ~]# mount -o ro /dev/cdrom /mnt/cdrom

4. create the text file server. repo under/etc/yum. repos. d.

[root@centos6 ~]# vim /etc/yum.repos.d/server.repo

Add the following content:

[server]name=serverbaseurl=file:///mnt/cdrom/Workstationenabled=1

The location of the baseurl depends on the location where the disk is mounted and the version released in linux.

5. test yum

[root@centos6 ~]#yum clean[root@centos6 ~]#yum list

You can see the software packages that can be installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.