Install and update software packages from a remote repository

Server Configuration

Example, creating an ftp repository:

  • First, install a ftp server:

# yum install vsftpd

  • Initialize the FTP:

# systemctl start vsftpd

  • Check that everything is fine:

Now that the FTP is running, you should verify that the FTP is added to the firewall:

In this case, is not included

# firewall-cmd –permanent –add-service=ftp

Run mount command, to see the location of the cdrom. In this case, /dev/sr0

# mount
… … …
/dev/sr0 on /run/media/castorga/RHEL-7.3 Server.x86_64 type iso9660(ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2

Now mount the cdrom in the folder created

# mount /dev/sr0 /mnt/cdrom

you must create first, the mountpoint (cdrom in this example)

Copy all the CD, DVD or ISO content to the ftp

Host Configuration

Method I : When you only know the url of the repository:

You can help yourself with an example of the man page of yum.conf

Create the file /etc/yum.repos.d/ftp.repo

# vim ftp.repo

# yum clean all

# yum repolist

Method II : Using a created .repo file:

repo file

# yum-config-manager –add-repo

Loaded plugins: langpacks, product-id
adding repo from:
grabbing file to /etc/yum.repos.d/created.repo
repo saved to /etc/yum.repos.d/created.repo

Edit the file if necessary:

# vim created.repo

# yum clean all

# yum repolist


Leave a Reply

Your email address will not be published. Required fields are marked *