How To Configure YUM Server and Client In RHEL 7 …!!!

How To Configure YUM Server and Client In RHEL 7 …!!!


Yum Server Configuring

Yum server IP = 192.168.0.1
Yum server hostname = server1.example.com

First Should be flush the iptables and restart the network service :- 
1) iptables -L
2) iptables -F
3) service iptables save
4) service iptables restart
5) service network restart
6) setenforce 0

Step 1: Insert the RHEL 7.1 CD

[[email protected] Desktop]# cd /run/media/root/RHEL-7.1 Server.x86_64/Packages/

Yum server required packages

[[email protected] Packages]# rpm -ivh vsftpd*
[[email protected] Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[[email protected] Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm

Step 2 : FTP service start

[[email protected] Packages]# service vsftpd status

[[email protected] Packages]# service vsftpd start

[[email protected] Packages]# service vsftpd status

[[email protected] Packages]# chkconfig vsftpd on

Step 3: Copy the rhel6 dvd content

[[email protected] Packages]# cd

[[email protected] ~]# cp -rf /run/media/root/RHEL-7.1 Server.x86_64/  /var/ftp/pub/

[[email protected] ~]# cd /var/ftp/pub/
[[email protected] pub]# ls
RHEL-7.1 Server.x86_64

Step 4: Single mode installation createrepo

[[email protected] ~]# createrepo -v /var/ftp/pub/

[[email protected] ~]# cd /var/ftp/pub/

Step 5 : Create the repo file

[[email protected] ~]# vim /etc/yum.repos.d/server.repo
[rhel]
name=rhel7.1
baseurl=file:///var/ftp/pub
enabled=1
gpgcheck=0
 

[[email protected] ~]# yum repolist

————————————————————————————————————————–

Yum Client Repo Configuring

Yum client IP = 192.168.0.2
Yum client hostname = client1.example.com

Step 1 : Create the repo file

1) setenforce 0

[[email protected]~]# vim /etc/yum.repos.d/client.repo
[client1]
name=rhel7.1
baseurl=ftp://192.168.0.1/pub
enabled=1
gpgcheck=0

Leave a Reply

Your email address will not be published.

%d bloggers like this: