Yum server

[root@www ~]# setup

ip configuration in Linux

ip configuration in Linux1

ip configuration in Linux2

ip configuration in Linux3

ip configuration in Linux4

ip configuration in Linux5

ip configuration in Linux6

[root@www~] # vim /etc/sysconfig/network-scripts/ifcfg-eth0

ip configuration in Linux7

[root@www ~]# service NetworkManager stop

Stopping NetworkManager daemon: [ OK ]

[root@www ~]# service network restart

Shutting down loopback interface: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

[root@www ~]# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:26:22:52:6F:42
inet addr:192.168.20.34 Bcast:192.168.20.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:31

[root@www ~]# hostname http://www.mc712.com

(Do not write http://)

[root@www ~]# hostname

http://www.mc712.com

[root@www ~]# vim /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=www.mc712.com

ip configuration in Linux8

Now Insert operating System DVD

[root@www ~]# mount /dev/dvdrw /mnt

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

[root@www ~]# cd /mnt

[root@www mnt]# cd /mnt/Packages/

[root@www Packages]# rpm -ivh vsftpd-2.2.2-6.el6.i686.rpm

[root@www Packages]# rpm -ivh deltarpm*

[root@www Packages]# rpm -ivh python-deltarpm*

[root@www Packages]# rpm -ivh createrepo*

[root@www Packages]# cp -rvf .. /PacKages/ /var/ftp/pub/

wait for 10 minutes

[root@www Packages]# createrepo -v /var/ftp/pub/Packages/

wait for 5 minutes

[root@www Packages]# cd /var/ftp/pub/repodata/

[root@www repodata]# ls

xml files

[root@www repodata]# vim /etc/yum.conf

[main]

cachedir=/var/cache/yum/$basearch/$releasever

keepcache=0

debuglevel=2

logfile=/var/log/yum.log

exactarch=1

obsoletes=1

gpgcheck=0  

 plugins=1

installonly_limit=3

ip configuration in Linux9

[root@www repodata]# vim /etc/yum.repos.d/manish.repo

[server]

name=yum

baseurl=FTP://192.168.20.34/pub/Packages/

gpgcheck=0

enabled=1

ip configuration in Linux10

[root@www repodata]# service vsftpd restart

Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                 [  OK  ]

[root@www repodata]# chkconfig vsftpd on

(vsftpd will be permanent ON, if you want to permanent OFF then use #chkconfig vsftpd off).

[root@www repodata]# cd  /etc/yum.repos.d/

[root@www yum.repos.d]# ls

manish.repo  packagekit-media.repo

[root@www yum.repos.d]# rm -rf packagekit-media.repo

[root@www yum.repos.d]# cd

[root@www ~]# yum install dialog

Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package dialog.x86_64 0:1.1-9.20080819.1.el6 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package      Arch         Version                     Repository          Size
================================================================================
Installing:
dialog       x86_64       1.1-9.20080819.1.el6        InstallMedia       197 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 197 k
Installed size: 515 k

Is this ok [y/N]: y

Downloading Packages:
dialog-1.1-9.20080819.1.el6.x86_64.rpm                                       | 197 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : dialog-1.1-9.20080819.1.el6.x86_64                                           1/1

Installed:
dialog.x86_64 0:1.1-9.20080819.1.el6

Complete!