Pages

How to install YUM server


Install nessessary package for Yum Server:
yum install createrepo httpd gnupg yum-utils expect
Create folders to storage repo package
mkdir -p /opt/repo/centos/5/i386
mkdir -p /opt/repo/centos/5/x86_64
mkdir -p /opt/repo/centos/6/i386
mkdir -p /opt/repo/centos/6/x86_64

Create repo file for CentOS 5

Vi /etc/yum.repo.d/CentOS5-Base-i386.repo

Paste content below to this file

###################################################
########## CENTOS 5 i386 ##########################
###################################################

#base for centos 5 i386#
[base.5.i386]
name=CentOS-5 i386 base repo
##mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/5.10/os/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#updates for centos 5 i386
[updates.5.i386]
name=CentOS-5 i386 update repo
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/5.10/updates/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#extras for centos 5 i386
[extras.5.i386]
name=CentOS-5 i386 extras repo
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/5.10/extras/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#CentOS Plus  for centos 5 i386
[centosplus.5.i386]
name=CentOS-5 i386 Centos Plus repo
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/5.10/centosplus/i386/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Config http server

http server always start
chkconfig --levels 2345 httpd on
vim /etc/httpd/conf/httpd.conf
ServerSignature Off
ServerTokens Prod
TraceEnable Off
Look for <Directory "/var/www/html">
You will see Options FollowSymLinks underneath it You will need to change it to Options Indexes FollowSymLinks
Save and close the config
Start the httpd service:

service httpd start
thudinh Network and Security

No comments:

Adsense

Translate