Company

Advanced Search
Home | General Database | Platform | Articles | Scripts | Online Documentation
Back

Articles

Date 2010-03-05 22:23:18
Component Linux
Title Creating an OEL installation server
Version > 5.0
Problem
Creating an Oracle Enterprise Linux (OEL) installation server (YUM repository)
 
This document will describe how you can easily setup an Oracle Enterprise Linux installation server. Benefits of an installation server are the following:
·        One server contains all the packages for an Oracle Enterprise Linux installation
·        No need to burn the downloaded ISO files to multiple CD’s or a single DVD.
·        With the help of PXE boot in combination with kickstartfiles it’s possible to have unattended OEL installations
The steps in this document will cover the following topics:
·        Installation of Oracle Enterprise Linux for the Installation server itself
·        Configuration of the Apache webserver
·        Configuration of the YUM repository
·        Installation and configuration of the DHCP server
·        Configuration of the PXE-boot server
Solution
Installation of Oracle Enterprise Linux for the Installation Server
 
This paragraph will describe the steps that have to taken, to install the Installation Server.
1.      Download Oracle Enterprise Linux from http://edelivery.oracle.com/linux. At this moment the highest available version is OEL 5 update 4. For the installation server, I choose the 32 bit DVD (Enterprise Linux Release 5 Update 4 for X86 (32 Bit) - DVD).
 
2.      Once this ISO image is downloaded, burn this ISO image to a DVD, with a DVD burn program.
 
3.      Insert the DVD in the DVD player of the installation server you wish to use as the installation server.
 
4.      Install OEL with the settings you like. Make sure you also install the webserver package.
 
5.      After the installation the system will be rebooted.
 
6.      Disable the firewall that is installed. Use the following command for this:
# chkconfig iptables off        
# service iptables stop
 
Another option is to configure the firewall to allow http (port 80) traffic.
7.      We’re not going to use SELinux, so to disable this, edit the file /etc/sysconfig/selinux. Change the parameter SELINUX from enforcing to disable. A reboot of the system is required to activate this setting.
 
Configuration of the Apache webserver
 
1.      Make sure that the webserver get’s started after reboot of the server:
# chkconfig httpd on
 
Start the webserver:
          
# service httpd start
 
2.      That’s all for the configuration of the webserver for now.
 
Configuration of the YUM repository
 
1.      Make sure you have enough diskspace to contain different versions of OEL (32 & 64 bit). Create the directories YUM-repository/OEL5u4_i386:
# mkdir -p /YUM-repository/OEL5u4_i386
 
2.      Copy the content of the downloaded DVD to this directory:
# cp –pr /misc/cd/* /YUM-repository/OEL5u4_i386
 
3.      Create a softlink in the DocumentRoot (/var/www/html) of the Apache webserver to the newly created YUM repository:
# ln -s /YUM-repository/OEL5u4_i386 OEL5u4_i386
 
4.      Go with a webbrowser to the URL http://<installation_servername or IP-address>/OEL5u4_i386 to check if the directory is reachable.
 
5.      It’s now possible to use this YUM repository for the installation of OEL.
 
6.      You can do the same for the 64 bit version of OEL 5 update 4 and Oracle VM 2.2.
 
Installation and configuration of the DHCP server
 
1.      Install the DHCP server package. This package can be found in the yum repository. Go to the directory /YUM-repository/OEL5u4_i386/Server and install the package with the rpm command:
# cd /YUM-repository/OEL5u4_i386/Server/
# rpm -ivh dhcp-3.0.5-21.el5.x86_64.rpm
warning: dhcp-3.0.5-21.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:dhcp                   ########################################### [100%]
 
2.      Configure the file /etc/dhcpd.conf similar to the following example:
#   DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style none;
allow booting;
allow bootp;
 
subnet 192.168.0.0 netmask 255.255.255.0 {
 
        option routers                  192.168.0.1;
        option subnet-mask              255.255.255.0;
 
        option domain-name              "example.com";
        option domain-name-servers      192.168.0.1;
 
        range dynamic-bootp 192.168.0.200 192.168.0.240;
        default-lease-time 21600;
        max-lease-time 43200;
 
        next-server 192.168.0.250;
        filename "pxelinux.0";
}
 
The meaning of all the parameters is the following:
 
ddns-update-style: Setting this parameter to none, means that we do not update a dynamic DNS server, once we have assigned an ip-address to a particular server.
 
allow booting: Allows booting from this server.
 
allow bootp: Allows the server to request to bootp queries.
 
subnet: defines the network subnet that the DHCP server is allowed to assign addresses to.
 
