Configuring Yum Server
Step 1:
package vsftpd is not installed
Step 2:
[root@ns1 CentOS]# rpm -ivh vsftpd-2.0.5-16.el5_4.1.i386.rpm
warning: vsftpd-2.0.5-16.el5_4.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
[root@ns1 CentOS]#
Step 3:
You can also use .iso file without extracting packages from it. So, in this case you will have to do the following instead of using cp command as shown above.
[root@ns1 CentOS]# mount -o loop CentOS-5.5-i386-bin-DVD.iso /var/ftp/pub/centos5.5
You will have to make an entry in /etc/fstab so that the contents of .iso should be available in /var/ftp/pub/rhel5.4 on your next reboot.
Step 4:
[root@ns1 yum.repos.d]# ll
total 16
-rw-r--r-- 1 root root 2245 Apr 25 2010 CentOS-Base.repo
-rw-r--r-- 1 root root 626 Apr 25 2010 CentOS-Media.repo
[root@ns1 yum.repos.d]# mv CentOS-* /root/
Step 5:
name=CentOS Base
baseurl=ftp://192.168.1.250/pub/centos5.5/
enabled=1
gpgcheck=0
You can also use the baseurl as shown below. If you choose the above you need step 6, if you choose below configuration, you need don't need step 6.
name=CentOS Base
baseurl=file:///var/ftp/pub/centos5.5/
enabled=1
gpgcheck=0
Step 6:
Shutting down vsftpd: [FAILED]
Starting vsftpd for vsftpd: [ OK ]
[root@ns1 yum.repos.d]# chkconfig vsftpd --level 345 on
Configuring yum client
Step 1:
name=CentOS Base
baseurl=ftp://192.168.1.250/pub/centos5.5/
enabled=1
gpgcheck=0
And your system is ready to send request to yum server.
Configuring Yum ServerStep 1:Check if vsftpd is installed on your system or not [root@ns1 ~]# rpm -q vsftpd package vsftpd is not installed Step 2:Insert the media and if vsftpd is not already installed on your system install it [root@ns1 ~]# cd /media/RHEL_5.4\ i386\ DVD/Server/ [root@ns1 Server]# rpm -ivh vsftpd-2.0.5-16.el5_4.1.i386.rpm warning: vsftpd-2.0.5-16.el5_4.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 Preparing... ########################################### [100%] 1:vsftpd ########################################### [100%] [root@ns1 Server]# Step 3:copy the contents of media in /var/ftp/pub/rhel5.4/. [root@ns1 Server]# cp -rvf /media/RHEL_5.4\ i386\ DVD/ /var/ftp/pub/rhel5.4/ You can also use .iso file without extracting packages from it. So, in this case you will have to do the following instead of using cp command as shown above. # mkdir /var/ftp/pub/rhel5.4 # mount -o loop rhel-server-5.4-i386-dvd.iso /var/ftp/pub/rhel5.4 You will have to make an entry in /etc/fstab so that the contents of .iso should be available in /var/ftp/pub/rhel5.4 on your next reboot. /root/rhel-server-5.4-i386-dvd.iso /var/ftp/pub/rhel5.4/ iso9660 defaults,loop 0 0 here I am assuming that your .iso image is stored in /root directory. Step 5:Create a file named base.repo in /etc/yum.repos.d with the following contents [base] name=rhel5.4 base baseurl=ftp://192.168.1.250/pub/rhel5.4/Server enabled=1 gpgcheck=0 [Cluster] name=rhel5.4 Cluster baseurl=ftp://192.168.1.250/pub/rhel5.4/Cluster enabled=1 gpgcheck=0 [ClusterStorage] name=rhel5.4 ClusterStorage baseurl=ftp://192.168.1.250/rhel5.4/ClusterStorage enabled=1 gpgcheck=0 [VT] name=rhel5.4 VT baseurl=ftp://192.168.1.250/pub/rhel5.4/VT enabled=1 gpgcheck=0 192.168.1.250 is the ip address of your system which you are configuring as yum server. You can also use the baseurl as shown below. If you choose the above you need step 6, if you choose below configuration, you need don't need step 6. [base] name=rhel5.4 base baseurl=file:///var/ftp/pub/rhel5.4/Server enabled=1 gpgcheck=0 [Cluster] name=rhel5.4 Cluster baseurl=file:///var/ftp/pub/rhel5.4/Cluster enabled=1 gpgcheck=0 [ClusterStorage] name=rhel5.4 ClusterStorage baseurl=file:///var/ftp/pub/rhel5.4/ClusterStorage enabled=1 gpgcheck=0 [VT] name=rhel5.4 VT baseurl=file:///var/ftp/pub/rhel5.4/VT enabled=1 gpgcheck=0 Step 6:You need to start vsftpd demon and mark it on at runlevel 345 so that this service starts automatically no next reboot. [root@ns1 yum.repos.d]# service vsftpd restart Shutting down vsftpd: [FAILED] Starting vsftpd for vsftpd: [ OK ] [root@ns1 yum.repos.d]# chkconfig vsftpd --level 345 on Step 6 is must if your server is going to act as a yum server for other clients. Configuring yum clientStep 1:Create a file named base.repo in /etc/yum.repos.d with the following contents [base] name=rhel5.4 base baseurl=ftp://192.168.1.250/pub/rhel5.4/Server enabled=1 gpgcheck=0 [Cluster] name=rhel5.4 Cluster baseurl=ftp://192.168.1.250/pub/rhel5.4/Cluster enabled=1 gpgcheck=0 [ClusterStorage] name=rhel5.4 ClusterStorage baseurl=ftp://192.168.1.250/rhel5.4/ClusterStorage enabled=1 gpgcheck=0 [VT] name=rhel5.4 VT baseurl=ftp://192.168.1.250/pub/rhel5.4/VT enabled=1 gpgcheck=0 And your system is ready to send request to yum server. |