<

Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

How to install Red Hat for Oracle

Published on
8,916 Points
2,916 Views
Last Modified:
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink.

Disclaimer: I have had very good luck with this procedure however: The Material may contain inaccuracies or typographical errors. I make no representations about the accuracy, reliability, completeness, or timeliness of the Material or about the results to be obtained from using the Site and the Material. The use of this Material is entirely at your own risk.

Disk Partitioning:
Due to experiences I have had with lost volumes I now separate the database files from the OS and Oracle software installs and the backups.    The below table shows the partitioning scheme that I used:
 Partitioning Info
Configure Network settings and initial users:
I assigned the static public ip’s, which are site specific to each node.  I also assigned their proxy and gateway settings as appropriate for our network. Firewall On with ssh and ftp and SE Linux On were selected because our database servers are exposed to our statewide firewall. Entered a root password and created an account for the server admin later we create the oracle user manually.

Package installation (Custom Packages):
   I have found that performing custom package selection save time later.  I selected not to install these items because we intend these servers to be Oracle Database servers only.

-Remove web servers (Oracle installs it’s own)
-Remove windows file server

   I added these two items to allow me to maintain our server inside our firewalls.
-Add FTP server
-Add Legacy Network Server
-Add Software Development, X window, GNOME & Legacy development

Connecting and finishing steps:
Here I simply followed on screen steps as presented by the RED HAT installation though rebooting and logging in as root and finishing the Red Hat installation.

Create the Oracle user and home directory:
Issue these commands to create the oracle user and its directories:
 
groupadd dba -g 501
mkdir -p /u01/home/oracle
useradd -c “Oracle Software Owner” -G dba -u 1115 –d /u01/home/oracle -m -s /bin/csh oracle
chown -R oracle:dba /u01

Open in new window

Note: On our servers we had to match the user id to be able to create files on the other systems.  On your system you may wish to use different id’s as oracle suggests in their directions.

Set the password for oracle, login as oracle
 
passwd oracle

Open in new window


FTP, and Telnet services
Perform these steps as root.
   In the text file /etc/vsftpd/vsftpd.conf I changed two lines and added 3.  Since the file is long only the two lines changed and 3 added lines are shown.
 
write_enabled=yes
anonymous_enabled=no
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES

Open in new window


Also we want the FTP, services turned on at boot time.  This is accomplished though the use of a Red Hat command as follows:

 
chkconfig --level 2345 vsftpd on

Open in new window


Next we need to configure the /etc/hosts file:
Note: It is important to enter the machines own ip and name in this file so it can find it’s self.
 
# Do not remove the following line, or various programs
# that require network functionality will fail.
172.17.2.31     db1.dep.gov     db1

Open in new window

Note: The public ip addresses that begin with 172. are site specific to our site at other locations you will have differing ip addresses.

Reboot and verify that the FTP, and Telnet services all work.  
Perform these tests as the Oracle user.

1.      Telnet in to the server to verify ssh works.
2.      Open an ftp session with the server to verify that FTP works.

Kernel system parameters:
Perform these steps as the root user.
Edit the file /etc/sysctl.conf  
 
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
# Oracle changed kernel.sysrq to 1 from 0
kernel.sysrq = 1

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# Oracle settings for cluster
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

kernel.hostname = db1.dep.gov
kernel.domainname = dep.gov
kernel.sem = 256 32000 100 150
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.shmseg = 4096
kernel.shmall = 3279547
fs.file-max = 327679
kernel.msgmni = 2878
kernel.msgmnb = 65536
net.ipv4.ip_local_port_range = 1024 65000

Open in new window


Change the Kernel.sysreq to 1
Add the lines shown after the "# Oracle settings for cluster" line.
Note that the server hostnames and domain names are different for each install in the lines:
kernel.hostname = db1.dep.gov
kernel.domainname = dep.gov

Reboot to have these take effect and verify each one by the following commands:

 
cat /proc/sys/net/core/rmem_default
cat /proc/sys/net/core/rmem_max
cat /proc/sys/net/core/wmem_default
cat /proc/sys/net/core/wmem_max
hostname
cat /proc/sys/kernel/sem
cat /proc/sys/kernel/shmmax
cat /proc/sys/kernel/shmmni
cat /proc/sys/kernel/shmall
cat /proc/sys/fs/file-max
cat /proc/sys/kernel/msgmni
cat /proc/sys/kernel/msgmnb
cat /proc/sys/net/ipv4/ip_local_port_range

Open in new window


Oracle login scripts:
Perform these steps as the oracle user.
Insure the environment variable setting by the following login scripts for both bash and csh.

Create or edit file /u01/home/oracle/ .bash_profile to have the following:
 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
ulimit -n 65536
umask 022
export PATH
unset USERNAME
export ORACLE_HOME=/u01/app/oracle/product/102
export ORACLE_SID=db1_erisdev
export PATH=/u01/app/oracle/product/102/bin:$PATH
export ORACLE_TERM=xterm

export TMPDIR=/tmp

Open in new window


Note the line export ORACLE_SID is specific to your install, as is your desired location of files.

Install Packages missed by the Red Hat install.
The Oracle Universal Installer will inform you of any missing packages needed.
I accomplished this step by copying the RedHat/RPMS directory from all of the Red Hat OS install disks to a single directory and then installed from there.  Alternately you can load each cd to determine which cd the required file is on.  A third way is to download the needed package from Red Hat Network once identified.

Use rpm –q to see which packages are already installed and then install the missing package using rpm –i
For example:
 
rpm –i sysstat-5.0.5-1.i386.rpm

Open in new window

Configure VNC server
VNC is a free program that allows you to use the X window desktop on another computer.  See www.vnc.com for vnc clients and more information

Open firewall using lokkit and enter under other with comma delimited list of port and tcp or udp.
For example :  1521:tcp 5901:tcp 1500:tcp
1521 for Oracle
5901 and 1500 for ….
Optional if you want it always on
 
chkconfig –level 345 vncserver on

Open in new window

However personally I turn it on when I want it.

Add line to /etc/sysconfig/vncservers as root
 
VNCSERVERS=”1:oracle”

Open in new window

Start the vnc server as oracle
 
vncserver :1

Open in new window

Configure vnc server by issuing these commands:
 
cd .vnc
mv xstartup xstartup.org
touch xstartup
chmod 755 xstartup

Open in new window

Edit the xstartup file in u01/home/oracle/.vnc and enter this text.
 
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -r \/u01/home/oracle/.Xresources ] && xrdb \/u01/home/oracle/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xhost localhost
PATH=$PATH:/usr/local/bin
export PATH
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Open in new window

Restart the vnc server software
The command to stop the server is
 
vncserver –kill :1

Open in new window

0
Comment
Author:NeilChak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

Suggested Articles

How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month