# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
Set the password on the oracle account:
# passwd oracle
Ex:
passwd oracleChanging password for user oracle.
New password:
Retype new password:passwd:
all authentication tokens updated successfully.
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/
# chmod -R 775 /u01/app/oracle
+===============================================================+
# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 536870912 ->Half the size of the physical memory
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
# /sbin/sysctl -p
+===============================================================+
# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
+===============================================================+
# vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
+===============================================================+
# vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
+===============================================================+
# vi /etc/profile.d/oracle.sh
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=ora11
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin: [->沒換行]
$ORACLE_HOME/common/oracle/bin
ORACLE_TERM=xterm
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME/lib: [->沒換行]
$ORACLE_HOME/oracm/lib:/lib:/usr/lib:/usr/local/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib: [->沒換行]
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM [->沒換行]
TNS_ADMIN LD_LIBRARY_PATH CLASSPATH