option routers: specifies the default gateway that the requesting server is assigned.
 
option subnet-mask: specifies the subnet mask for the requesting server.
 
option domain-name: adds the domain-name as specified to the requesting server.
 
option domain-name-servers: gives the requesting server the ip-address of the domain-servers.
 
range dynamic-bootp: specifies the range that can be used for DHCP and bootp request.
 
default-lease-time: specifies the time in seconds of the lease if the requesting client does not ask for  a specific expiration time.
 
max-lease-time: specifies the time in seconds of the lease if the requesting client dos ask for a specific expiration time.
 
next-server: specifies the name of ip-address of the server that contains the initial boot file.
 
filename: specifies the name of the initial boot file.
 
3.      Start the DHCP server and make sure that it’s started at boottime:
# service dhcpd start
Starting dhcpd:                                            [ OK ]
# chkconfig dhcpd on
 
4.      Configuration of the DHCP server is done.
 
Configuration of the PXE-boot server
 
1.      Install the tftp package from the YUM repository:
# cd /YUM-repository/OEL5u4_i386/Server/
# rpm -ivh tftp-server-0.49-2.0.1.x86_64.rpm
warning: tftp-server-0.49-2.0.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:tftp-server            ########################################### [100%]
 
2.      Configure the tftp server to start at boottime. This must be done by changing the file /etc/xinetd.d/tftp. Change the line disable = yes to disable =no.
 
3.      Start the tftp server by restarting xinetd:
 
# service xinetd restart
Stopping xinetd:                                           [ OK ]
Starting xinetd:                                           [ OK ]
 
4.      Copy the files /usr/lib/syslinux/pxelinux.0 and /usr/lib/syslinux/menu.c32 , which are part of the syslinux RPM, to the directory /tftpboot:
 
# cp -p /usr/lib/syslinux/pxelinux.0 /tftpboot/
# cp –p /usr/lib/syslinux/menu.c32 /tftpboot/
 
5.      Copy the files vmlinuz and initrd.img from the directory /YUM-repository/OEL5u4_i386/isolinux to the directory /tftpboot:
 
# cd /YUM-repository/OEL5u4_i386/isolinux
# cp -p vmlinuz /tftpboot/vmlinuz_OEL5u4_i386
# cp –p initrd.img /tftpboot/initrd.img_OEL5u4_i386
 
6.      Do the same for Oracle VM.
 
7.      Create the directory /tftpboot/pxelinux.cfg:
 
# mkdir /tftpboot/pxelinux.cfg
 
8.      In the newly created directory create the file default with the following content:
 
DEFAULT menu.c32
PROMPT 0
 
MENU TITLE -+ OEL & OVM PXE Boot Menu +-
 
LABEL OEL5u4_i386
        MENU LABEL OEL5u4 i386
        kernel vmlinuz_OEL5u4_i386
        append initrd=initrd.img_OEL5u4_i386 ramdisk_size=10000
 
LABEL OEL5u4_x86_64
        MENU LABEL OEL5u4 x86_64
        kernel vmlinuz_OEL5u4_x86_64
        append initrd=initrd.img_OEL5u4_x86_64 ramdisk_size=10000
 
LABEL OVM2.2
        MENU LABEL OVM2.2 Oracle VM Server 2.2
        kernel vmlinuz_OVM2.2
        append initrd=initrd.img_OVM2.2 ramdisk_size=10000
 
When the a new system is booted a menu will be shown with the 3 options from above.
 
 

 
Installing a new server
 
Make sure that your server is in the same subnet as your installation server. In this example we’re going to do an installation of an Oracle Enterprise Linux 5 update 4 32 bit on a system with 1 CPU, 1 GB memory, a SCSI harddisk of 8 GB and one network card.
1.      Boot the server and make sure that PXE boot is enabled for the network card.
 
 
2.      After a while a ip-address is assigned to the server and the bootmenu is shown. Choose the option OEL5u4 i386:


3.      Follow the steps you normally take when installing a new server. When asked for the Installation Method, choose the option HTTP. Fill in the required network settings and when asked for the HTTP Setup, use the ip-address or name of the installation server (in my case that’s 192.168.0.250) for the Web site name. As the Enterprise Linux directory you use the link you’ve created earlier in the DocumentRoot of the webserver (in my case that’s OEL5u4_i386). After you’ve selected the OK button, the installation will continue.
 
4.      From now you can finish the installation as you normally would, when installing Oracle Enterprise Linux. The complete installation will be done from the installation server.
 
 

© RACHelp 2010 | About me | Disclaimers | Contact