yum-repo-sync provides one easy way to create and maintain a local repository to YUM, here you will learn how to install and use Yum-Repo-Sync.
The program basically consists of two parts, the script itself and a configuration file, the script will read the configuration file to obtain the necessary information and uses rsync to download the files.
The config file can be locate in /etc/sysconfig/yum-repo-sync, the file is very easy.
In the default installation executable is located in /usr/sbin/yum-repo-sync.
The config file is pre-configured with several repositories, but disabled per default, to enable edit the config file and change the line ENABLE_D from false to true.
If you need only one repository you can add one line ENABLE_n=”true”, the n is the sequential number of the repository.
It is not necessary to create the directory that you specify in UPDATE_DIR_n because the script itself will create the directory if it does not exist.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
tar -xzvf yum-repo-sync-<version>.tar.gz
Change to directory
Run make command
To enable auto download make a symlink in the directory /etc/cron.daily/
ln -s /usr/sbin/yum-repo-sync /etc/cron.daily/yum-repo-sync
Only install package
rpm -ivh yum-repo-sync-<version>.noarch.rpm
Use rpmbuild to rebuild the source rpm
rpmbuild --rebuild yum-repo-sync-<version>.src.rpm
To rebuild from tar.gz use command below
rpmbuild -ta yum-repo-sync-<version>.tar.gz
You can use
from source directory or
rpm -e yum-repo-sync
if you used RPM to install.