*How to Configure yum on server* (with ftp server)
Before configure what will be the output of "yum list" command
Just have a look
# yum list
ommit output...
It will show only the installed packages
Now lets start to configure
before configure the yum first we will install the ftp server
Step 0
Disable selinux:
/etc/sysconfig/selinux (disabled)
Disable firefox
vi /etc/hosts
setup
service network restart
chkconfig network on
mkdir -p /var/ftp/oel6/
Step 1
*install ftp package*
-------------
(here i am asuming the cd/dvd is mounted under /media/oel6)
use following command to install ftp server
# cd /media/O*/Packages/
# rpm -iUh vsftpd*
ommit output...
# service vsftpd start ; chkconfig vsftpd on
ommit output...
Step 2
*install createrepo package*
-----------------------------
use following command to install createrepo package
# cd /media/O*/Packages/
# rpm -iUh deltarpm*
# rpm -iUh createrepo*
ommit output...
Step 3
*copy RHEL DVD into /var/ftp/rhel5/ location*
----------------------------------------------
# cp /media/O*/Packages /var/ftp/oel6/
# cp /media/O*/Server/repodata/* /var/ftp/oel6/Packages/
# cp /media/O*/Server/repodata/*comps* /var/ftp/
# cp /media/O*/Server/Tr* /var/ftp/oel6/
# cp /media/O*/Server/list* /var/ftp/oel6/
ommit output...
Step 4
*Create repository database*
----------------------------
# createrepo -vg /var/ftp/*comps* /var/ftp/oel6/Packages
output ommit...
Step 5:
*Create repository file*
-------------------------
# mv /etc/yum.repos.d/pubic-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.original
Download Oracle public YUM server configuration file:
# pwd
/etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-ol6.repo
# vim /etc/yum.repos.d/public-yum-ol6.repo
[Packages]
name=file:///var/ftp/oel6/Packages
baseurl=file:///var/ftp/oel6/Packages/
enabled=1
gpgcheck=0
[ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
:wq
Now you have done it lets check is it working?
#yum list
output ommit...
it will show list of installed [installed] and not installed [Server] packages.
Have fun!!
--------------------------------
Before configure what will be the output of "yum list" command
Just have a look
# yum list
ommit output...
It will show only the installed packages
Now lets start to configure
before configure the yum first we will install the ftp server
Step 0
Disable selinux:
/etc/sysconfig/selinux (disabled)
Disable firefox
vi /etc/hosts
setup
service network restart
chkconfig network on
mkdir -p /var/ftp/oel6/
Step 1
*install ftp package*
-------------
(here i am asuming the cd/dvd is mounted under /media/oel6)
use following command to install ftp server
# cd /media/O*/Packages/
# rpm -iUh vsftpd*
ommit output...
# service vsftpd start ; chkconfig vsftpd on
ommit output...
Step 2
*install createrepo package*
-----------------------------
use following command to install createrepo package
# cd /media/O*/Packages/
# rpm -iUh deltarpm*
# rpm -iUh createrepo*
ommit output...
Step 3
*copy RHEL DVD into /var/ftp/rhel5/ location*
----------------------------------------------
# cp /media/O*/Packages /var/ftp/oel6/
# cp /media/O*/Server/repodata/* /var/ftp/oel6/Packages/
# cp /media/O*/Server/repodata/*comps* /var/ftp/
# cp /media/O*/Server/Tr* /var/ftp/oel6/
# cp /media/O*/Server/list* /var/ftp/oel6/
ommit output...
Step 4
*Create repository database*
----------------------------
# createrepo -vg /var/ftp/*comps* /var/ftp/oel6/Packages
output ommit...
Step 5:
*Create repository file*
-------------------------
# mv /etc/yum.repos.d/pubic-yum-ol6.repo /etc/yum.repos.d/public-yum-ol6.repo.original
Download Oracle public YUM server configuration file:
# pwd
/etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-ol6.repo
# vim /etc/yum.repos.d/public-yum-ol6.repo
[Packages]
name=file:///var/ftp/oel6/Packages
baseurl=file:///var/ftp/oel6/Packages/
enabled=1
gpgcheck=0
[ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
:wq
Now you have done it lets check is it working?
#yum list
output ommit...
it will show list of installed [installed] and not installed [Server] packages.
Have fun!!
--------------------------------
No comments:
Post a Comment