

When other CentOS repos are enabled and you specify centos-local repo, yum will always try to download latest package from repo with the latest package. Loading mirror speeds from cached hostfile Maybe run: yum groups mark convert (see man yum) Package groups available in CentOS 7 repository are: $ sudo yum group list

We’ll discuss on a working solution to this shortly. This is because by default, any package being installed will use CentOS Base repository. NOTE: Enabling the repository locally added alone is not necessary enough to let us install software packages from it. Loaded plugins: fastestmirror, langpacks, prioritiesĬleaning repos: base epel extras remi-safe updates Then do yum clean all remove cached date and update repo list $ sudo yum clean all If you used the mount point of /mnt/centos/cdrom/: Gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7īrowsing to the Web Server centos directory: For cdrom mount point /mnt/centos/cdrom/ The IP address of the server I’m using is 192.168.1.60. Gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 For repository files on http server If you used local directory mount option then configure like below.Ĭreate repository file: sudo vim /etc//centos7-local.repoĪdd contents which looks like this: This is done on Server with CentOS minimal installation, or server that you need to install packages on while pulling the packages from local repository you just added. Sudo mount /dev/cdrom /mnt/cent/cdrom Step 3: Create a repo and put it inside /etc/yum/repos.d/ directory Create a mount point and mount cdrom using the following commands: sudo mkdir -p /mnt/cent/cdrom

If you had CentOS 7 DVD ISO image on CD/DVD drive. rw-rw-r- 15 root root 1.7K RPM-GPG-KEY-CentOS-Testing-7

rw-rw-r- 17 root root 1.7K RPM-GPG-KEY-CentOS-7 The contents of the /var/www/html/centos/ directory should be as shown: $ ls -lh /var/www/html/centos7/ The output you get from last command is: mount: /dev/loop0 is write-protected, mounting read-only Sudo mount -t iso9660 -o loop CentOS-7-x86_64-Everything-2009.iso /var/www/html/centos7/ If you’re doing this on any other Linux server, replace the root directory of web server with the one provided here.Ĭreate a directory for mounting: sudo mkdir /var/www/html/centos7/ I’m using Apache server running on another CentOS server. Mount ISO image of CentOS Everything or CentOS 7 DVD ISO sudo mount -t iso9660 -o loop CentOS-7-x86_64-Everything-2009.iso /mnt/centos7Ĭonfirm it’s mounted using du or ls command: $ du -sch /mnt/centos7/*Ģ.0K /mnt/centos7/RPM-GPG-KEY-CentOS-Testing-7ĩ.6G total Mounting the ISO image file to a web server directory There are two mounting Options we can use: Mounting the ISO file to a local directory in our Linux systemĬreate a directory for mounting sudo mkdir -p /mnt/centos7 You can as well use CentOS 7 DVD ISO: curl -O Step 2: Create Mount points and Mount ISO imageĪfter downloading, we’ll have to mount it.
