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.
Update the system using the mirror: Install Java JRE 7u1 64 bit on the server [Not required for Oracle Database, required for Oracle Fusion Middleware Suite]: 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.
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
- 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).
- Store the downloaded ISO into de USB key via this guide. I prefer the alternatives section with livecd-iso-to-disk script.
- 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.
- On the CentOS installation wizard select Server and customize.
- Choose a wise partition schema depending on your hardware, for example 6 GB RAM + 2 x 500GB HDD:
- On the package selection step ensure that no desktop environment is selected and ensure that ssh is installed. Select any additional package you want.
- Choose a complex root password.
- Once the OS installation is completed, reboot, login as root and ensure that ssh is working via:
- By default, the eth0 network interface is disabled. Configure networking settings:
- Login as root
- Edit the archive /etc/sysconfig/network-scripts/ifcfg-eth0 and configure the network interface to look like:
- Restart networking daemon and test for connectivity with ping or other tool.
- Add a sudoer user -for example bozz- to avoid the use of root.
- Login as root
- Create a new user and add it to wheel group:
- Reset the password for bozz user (NOTE: choose a password you won't forget):
- Edit /etc/sudoers and uncomment the line starting with %wheel, it shall look like:
- Logout, login again with bozz user and test sudoer's privileges:
- Login as bozz user
- Configure CentOS repositories via LAN mirrors:
- Ensure you can connect to the LAN mirror, example: http://mirrors.home.dev/centos
- Create a new repo file at /etc/yum.repos.d/CentOS-Mirror.repo
- Append the following entries pointing to the mirror:
- Comment or delete existing repository archives
/ ext4 60GB
/boot ext4 130M
/home xfs ~403GB
/opt xfs ~240GB
/var xfs ~210GB
swap swap 12GB
$ ssh localhost
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"
$ adduser -G wheel bozz
$ passwd bozz
%wheel ALL=(ALL) ALL
$ 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.
$ pushd /tmp
$ wget http://mirrors.home.dev/centos
$ popd
$ sudo nano /etc/yum.repos.d/CentOS-Mirror.repo
[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
- 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
$ sudo yum update
- Goto http://www.oracle.com/technetwork/java/javase/downloads/index.html and download jre-7u1-linux-x64.rpm
- Copy jre-7u1-linux-x64.rpm to the server via scp or other. Via scp from the Linux client:
- Login into server and run installer:
- Make use of Java JRE absolute version (/usr/java/jre1.7.0_01) in the alternatives configuration for java and javaws:
- Ensure the correct java version:
- Ensure that the alternatives is properly configured:
- Configure JRE_HOME system-wide environment variable. Edit /etc/environment:
- Append the following content:
- Logout and login again and test if JRE_HOME environment variable is correct:
$ scp jre-7u1-linux-x64.rpm bozz@SERVER:~/
$ sudo rpm -Uvh jre-7u1-linux-x64.rpm
$ 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
$ 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)
$ 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
$ nano /etc/environment
export JRE_HOME=/usr/java/jre1.7.0_01
$ 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
- On the server, edit /etc/ssh/sshd_config:
- Set the following values:
- On the server, install the packages xorg-x11-xauth and libXtst:
- On the client, install the fontconfig packages xorg-x11-fonts-base and liberation-fonts:
- On the client, try to login to the remote server using "-Y" option:
- Remotely logged, try to run your X program, such as the xterm or other:
$ sudo nano /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
$ sudo yum install xorg-x11-xauth libXtst
for a CentOS client:
for Ubuntu client:$ sudo yum install xorg-x11-fonts-base liberation-fonts
$ sudo apt-get install xfonts-base ttf-liberation
$ ssh -Y bozz@SERVER
And you shall see the X program pop up in your local desktop. You can also add the following into your $HOME/.ssh/config :$ sudo yum install xterm
$ xterm
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
References
- Networking on CentOS: http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-networkscripts-interfaces-eth0.html
- For Java: http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/ and http://wiki.centos.org/HowTos/JavaOnCentOS
- SSH X11 Forwarding: http://www.imminentweb.com/technologies/centos-ssh-x11-forwarding, http://wiki.centos.org/HowTos/VNC-Server and http://www.ndchost.com/wiki/server-administration/centos5-vnc-x11