Installing An Oracle-Ready CentOS 6.2 Server

This is how to for installing an Oracle-ready Linux box with CentOS 6.2, It covers the steps involved on the preparation of an Oracle-ready server for the further installation of Oracle Database Server/Oracle Fusion Middleware Suite on a multi-role server deployment.

Requirements

  •  An USB stick with more than 4 GB of free storage
  • A 64 bits server machine with plenty RAM and HDD storage
  • Connectivity with CentOS Internet repositories or LAN mirrors
  • A Linux client machine with an installed desktop environment: CentOS, Debian, Ubuntu, etc. + Gnome, KDE, etc.

Steps

    1. Download a CentOS-6.2-x86_64-bin-DVD1.iso  (4.1GB) from the DVD mirrors or alternative download a minimal (322M), netinstall (227M), LiveCD (698M) or LiveDVD (1.6G) version. This how to uses CentOS-6.2-x86_64-bin-DVD1.iso  (4.1GB).
    2. Store the downloaded ISO into de USB key via this guide. I prefer the alternatives section with livecd-iso-to-disk script. 
    3. Connect the USB stick to one of the USB ports on the server machine and boot. Ensure that USB boot is enabled on the setup.
    4. On the CentOS installation wizard select Server and customize.
    5. Choose a wise partition schema depending on your hardware, for example 6 GB RAM + 2 x 500GB HDD:
/            ext4    60GB   
/boot    ext4    130M
/home    xfs        ~403GB
/opt    xfs        ~240GB      
/var    xfs        ~210GB
swap    swap    12GB 
    1.  On the package selection step ensure that no desktop environment is selected and ensure that ssh is installed. Select any additional package you want.
    2. Choose a complex root password.
    3. Once the OS installation is completed, reboot, login as root and ensure that ssh is working via:
$ ssh localhost
    1. By default, the eth0 network interface is disabled. Configure networking settings:
      1. Login as root
      2. Edit the archive /etc/sysconfig/network-scripts/ifcfg-eth0  and configure the network interface to look like:
DEVICE="eth0"
HWADDR="00:1C:C0:95:59:55"
NM_CONTROLLED="yes"
ONBOOT="yes"
NETWORK=192.168.192.0
NETMASK=255.255.255.0
IPADDR=192.168.192.201
GATEWAY=192.168.192.1
DNS1=192.168.192.2
DNS2=192.168.192.2
PEERDNS="yes"
      1. Restart networking daemon and test for connectivity with ping or other tool.
    1. Add a sudoer user -for example bozz- to avoid the use of root
      1. Login as root
      2. Create a new user and add it to wheel group:
$ adduser -G wheel bozz
      1. Reset the password for bozz user (NOTE: choose a password you won't forget):
$ passwd bozz
      1. Edit /etc/sudoers and uncomment the line starting with %wheel, it shall look like:
%wheel  ALL=(ALL)    ALL
      1. Logout, login again with  bozz user and test sudoer's privileges:
$ sudo ls -hal
NOTE: From now, I only use the bozz user instead of root. You can also (optionally) disable the root account from remote access for security reasons.
    1. Login as bozz user
    2. Configure CentOS repositories via LAN mirrors:
      1. Ensure you can connect to the LAN mirror, example: http://mirrors.home.dev/centos
$ pushd /tmp
$ wget http://mirrors.home.dev/centos
$ popd
      1. Create a new repo file at /etc/yum.repos.d/CentOS-Mirror.repo
$ sudo nano /etc/yum.repos.d/CentOS-Mirror.repo
      1. Append the following entries pointing to the mirror:
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.home.dev/centos/$releasever/os/$basearch/
gpgcheck=0
 
#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.home.dev/centos/$releasever/updates/$basearch/
gpgcheck=0

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.home.dev/centos/$releasever/extras/$basearch/
gpgcheck=0
      1. Comment or delete existing repository archives
        • comment every line of /etc/yum.repos.d/CentOS-Base.repo with #
        • or just:
        • delete the repository file
$ sudo rm /etc/yum.repos.d/CentOS-Base.repo
        • Update the system using the mirror:
    $ sudo yum update
        1. Install Java JRE 7u1 64 bit on the server [Not required for Oracle Database, required for Oracle Fusion Middleware Suite]:
          1. Goto http://www.oracle.com/technetwork/java/javase/downloads/index.html and download jre-7u1-linux-x64.rpm
          2. Copy jre-7u1-linux-x64.rpm to the server via scp or other. Via scp from the Linux client:
      $ scp jre-7u1-linux-x64.rpm bozz@SERVER:~/
          1. Login into server and run installer:
      $ sudo rpm -Uvh jre-7u1-linux-x64.rpm
          1. Make use of Java JRE absolute version (/usr/java/jre1.7.0_01) in the alternatives configuration for java and javaws:
      $  sudo alternatives --install /usr/bin/java java /usr/java/jre1.7.0_01/bin/java 20000
      $  sudo alternatives --install /usr/bin/javaws javaws /usr/java/jre1.7.0_01/bin/javaws 20000
      
          1. Ensure the correct java version:
      $ java -version
      java version "1.7.0_01"
      Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
      Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
          1. Ensure that the alternatives is properly configured:
      $ alternatives --config java
      There is 1 program that provides 'java'.
      
          Selection    Command
        -----------------------------------------------
        *+ 1           /usr/java/jre1.7.0_01/bin/java
      
        Enter to keep the current selection[+], or type selection number: 
       
      $ alternatives --config javaws
      
        There is 1 program that provides 'javaws'.
      
          Selection    Command
        -----------------------------------------------
        *+ 1           /usr/java/jre1.7.0_01/bin/javaws
      
      
          1. Configure JRE_HOME system-wide environment variable. Edit /etc/environment:
      $ nano /etc/environment
          1. Append the following content:
      export JRE_HOME=/usr/java/jre1.7.0_01
      
          1. Logout and login again and test if JRE_HOME environment variable is correct:
      $ echo $JRE_HOME
      /usr/java/jre1.7.0_01
      
      $ ls -1 $JRE_HOME
      bin
      COPYRIGHT
      lib
      LICENSE
      man
      plugin
      README
      release
      THIRDPARTYLICENSEREADME.txt
      Welcome.html
      
      
          1. Prepare the CentOS server for installing Oracle products without sacrifice performance with a graphical environment. Oracle Fusion Middleware products use an X11 graphical environment on installation wizards. So the  SSH X11 Forwarding should be installed and enabled.
            1. On the server, edit /etc/ssh/sshd_config:
        $ sudo nano  /etc/ssh/sshd_config
            1. Set the following values:
        X11Forwarding yes
        X11DisplayOffset 10
        X11UseLocalhost yes
        
            1. On the server, install the packages  xorg-x11-xauth and libXtst:
        $ sudo yum install xorg-x11-xauth libXtst
            1. On the client, install the fontconfig packages xorg-x11-fonts-base and liberation-fonts:

              for a CentOS client:
        $ sudo yum install xorg-x11-fonts-base liberation-fonts
              for Ubuntu client:
        $ sudo apt-get install xfonts-base ttf-liberation
            1. On the client, try to login to the remote server using "-Y" option:
        $ ssh -Y bozz@SERVER
            1. Remotely logged, try to run your X program, such as the xterm or other:
        $ sudo yum install xterm
        $ xterm
              And you shall see the X program pop up in your local desktop. You can also add the following into your

        $HOME/.ssh/config

              :
        ForwardAgent yes
        ForwardX11 yes
        ForwardX11Trusted yes
        
               

          References

          Share this page:

          0 Comment(s)