Hardware Requirements
To check out your recommended hardware requirements, login to the CentOS 6.2 Linux Server box as the bozzuser and verify the below list:How much memory:
$ grep -i memtotal /proc/meminfo
results: should be at least 1GB
How much swap:
$ grep -i swaptotal /proc/meminfo
results:
- should be 1.5 the size of memtotal if memtotal < 2GB
- should be equal to memtotal if memtotal is between 2GB and 8GB
- should be .75 the size of memtotal if memtotal > 8GB
What processor type:
$ grep "model name" /proc/cpuinfo
results: informational
How much available RAM and swap:
$ free
results: informational
How much shared memory available:
$ df -k /dev/shm
results: informational
purpose: The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer.
How much disk space in /tmp:
$ df -k /tmp
results: should have at least 400MB available
How much disk space for Oracle binaries:
$ df -k
results: Depending on installation type you should have between 1.5GB and 3.5GB
Software Requirements
To check out your recommended software requirements, login to the CentOS 6.2 Linux Server box as the bozzuser and verify the below list:What distribution and version of Linux is installed:
$ cat /proc/version
results: Linux version 2.6.32-220.2.1.el6.x86_64 (mockbuild@c6-x8664-build.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) )
#1 SMP Fri Dec 23 02:21:33 CST 2011
What version of the kernel is installed:
$ uname -r
results: 2.6.32-220.2.1.el6.x86_64Ensure that the following packages are installed:
$ rpm -q compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel
$ rpm -q glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel
$ rpm -q libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
if some of this packages are missing then install them
$ sudo yum install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel
$ sudo yum install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel
$ sudo yum install libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel
also install unzip package:
$ sudo yum install unzip
Install Steps
- Login in as bozz user
- Create Oracle's user and groups
- Create groups oinstall & dba:
- Create the oracle user and set its password:
- Check if nobody user exists, this user is almost always created on a base CentOS installation:
- Configure some kernel parameters. The following kernel parameters must be validated and possibly changed. Use the commands given below to view a particular kernel setting and then change it if the setting is lower than the recommendation given here. The changed parameters are in bold in my case.
- Verify kernel parameters:
- Make the changes permanent by editing the archive /etc/sysctl.conf file. This is given as an example only and does not reflect the results obtained above by the sysctl commands. Only add lines that are needed and do not change any values to be lower than the base installation might have assigned. In my case I only change the following settings on /etc/sysctl.conf:
- Apply the changes now:
- Setting shell limits for the oracle user
- Edit the file /etc/security/limits.conf:
- Edit /etc/pam.d/login:
- Create a new profile archive at /etc/profile.d/custom.sh:
- Creating necessary directories to install the Oracle Software
- Check if you have enough space on disk and choose a directory to install:
- Create subdirectories and give permissions to the oracle user:
- Logout, login as oracle user (don't forget ssh -Y oracle@SERVER) and set the environment for the installation by adding the following to ~/.bash_profile: :
- Ensure oracle user is using an X Windows System. For example you can install and execute xterm:
- Start the database installer (you should be able to see a X11 Windows with the Oracle database installation wizard on your client Desktop environment):
$ cd /tmp/database $ ./runInstaller
NOTE: I assume you already had the database installer on the server. If not then copy the installer archives to the server via scp and uncompress them: - Optionally specify email address to be informed about security issues
- Choose "Install database software only", click "Next"
- Choose "Single instance database installation", click "Next"
- Add another language besides of English if you wish, click "Next"
- Choose 'Enterprise Edition' and on "Select options" choose the components you wish to install, click "Next"
- Set the following settings and click "Next":
- verify Oracle Base: '/opt/app/oracle'
- verify Oracle Home: '/opt/app/oracle/product/11.2.0/db_1'
- Verify path of inventory directory: '/opt/app/oraInventory' and verify group name for install of 'oinstall', click "Next"
- Prerequisite Checks: the installer will verify the system environment and report on any issues it may find. If all goes well you will get the status of 'Succeeded' for every check. You have to check 'Ignore All' but ensure at least that the following checks pass:
- Physical memory (also Available)
- Free space
- User and groups existence
- Group membership
- Hard and soft limits
- Architecture
- Kernel version
- OS Kernel parameters
- Swap size
- Run level.
- Packages
- Users with same ID
- Summary: This screen give a summary of the installation you are about to perform. Click and expand the products being installed to give you an idea of the what product and version is going to be installed.
- validate 'Global Settings' for directories
- validate 'Space Requirements'
- Click NEXT
- Install: This screen gives a status of what is being installed. If all system settings have been properly set and all packages been installed properly then this should proceed without error.
- Note the time it takes for specific products. If you notice one hanging or taking a long amount of time (greater than 10 minutes) you could have a condition that requires a pre-installation patch. Don't stop the installer yet but instead start looking for a bug / patch for the Oracle 11g installation process and the actual product being installed.
- Execute configuration scripts, when the wizard ask it:
- open up a different terminal window
- login as the bozz user
- run:
- click OK
$ sudo /opt/app/oraInventory/orainstRoot.sh $ sudo /opt/app/oracle/product/11.2.0/db_1/root.sh
- Cleanup: If you downloaded the software from the net you can now remove .zip file and the complete directory structure you unzipped it to.
- Final setup: Add the following lines to oracle's $HOME/.bash_profile archive. This will allow you to execute various Oracle binaries to create databases, configure network settings, and generally manage the Oracle database environment:
$ sudo groupadd oinstall
$ sudo groupadd dba
$ sudo useradd -m -g oinstall -G dba -s /bin/bash oracle
$ sudo passwd oracle
$ id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)
if this user doesn't exists then use the following command to create it:
$ sudo useradd nobody
# semaphores: semmsl, semmns, semopm, semmni
$ sysctl -a | grep kernel.sem
results should be >= than:
kernel.sem = 250 32000 100 128
$ sysctl -a | grep kernel.shm
results should be >= than:
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
$ sysctl -a | grep file-max
results should be >= than:
fs.file-max = 6815744
$ sysctl -a | grep ip_local_port_range
results should be >= than:
net.ipv4.ip_local_port_range = 9000 65500
$ sysctl -a | grep rmem_default
results should be >= than:
net.core.rmem_default = 262144
$ sysctl -a | grep rmem_max
results should be >= than:
net.core.rmem_max = 4194304
$ sysctl -a | grep wmem_default
results should be >= than:
net.core.wmem_default = 262144
$ sysctl -a | grep wmem_max
results should be >= than:
net.core.wmem_max = 1048576
$ sysctl -a | grep aio-max-nr
results should be >= than:
fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
$ sudo sysctl -p
$ sudo nano /etc/security/limits.conf
and add the following:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
$ sudo nano /etc/pam.d/login
and add the following depending on the architecture:
session required /lib64/security/pam_limits.so
session required pam_limits.so
NOTE: be aware of the real location of pam_limits.so. It depens on the architecture and distro. On CentOS 6.2 64 bits /lib64/security/pam_limits.so
$ sudo nano /etc/profile.d/custom.sh
and add the following content:
#!/bin/bash
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
then add execution permissions to profile script:
$ sudo chmod +x /etc/profile.d/custom.sh
$ df -kh
$ sudo mkdir -p /opt/app/oracle/product/11.2.0
$ sudo chown -R oracle:oinstall /opt/app
$ sudo chmod -R 775 /opt/app
$ nano ~/.bash_profile
add the following line:
umask 022
export TMPDIR=$TMP
export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
exit nano (Ctrl+X) and execute oracle's .bash_profile for testing purposes:
$ source ~/.bash_profile
logout from oracle user:
$ exit
$ sudo yum install xterm
logout and login remotely again as oracle user from a Linux client machine with Desktop environment:
$ ssh -Y oracle@SERVER
test if xterm works you should be able to see a X11 Windows on your client Desktop environment, if not then enable SSH X11 Forwarding (see last step)
$ xterm
on the client run:
$ scp linux.x64_11gR2_database_1of2.zip oracle@SERVER:/tmp
$ scp linux.x64_11gR2_database_2of2.zip oracle@SERVER:/tmp
on the server run:
$ pushd /tmp
$ unzip linux.x64_11gR2_database_1of2.zip
$ unzip linux.x64_11gR2_database_2of2.zip
$ popd
umask 022
export TMPDIR=/tmp
export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
NOTE: remember to first login as oracle user to edit the $HOME/.bash_profile archive. Finally ensure the execution permissions for this archive.Post Install
- Configure a network listener for Oracle Database on CentOS 6.2
- Creating a new Oracle 11g R2 Database on CentOS 6.2
- Create a init script to make Oracle database start automatically on system booting
No comments:
Post a Comment