yum

 copy the iso image to the server by scp or ftp or samba
mkdir /mnt/iso

vim /etc/yum.repos.d/my.repo
[1]
name=rhel6
baseurl=file:///mnt/iso
enabled=1
gpgcheck=0

vim /etc/fstab
/root/rhel-server-6.7-x86_64-dvd.iso  /mnt/iso iso9660  loop,ro  0  0

mount -a

df -hT

yum repolist

——————————————————————————————————————
How to make online repository

1. Adding RPMForge Repository

Use following commands to install rpmforce repository on your CentOS/RHEL 7/6/5 systems.

CentOS/RHEL 7 x86 64bit:
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

CentOS/RHEL 6 x86 64bit:
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

CentOS/RHEL 6 x86 32bit:
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

CentOS/RHEL 5 x86 64bit:
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm

CentOS/RHEL 5 x86 32bit:
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.i386.rpm

2. Adding EPEL Repository

Use following commands to install EPEL yum repository on your CentOS/RHEL 7/6/5 systems.

CentOS/RHEL 7
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

CentOS/RHEL 6
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS/RHEL 5
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

3. Adding REMI Repository

Use following commands to install REMI yum repository on your CentOS/RHEL 7/6/5 and Fedora 21/20 systems.

CentOS/RHEL 7
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

CentOS/RHEL 6
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

CentOS/RHEL 5
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Fedora 21
# rpm -Uvh http://rpms.famillecollet.com/fedora/remi-release-21.rpm

Fedora 20
# rpm -Uvh http://rpms.famillecollet.com/fedora/remi-release-20.rpm

4. Adding ATrpms Repository

Use following commands to install ATrpms yum repository on your CentOS/RHEL 7/6/5 and Fedora 20/19 systems.

CentOS/RHEL 7 x86 64bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-7-7.el7.x86_64.rpm

CentOS/RHEL 6 x86 64bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-6-7.el6.x86_64.rpm

CentOS/RHEL 6 x86 32bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-6-7.el6.i686.rpm

CentOS/RHEL 5 x86 64bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-5-7.el5.x86_64.rpm

CentOS/RHEL 5 x86 32bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-5-7.el5.i386.rpm

Fedora 20 x86 64bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-20-7.fc20.x86_64.rpm

Fedora 20 x86 32bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-20-7.fc20.i686.rpm

Fedora 19 x86 64bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-19-7.fc19.x86_64.rpm

Fedora 19 x86 32bit:
# rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-19-7.fc19.i686.rpm

5. Adding Webtatic Repository
Use following commands to install REMI yum repository on your CentOS/RHEL 7/6/5 systems.
CentOS/RHEL 7:
CentOS/RHEL 6:
CentOS/RHEL 5:
# rpm -Uvh http://repo.webtatic.com/yum/el5/latest.rpm
——————————————————————————————————————
Installing the IUS repository is a matter of downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with our Cloud Server instances.CentOS 5.x
wget https://centos5.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

CentOS 6.x
wget https://centos6.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

CentOS 7.x
wget https://centos7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm
——————————————————————————————————————
Red Hat 5.x
wget https://rhel5.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

Red Hat 6.x
wget https://rhel6.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

Red Hat 7.x
wget https://rhel7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm

——————————————————————————————————————
You install the Remi repository by downloading the appropriate RPM package for your system and installing it. The following instructions use the 64-bit packages that work with Cloud Servers instances.

CentOS and Red Hat Enterprise Linux 5.x
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm

CentOS and Red Hat Enterprise Linux 6.x
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm

CentOS and Red Hat Enterprise Linux 7.x
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

sudo rpm -Uvh remi-release-7*.rpm

——————————————————————————————————————
subscription-manager register;subscription-manager repos;subscription-manager subscribe;subscription-manager subscribe –auto

[root@LDAP ~]# subscription-manager register
Username: rafishaik
Password:
The system has been registered with ID: a10ade9d-d1f8-48ae-b1cb-551b2b7ee5d4
[root@LDAP ~]# subscription-manager repos
This system has no repositories available through subscriptions.

[root@LDAP ~]# subscription-manager subscribe

All installed products are covered by valid entitlements. No need to update subscriptions at this time.

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@LDAP ~]# subscription-manager subscribe –auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

Advertisements
Posted in: yum

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s