YUM:
A repository needs to be created for yum.
Create .repo file & copy it in etc/yum.repos.d
For details refer #man5 yum.conf
SERVER CONFIGURATION:
1. Copy all CD contents into /var/ftp/pub
#cp -vr /media/RHEL6/* /var/ftp/pub/
2. Install vsftpd & createrepo package from the DVD .
3. Restart vsftpd service
#/etc/init.d/vsftpd restart
4 # createrepo -v /var/ftp/pub/Packages
5 Create a file base.repo in /etc/yum.repos.d
[This file is optional. Required only if some rpm is to be installed on the server using Yum]
Entry in file:
[base]
baseurl = ftp://192.168.0.33/pub/Packages
enabled = 1
gpgcheck =0
5. Restart daemon //Only in RHEL5
/etc/init.d/yum-updatesd restart
6. On server vsftpd should be running
# service vsftpd start
CLIENT CONFIGURATION:
yum install<daemon name>
But before this you need to have base.repo file
vim /etc/yum.repos.d/base.repo
[base]
name=Test
baseurl=ftp://192.168.0.254/pub/rhel6/dvd/Server
gpgcheck=0
Note: If gpgcheck=1 , then gpgfile to check signatures should be provided
gpgfile=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# yum install <package name> Will install the package
# yum install \* --> This will install everything
# yum update To update all packages
# yum update <package name> ----> To update selected package
# yum provides <file_path> --->> Shows which package provides that file.
# yum clean all --->> To clean all packages in yum cache
# yum -y remove *.* ---> this will remove everything
# yum list nfs ---> this will list package
# yum list all --> To list all packages available
# yum grouplist
# yum groupinstall <group_name>
vim /etc/yum.conf:
IMP fields.
cachedir
Directory where yum should store its cache and db files. The
default is ‘/var/cache/yum’
keepcache
reposdir
debuglevel
Debug message output level. Practical range is 0-10. Default is
‘2’.
errorlevel
Error message output level. Practical range is 0-10. Default is
‘2’.
logfile
Location of log file for yum client
gpgcheck
Default setting for checking signature on packages.
metadataexpire
Expiration time of the metadata of packages on yum server
saved on yum client
No comments:
Post a Comment