To install Local yum server or yum client on Centos 6 & Centos 7 ( Also in Redhat 6 )
We are using 2 system , 1 for server & 2 for client system.
Yum Server IP Address : 192.168.1.2
Client OS : Centos 6.4 & 7
Client IP Address : 192.168.1.3
SERVER SIDE :- 192.168.1.2
Insert Your Centos DVD in server CD/DVD rom .
# mount /dev/cdrom /mnt/
# cd /mnt/
# cd Packages/
# rpm -ivh vsftpd-2.2.2-11.el6_3.1.i686.rpm
warning: vsftpd-2.2.2-11.el6_3.1.i686.rpm: Header V3 RSA/SHA1 Signature, key ID
c105b9de: NOKEY
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
# service vsftpd restart
# chkconfig vsftpd on
# rpm -ivh libxml2-python-2.7.6-8.el6_3.4.i686.rpm
# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm
# mkdir /var/ftp/pub/Packages
# cp -ar /mnt/Packages/*.* /var/ftp/pub/Packages
{note :- remove or rename to all older repositories }
# vi /etc/yum.repos.d/yum.repo
[YumServer]
name=Packages
baseurl=file:///var/ftp/pub/Packages (note:- We are using '///' in server )
gpgcheck=0
enabled=1
:wq
# setsebool -P ftp_home_dir on
# vi /etc/sysconfig/iptables
[...]
-A INPUT -p udp -m state --state NEW --dport 21 -j ACCEPT
-A INPUT -p tcp -m state --state NEW --dport 21 -j ACCEPT
[...]
:wq
# createrepo -v /var/ftp/pub/Packages
# yum clean all
# yum update
CLIENT SIDE :- 192.168.1.3
# vi /etc/yum.repos.d/yum.repo
[YumServer]
name=Packages
baseurl=ftp://192.168.1.2/pub/Packages (note:- We are using '//' in client )
gpgcheck=0
enabled=1
:wq
# yum update
enjoy your yum server ......
No comments:
Post a Comment