Installing Linux Packages using RPM and Yum

RPM: REDHAT PACKAGE MANAGER

rpm: its a low level utility to install/manage/erase packages

rpm -q: to query for a package (installed)
 ex: rpm -q openssh

rpm -qa : to query all installed packages
 ex: rpm -qa
     rpm -qa | grep "ssh"
rpm -q -i - package information
 ex: rpm -q -i openssh-server
rpm -q -l -- lists files installed by package
rpm -q -c -- lists only config files installed by package
rpm -q -d -- lists only document files installed by package

How to install a package:
 rpm -ivh vsftpd-2.2.2-11.el6.x86_64.rpm

How to remove a package:
 rpm -e vsftpd

yum - yellowdog updater modified

yum need repository configuration before using it for installing/updating/query packages.

1. create a file with extention '.repo' in /etc/yum.repos.d

vim /etc/yum.repos.d/hello.repo
[ftprepo]
name=its a ftp repo
baseurl=ftp://192.168.2.1/pub
enabled=1
gpgcheck=0

[cdrepo]
name=its a cd repo
baseurl=file:///media/RHEL6.3
enabled=1
gpgcheck=0

-------------------------------------------------------------
yum install <packagename> -- to instale specifed package
yum erase <packagename>
yum update <package>

yum list -- lists all packages installed and availabe
 #yum list
 #yum list | grep -v "myown"

yum info <package> -- gives information about a package
 yum info openssh-server

==============================================================
anlysing and storing logs:

location of log files: /var/log/
Configuration file: /etc/rsyslog.conf
service name :rsyslog

Comments

Popular posts from this blog

Compression Tools in Linux[TAR,gzip]

All about DataInstaller & Hrglobal.drv in Oracle Applications R12

PSU Patching step by step on RAC