0% found this document useful (0 votes)
19 views

Installation of Packages Through RPM or YUM by "Anuj Kumar Teotia"

This document discusses how to install packages on Linux systems using RPM and YUM. It provides commands to install, remove, query, and manage packages with RPM. It also describes how to set up a YUM server to serve packages over the network by copying packages to a shared directory, creating a repository database, and configuring YUM client systems to retrieve packages from the server.

Uploaded by

ainsean
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Installation of Packages Through RPM or YUM by "Anuj Kumar Teotia"

This document discusses how to install packages on Linux systems using RPM and YUM. It provides commands to install, remove, query, and manage packages with RPM. It also describes how to set up a YUM server to serve packages over the network by copying packages to a shared directory, creating a repository database, and configuring YUM client systems to retrieve packages from the server.

Uploaded by

ainsean
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Installation of packages through RPM or YUM

By Anuj Kumar Teotia

To install packages
[root@server ~]#rpm -i samba* vsftpd*
[root@server ~]#rpm -iv samba* vsftpd*
[root@server ~]#rpm -ivh samba* --force
[root@server ~]#rpm -ivh samba* --aid

To remove the packages


[root@server ~]#rpm -e vsftpd
[root@server ~]#rpm -e samba --nodeps

To query the packages


[root@server ~]#rpm -qa
[root@server ~]#rpm -qa | sort | less
[root@server ~]#rpm -q samba
[root@server ~]#rpm -qa samba*
[root@server ~]#rpm -qi samba
[root@server ~]#rpm -ql samba
[root@server ~]#rpm -qd samba
[root@server ~]#rpm -qc samba
[root@server ~]#rpm -qs samba

YUM SERVER
Yum server is used to solve problem of dependencies.

There are 3 steps to configure yum server


1) copy the packages
2) create repository (database)
3) create a file for yum so that yum can search repository location

Step 1)
[root@server ~]#mount /dev/cdrom /mnt
[root@server ~]#cd /mnt
[root@server ~]#ls -l
NOTE: all rpm store in four directories (1. server 2.Cluster 3.ClusterStorage 4.VT)
[root@server ~]#cd Server
[root@server Server]#ls
[root@server Server]#rpm -ivh vsftpd-2.0.5-10.el5.i386.rpm
[root@server Server]#cp -rvf /mnt/* /var/ftp/pub

Step 2)
[root@server ~]#cd /var/ftp/pub
[root@server ~]#ll

[root@server ~]#cd Server


[root@server Server]#ll
[root@server Server]#rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
[root@server Server]#cp repodata/comps-rhel5-server-core.xml .
[root@server Server]#createrepo -vg comps-rhel5-server-core.xml .

Step 3)
[root@server Server]#vim /etc/yum.repos.d/server.repo
[server]
name=server
baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

:wq

[root@server Server]#service vsftpd start


[root@server Server]#chkconfig vsftpd on

Client side configurattion


[root@client ~]#vim /etc/yum.repos.d/client.repo
[server]
name=server
baseurl=ftp://server ip/pub/Server
gpgcheck=0

:wq

Installing through yum

[root@client ~]#yum list


[root@client ~]#yum list installed
[root@client ~]#yum list installed samba*
[root@client ~]#yum install samba* vsftpd*
[root@client ~]#yum remove samba* vsftpd
[root@client ~]#yum grouplist
[root@client ~]#yum groupinstall Mail Server
[root@client ~]#yum groupremove Mail Server
[root@client ~]#cd /media/cdrom/Server
[root@client Server]#yum localinstall vsftpd*

Third party repository

Connect to the internet


Launch firefox open google.com search for EPEL EPEL- Fedora project
how to use EPEL RHEL 5 epel-release-5-4.noarch download file
Install downloaded file
[root@client ~]#yum list

You might also like