Introduction:-
YUM stands for Yellowdog Update Modifier. Yum is
used to install package in network. Yum is configured on one server
in network and client uses that the repo file to install package from
server. Yum resolves the dependency problem.
Requirement:-
- Red hat installed machine
- DVD/CD of Red Hat Enterprise Linux
Per
quest:-
- Configure IP = 192.168.1.1
- Hostname = server.rootuser.in
1] Mount the CD/DVD
[root@server ~]#
mount /dev/cdrom /mnt
2] Install required package
[root@server ~]# cd
/mnt/Server
[root@server
Server]# rpm -ivh vsftpd-2.0.5(press tab)
[root@server
Server]# rpm -ivh createrepo(press tab)
3] Copy all the content of CD/DVD under pub directory
which is automatically created when you install vsftpd package
[root@server ~]# cp
-rvp /mnt/* /var/ftp/pub/
4] Now create repository of package to Serve directory
[root@server ~]#
createrepo -g /var/ftp/pub/Server
5] Now create repo file which containthe path of yum
server
[root@server ~]#
vim /etc/yum.repos.d/anup.repo
[Server]
name
= my yum server
baseurl=ftp://192.168.1.1/pub/Server
enabled=1
gpgcheck=0
:wq
6] Set Selinux secrity related options.
[root@server ~]#
getsebool -a | grep ftp
[root@server~]#
setsebool allow_ftpd_full_access on
[root@server ~]#
setsebool ftp_home_dir on
[root@server ~]#
getsebool -a | grep ftp
7] Start the vsftpd server
[root@server ~]#
service vsftpd start
[root@server ~]#
chkconfig vsftpd on
8] Now update the yum
[root@server ~]#
yum clean all
[root@server ~]#
yum update all
9] To test Yum Server install any package the dependency
problem is must be resolved by Yum.
[root@server ~]#
yum install firefox* -y
YUM
Client Side:-
1] Check communication with server
[anup@client ~]$ ping
192.168.1.1
2] Now create the repo file which contain the path of
yum server
[anup@client ~]$ vim
/etc/yum.repos.d/client.repo
[Server]
name=my
yum server
baseurl=ftp://192.168.1.1/pub/Server
enabled=1
gpgcheck=0
:wq
3] Finall update yum
[anup@client ~]$ yum
clean all
[anup@client ~]$ yum
update all
4] Try to install package
[anup@client ~]$ yum
install firefox* -y
5] To remove package
[anup@client ~]$ yum
remove firefox* -y
No comments:
Post a Comment