CentOS 5.5操作系统
Oracle 11g R2安装手册
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
passwd oracle
mkdir -p /u01/app/oracle/product/
chown -R oracle:oinstall /u01
chmod -R 777 /u01
vi /etc/sysctl.conf
#ORACLE#####################################
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
##############################################
vi /etc/security/limits.conf
#ORACLE#####################################
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
##############################################
vi /etc/pam.d/login
#ORACLE#####################################
session required pam_limits.so
##############################################
vi /etc/profile
#ORACLE#####################################
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/csh.login
#ORACLE#####################################
if ( $USER == "oracle" ) then
limit maxproc 16384
limit deors 65536
endif
##############################################
vi /etc/selinux/config
#ORACLE#####################################
SELINUX=disabled
##############################################
vi /etc/redhat-release
将CentOS release 5 (Final)修改成Red Hat Enterprise Linux AS release 5 (Taroon)
注意1:重启前必须配置好静态IP地址
注意2:重启后使用oracle用户登录
注意1:用oracle用户解压安装包的ZIP文件;
注意2:两个压缩文件都解压到/u01下;
1、先切换到root用户,执行xhost +;
2、回到oracle用户,执行 runInstaller;
注意2:“步骤2/9”选择“仅安装数据库软件”;
注意3:“步骤9/12”如果“操作系统内核参数”有失败项,必须点“修补并再次检查”,按提示执行指定操作;
注意4:“步骤9/12”如果“程序包”有失败项,必须逐一安装;
注意5:安装完成后将补丁文件复制到/u01/app/oracle/product/ 11.2.0 /dbhome_1/lib;
注意1:执行vi ~/.bash_profile
注意2:修改后执行source ~/.bash_profile 让配置生效
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/ 11.2.0 /dbhome_1; export ORACLE_HOME
ORACLE_HOME_LISTNER=$ORACLE_HOME; export ORACLE_HOME_LISTNER
ORACLE_SID=ORACLE11G; export ORACLE_SID
ORACLE_UNQNAME=$ORACLE_SID; export ORACLE_UNQNAME
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin; export PATH
执行:/u01/app/oracle/product/ 11.2.0 /dbhome_1/bin/netca
注意1:必须先设置你的静态IP地址;
注意2:必须修改配置文件vi /etc/resolv.conf ,将里面的IP改成你的静态IP;
注意3:创建下面的文件
vi /u01/app/oracle/product/ 11.2.0 /dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/ 11.2.0 /dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
1、建议以root用户,执行chown -R oracle:oinstall /u01
2、建议以root用户,执行chmod -R 777 /u01
3、以oracle用户,执行:/u01/app/oracle/product/ 11.2.0 /dbhome_1/bin/dbca
注意1:修改vi /etc/oratab
ORACLE11G:/u01/app/oracle/product/ 11.2.0 /dbhome_1:Y
启动监听:
/u01/app/oracle/product/ 11.2.0 /dbhome_1/bin/lsnrctl start
启动数据库:
/u01/app/oracle/product/ 11.2.0 /dbhome_1/bin/dbstart $ORACLE_HOME_LISTNER
启动管理平台:
/u01/app/oracle/product/ 11.2.0 /dbhome_1/bin/emctl start dbconsole
本文出自 “大爱无疆” 博客,谢绝转载!