How to create repository in Redhat 7 Linux
Introduction
Repository is database of application installation and up-gradation of packages which are available on different Linux distributions. The packages of distros are available on official websites or you can extract them from official CD/DVD. We can easily install, upgrade or delete packages from repository.
Step 1: Mount ISO from DVD or Folder
In order to create repository, first mount ISO image from Official DVD or download it from given websites.
# cd /root # mount -o loop RHEL-7.0 Server.x86_64-dvd.iso /mnt/ (For Redhat 7) # mount -r -t iso9660 -o loop -v rhel-server-6.4-x86_64-dvd.iso /mnt (For Redhat 6)
Step 2: Create Repository
To create repository follow the following steps.
# cd /etc/yum.repos.d/ # vi rhel7.repo [rhel7] name=Redhat baseurl=file:///mnt/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Step 3: Install Packages
Install Packages using yum command.
# yum clean all # yum install ftp httpd gcc
Leave a Reply
Want to join the discussion?Feel free to contribute!