Install Red Hat For Oracle

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

How to install Red Hat for Oracle

By: Neil Chakrabarty ( www.thechak.net\~neil ) 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 described by other Linux system administrators of not being able to perform upgrades due to partition sizes being too small I have elected to not follow Oracles portioning recommendations in favor of a vary large root partition. The below table shows the partitioning scheme that I used: Mount Point /boot Swap / Size 100 MB 2000 MB All remaining Drive Drive A Drive B Software Raid drives A and B

Configure Network settings and initial users:


I assigned the static public ips, which are site specific to each node. I also assigned their proxy and gateway settings as appropriate for our network. No Firewall was selected because our database servers are inside our own firewall. Entered a root password but did not create any additional users as we create the oracle user manually and there is no need for other users on the database servers.

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 its 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 Details Select Telnet and deselect all the others. -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. 1

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

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 ids as oracle suggests in their directions.

FTP, and Telnet services


Perform these steps as root. Since we installed FTP, and Telnet during the custom install we now need to configure the installation. In the text file /etc/xinetd.d/telnet I changed disabled to no as shown below:
# default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. service telnet { disable = no flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID

In the text file /etc/vsftpd/vsftpd.conf I changed two lines. Since the file is long only the two lines changed are shown.
write_enabled=yes anonymous_enabled=no

Also we want the FTP, Telnet and RSH services turned on at boot time. This is accomplished though the use of a Red Hat command as follows:
chkconfig --level 2345 vsftpd on chkconfig --level 2345 telnet on

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 its self.
# Do not remove the following line, or various programs # that require network functionality will fail. 172.17.2.31 db1.dep.gov db1 1.1.1.1 int_db1.dep.gov int_db1 int-db1 172.17.2.32 db2.dep.gov db2 1.1.1.2 int_db2.dep.gov int_db2 int-db2 172.17.100.48 darwin.dep.gov darwin

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

Set the password for oracle, login as oracle


passwd oracle

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 telnet 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

Change the Kernel.sysreq to 1 Add these lines to set these kernel parameters.

Note that the node name is different for each node.

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

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/920 export ORACLE_SID=db1_erisdev export PATH=/u01/app/oracle/product/920/bin:$PATH export ORACLE_TERM=xterm export TMPDIR=/tmp

Node node specific entries:

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


setenv setenv setenv setenv ORACLE_HOME /u01/app/oracle/product/920 ORACLE_SID db1_erisdev PATH /u01/app/oracle/product/920/bin:$PATH ORACLE_TERM xterm

setenv TMPDIR /tmp

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

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 Optional if you want it always on Personally I turn it on when I want it Add line to /etc/sysconfig/vncservers as root
VNCSERVERS=1:oracle chkconfig level 345 vncserver on

Start the vnc server as oracle


vncserver :1

Configure vnc server


cd .vnc mv xstartup xstartup.org touch xstartup chmod 755 xstartup

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 & Restart the vnc server software The command to stop the server is:

vncserver kill :1 5

You might also like