Get CentOS 7 Reading Installation Repository from your DVD with No Internet Connection

Step1: vim /etc/yum.repos.d/CentOS-Base.repo

Step2: Go to the end of the file

Type in the following

Make sure the cd/dvd media is mounted on /media/cdrom
This tells yum to check /media/cdrom for the repository.

Note: If your cd/dvd media was auto-mounted. It’s likely at somewhere like:

/run/media/pier/”CentOS 7 x86_64″

Thus you should modify the line baseurl accordingly.

baseurl=file:///run/media/pier/"CentOS 7 x86_64"

Step 3: For the other repositories in the file, add
to disable all the other repositories. This is important particularly if you do not have internet connection. Else when yum tries to access the web-based repositories,  yum update will fail.

Step 4: yum update

You should be able to install stuff from the repository now. ie. yum -y install vim


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s