HOW TO CONFIGURE A YUM SERVER FOR LOCAL NETWORKS

How to Configure a YUM server for local networks

Server
OS = CentOS 6.7 64 BIT
IP = 172.16.120.8

Client
OS = CentOS 6.7 64 BIT
IP = 172.16.149.1

PACKAGE REQUIRED :
Vsftpd
CentOS ISO


“Lines written between \\--\\ are comments.”

Server machine:


[root@TEST-SRV ~]# mount -o loop Centos-6.7.iso /mnt
[root@TEST-SRV ~]# yum install vsftpd
[root@TEST-SRV ~]# cp -rf /mnt/* /var/ftp/pub \\You can choose any directory\\
[root@TEST-SRV ~]# mkdir /home/bkp
[root@TEST-SRV ~]# mv /etc/yum.repos.d/Centos* /home/bkp \\Move every repo from this location to bkp directory\\

Open the vsftpd config file and Do the following Changes
[root@TEST-SRV ~]# vi /etc/vsftpd/vsftpd.conf
**********************************
local_enable=YES
anon_upload_enable=YES
chown_uploads=YES
chown_username=daemon
************************************
\\ If you used a different directory place of pub then in vsftpd.conf write the below line
anon_root=/dir_path     \\

\\Make changes and confirm the above lines.\\

[root@TEST-SRV ~]# gedit /etc/yum.repos.d/server.repo
******************************
[server]
name=Centos-6.7
baseurl=ftp://172.16.120.8/pub
enable=1
gpgcheck-0
*********************************
[root@TEST-SRV ~]# service vsftpd start

Starting vsftpd for vsftpd:                                      [ OK ]
[root@TEST-SRV ~]# yum clean metadata
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos:server
2 metadata files removed
1 sqlite files removed
0 metadata files removed

[root@TEST-SRV ~]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos:server
Cleaning up Everything
Cleaning up list of fastest mirrors

[root@TEST-SRV ~]# yum list all  \\If you see the list of rpms then you are on the right way\\
Available Packages
389-ds-base.x86_64 1.2.11.15-60.el6 server
389-ds-base-libs.x86_64 1.2.11.15-60.el6 server
ElectricFence.x86_64 2.2.2-28.el6 server
GConf2-devel.x86_64 2.28.0-6.el6 server
ImageMagick.x86_64 6.7.2.7-2.el6 server
ImageMagick-c++.x86_64 6.7.2.7-2.el6 server
MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 server
NetworkManager-openswan.x86_64 0.8.0-8.el6 server
ORBit2-devel.x86_64 2.14.17-5.el6 server
OpenEXR-libs.x86_64 1.6.1-8.1.el6 server
OpenIPMI.x86_64 2.0.16-14.el6 server
OpenIPMI-libs.x86_64 2.0.16-14.el6 server
PyGreSQL.x86_64 3.8.1-2.el6 server
PyKDE4.x86_64 4.3.4-5.el6 server
PyPAM.x86_64 0.5.0-12.el6 server
(OUTPUT IS SHORTEN )

Now go to client machine


[root@TEST-SRV ~]# mkdir /home/bkp
[root@TEST-SRV ~]# mv /etc/yum.repos.d/Centos* /home/bkp  \\Move any other repo also\\
[root@TEST-SRV ~]# scp root@172.16.120.8:/etc/yum.repos.d/server.repo /etc/yum.repos.d/
\\Copy the same repo or make it.\\
[root@TEST-SRV ~]# yum clean metadata
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos:server
2 metadata files removed
1 sqlite files removed
0 metadata files removed

[root@TEST-SRV ~]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos:server
Cleaning up Everything
Cleaning up list of fastest mirrors

[root@TEST-SRV ~]# yum list all     \\You will see the list of rpms.\\
Available Packages
389-ds-base.x86_64 1.2.11.15-60.el6 server
389-ds-base-libs.x86_64 1.2.11.15-60.el6 server
ElectricFence.x86_64 2.2.2-28.el6 server
GConf2-devel.x86_64 2.28.0-6.el6 server
ImageMagick.x86_64 6.7.2.7-2.el6 server
ImageMagick-c++.x86_64 6.7.2.7-2.el6 server
MySQL-python.x86_64 1.2.3-0.3.c1.1.el6 server
NetworkManager-openswan.x86_64 0.8.0-8.el6 server
ORBit2-devel.x86_64 2.14.17-5.el6 server
(OUTPUT IS SHORTEN )

FEEL FREE TO MAIL ME AT :




No comments:

Post a Comment