Add Oracle users and groups for Oracle Database 10g installation.
For a typical Oracle 10g installation, two groups and an Oracle user need to be added.
groupadd -g 499 oinstall; groupadd -g 502 dba; useradd -u 499 -p oracle -g oinstall -G dba oracle;
Configure kernel parameter for database installation.
Ideally, you could write a script that would check the existing kernel parameter settings. If any of the kernel parameters were set higher than the value recommended by Oracle for the installation, the value would not be changed. If the value of the parameter was lower than the recommended minimum value, you would adjust it to meet the required threshold.
The following example simply sets some of the values that needed to be changed on a test server:
echo "# " >> /etc/sysctl.conf echo "# Required for Oracle 10g " >> /etc/sysctl.conf echo "# " >> /etc/sysctl.conf echo "kernel.shmall = 2097152" >> /etc/sysctl.conf echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf echo "kernel.shmmni = 4096" >> /etc/sysctl.conf echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf echo "fs.file-max = 65536" >> /etc/sysctl.conf echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf /sbin/sysctl -p
See the Oracle Database 10g installation documentation for more details on the configuration of kernel parameters.
Set environmental variables for database installation.
When a user logs in, the .bash_profile in their home directory (typically /home/<username>) is executed and environmental variables such as ORACLE_BASE, ORACLE_HOME, and PATH variables are set.
echo "ORACLE_BASE=/oracle/home" >> /home/oracle/.bash_profile echo "ORACLE_HOME=/oracle/home/OraHome_1" >> /home/oracle/.bash_profile echo "export ORACLE_HOME ORACLE_BASE" >> /home/oracle/.bash_profile echo "PATH=$PATH:$ORACLE_HOME/bin" >> /home/oracle/.bash_profile echo "export PATH"
There are a variety of other variables that you might want to set in a user’s .bash_profile. For instance, you may also want to set JAVA_HOME or other variables depending upon your installation and the user’s responsibilities.
Other pre-installation tasks. You could add a number of additional verification/configuration steps to the script to perform the following:
- Check that sufficient memory is installed
- Verify that the amount of swap spaced configured meets minimum requirements
- Check for sufficient disk space and in various directories (e.g. /tmp) to accommodate the installation in question
- Confirm that required software packages are installed
- Create directories required for the Oracle Database installation