3. 创建用户、组、目录
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
Changingpassword for user oracle.
New UNIXpassword: oracle
BADPASSWORD: it is based on a dictionary word
Retypenew UNIX password: oracle
passwd:all authentication tokens updated successfully.
# id oracle
uid=501(oracle)gid=501(oinstall) groups=501(oinstall),502(dba)
# mkdir -p /home/u01/app/oracle
# mkdir -p /home/u01/app/oraInventory
# chown -R oracle:oinstall /home/u01/app/oracle
# chmod -R 775 /home/u01/app/oracle
4. 配置内核参数、修改环境变量
# vi /etc/sysctl.conf
添加:
kernel.shmall = 4294967296 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65500 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 262144 ~
# sysctl -p
--使内核参数生效
# su - oracle
$ vi .bash_profile
--修改oracle用户的环境配置文件
--执行:su - oracle切换到oracle用户环境,然后编辑 .bash_profile文件,更改PATH的配置,同时在环境变量中增加NLS_LANG的配置
ORACLE_BASE=/home/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 ORACLE_SID=hyl PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH
5. 设置shell限制
--添加以下参数
# 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
--在/etc/profile文件中修改以下内容
ulimit –s –c 0 >/dev/null 2> &1 修改为
ulimit –s –c unlimited >/dev/null 2> &1
6. 解压安装包
例:解压.zip
# unzip p13390677_112040_Linux-x86-64_1of7.zip
# unzip p13390677_112040_Linux-x86-64_2of7.zip
7. 图形化安装oracle、dbca建库、netca配置监听
(略)
请参考“深蓝博客”中相关文章,博客地址:http://blog.csdn.net/huangyanlong。