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@rhel8 ~]# cd /var/tmp/ [root@rhel8 tmp]# mkdir repos [root@rhel8 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@rhel8 repos]# mkdir slack [root@rhel8 repos]# cd slack/ [root@rhel8 repos]# curl -s -O https://downloads.slack-edge.com/linux_releases/slack-4.12.2-0.1.fc21.x86_64.rpm [root@rhel8 slack]# ls -l total 62652 -rw-r--r--. 1 root 64152596 feb 14 18:12 slack-4.12.2-0.1.fc21.x86_64.rpm
Now we have...