yum server

টিউন করেছেনঃ | প্রকাশিত হয়েছেঃ 12:53 AM | টিউন বিভাগঃ













Step 01: Check how many space is available on /var partition minimum 4GB space is required

[root@web ~]# df –HT /var
[root@web ~]# /

Step 02: Now mount RHEL6 DVD on mnt and copy entire disk on /var/ftp/pub

[root@web ~]# mount /dev/dvd  /mnt

mount: block device /dev/dvd is write-protected, mounting read-only

[root@rhel6 ~]# cd /mnt/
[root@rhel6 mnt]# ls
[root@rhel6 mnt]# cp –rv * /var/ftp/pub/
[root@cslit mnt]# cp -rv * /var/ftp/pub/

`EFI' -> `/var/ftp/pub/EFI'
`EFI/BOOT' -> `/var/ftp/pub/EFI/BOOT'
`EFI/BOOT/BOOTX64.conf' -> `/var/ftp/pub/EF

Step 03: Install createrepo package with dependencies

[root@rhel6 ~]#cd /var/ftp/pub
[root@rhel6 pub]#cd Packages
[root@rhel6 Packages]# ls
[root@rhel6 ~]#rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@rhel6 ~]#rpm -ivh python-deltarpm-3.5-0.5.2013git.el6.x86_64.rpm
[root@rhel6 ~]#rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm

Step 04: create yum repository

 

[root@rhel6 ~]#createrepo –v /var/ftp/Packages

1/3596 - kde-i18n-Russian-3.5.10-11.el6.noarch.rpm
2/3596 - libical-devel-0.43-5.1.el6.x86_64.rpm
3/3596 - libini_config-0.6.1-6.el6.i686.rpm
4/3596 - evolution-data-server-doc-2.28.3-15.el6.noarch.rpm

 

Step 05: Create a repo file under /etc/yum.repos.d/ directory

 

[root@rhel6 ~]#cd /etc/yum.repos.d
[root@rhel6 ~]#ls
[root@rhel6 ~]#vim server.repo

[server]
name=yum repository
baseurl=file:///var/ftp/pub/Packages
enabled=1
gpgcheck=0

 

           
YUM testing
Now we can run yum update, clean and yum list command for yum local repository testing
[root@rhel6~]#yum update
[root@rhel6~]#yum clean all
[root@rhel6~]#yum list all

Package install/remove with YUM
Yum install package-name

[root@rhel6~]#yum install http*
[root@rhel6~]#yum install http* -y


Yum remove package-name

[root@rhel6~]#yum remove http* -y

YUM group installation configuration
 
In order to enable group list feature execute the following.
 
[root@rhel6~]#createrepo -g /var/ftp/pub/repodata/ 8afad1febf2d8844a235a9ab1aa5f15c9cec1219b9d01060d4794435cf59dffe-comps-rhel6-Server.xml /var/ftp/pub/Packages/
 
The starting filename in the repodata folder can be anything but you have to select the one which ends with ‘-comps-rhel6-Server.xml’.
 
Clean all the yum cache
 
[root@rhel6~]#yum clean all
 
Make the cache again
 
[root@rhel6~]#yum makecache

Now we can views group packages with group list command 
 
[root@rhel6~]#yum grouplist

Installed Groups:
   Additional Development
   Base
   Client management tools
   X Window System
   Desktop

Yum group installation/remove command

[root@rhel6~]#yum groupinstall  'X Window System'
[root@rhel6~]#yum groupremove 'X Window System'

Yum Server Configuration

Install required packages and configuration for yum server 

[root@rhel6~]#yum install vsftpd*
[root@rhel6~]#service  vsftpd  restart
[root@rhel6~]#chkconfig  vsftpd  on  
[root@rhel6~]#service iptables stop

[root@rhel6 ~]#cd /etc/yum.repos.d
[root@rhel6 ~]#ls
[root@rhel6 ~]#vim server.repo

[server]
name=cslit yum server
baseurl=file:///var/ftp/pub/Packages
enabled=1
gpgcheck=0
:x
                                                            
Client side Configuration

[root@pc1 ~]# cd  /etc/yum.repos.d/  
[root@pc1 yum.repos.d]#ls
[root@pc1 yum.repos.d]#vim client.repo

 [client]
name=my yum client
baseurl=ftp://192.168.1.254/pub/Packages    [if you yum server IP is 254]
enabled=1
gpgcheck=0
:x



Yum Test for client

[root@pc1 ~]#yum list all
[root@pc1 ~]# yum clean all
[root@pc1 ~]# yum install vnc  

Running Transaction
Installing : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64     1/1                                                  

[root@web ~]# yum  remove  vnc -y
Running Transaction   
Erasing : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64        1/1                                                       


More YUM Command


[root@web ~]#yum search samba*
[root@web ~]#yum list installed  
[root@web ~]#yum info bind
[root@web ~]#yum list squid

Previous
Next Post »
Designed by MS Design

Powered by Blogger