Creating and syncing repositories with createrepo and reposync
It’s common that we receive an RPM file and keep it in a repository that we can use on our machine (and sometimes share it with other machines with a web server of an NFS share). It’s also common that when we start building our own RPMs, we distribute them and, to do so, we need to create a repository. To do that, we can use the createrepo tool.
First, let’s create a folder in /var/tmp
for repos:
[root@rhel-instance ~]# cd /var/tmp/ [root@rhel-instance tmp]# mkdir repos [root@rhel-instance tmp]# cd repos/
Then, let’s create a folder for Slack, a common tool to communicate with your team, and download the RPM package:
[root@rhel-instance repos]# mkdir slack [root@rhel-instance repos]# cd slack/ [root@rhel-instance repos]# curl -s -O https://downloads.slack-edge.com/releases/linux/4.25.0/prod/x64/slack-4.25.0-0.1.fc21.x86_64.rpm [root@rhel-instance slack]# ls -l total 70620 -rw-r--r...