redhat 4 安装 Oracle 10g

必须安装包
binutils-2.15.92.0.2-13.EL4
compat-db-4.1.25-9
compat-libstdc++-296-2.96-132.7.2
control-center-2.8.0-12
gcc-3.4.3-22.1.EL4
gcc-c++-3.4.3-22.1.EL44
glibc-2.3.4-2.9
glibc-common-2.3.4-2.9
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-22.1
libstdc++-devel-3.4.3-22.1
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
setarch-1.6-1

用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle

创建文件夹
mkdir -p /u01/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01

修改系统参数
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

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 ~/.bash_profile
ORACLE_BASE=/u01
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=orcl
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$PATH:$ORACLE_HOME/bin
export PATH NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID

CONTROL_FILE_RECORD_KEEP_TIME和LOG_ARCHIVE_LOCAL_FIRST

CONTROL_FILE_RECORD_KEEP_TIME
表示控制文件里可重复使用的记录所能保存的最小天数。如果新增加一条记录到控制文件可以重复使用的部分,这时最老的记录尚没有超出最小保留天数,那么记录将控制文件的这一部分将扩展。如果将该参数设置为0,那么控制文件可以重复使用的部分将永远不会扩展。
注意,这个参数只应用于控制文件中可循环利用的部分,如归档日志文件,各种备份记录。不应用于诸如数据文件,表空间,重做线程等,这些内容只有当其从对应的表空间中删除后才能重用。

LOG_ARCHIVE_LOCAL_FIRST
specifies when the archiver processes (ARCn) transmit redo data to remote standby database destinations.(11g中不建议使用)可选值:true/false
true
Directs the ARCn process to transmit redo data after the online redo log file has been completely and successfully archived to at least one local destination. This is the default value.
Because the online redo log files are archived locally first, the LGWR process reuses the online redo log files much earlier than would be possible if the ARCn processes archived to the standby database concurrently with the local destination. This behavior is useful when archiving to remote destinations that use a slow network connection, such as a long-distance wide area network (WAN).
false
Directs the ARCn process to transmit redo data at the same time the online redo log file is archived to the local destinations. This results in redo data being promptly dispatched to the remote standby database destination.
Setting LOG_ARCHIVE_LOCAL_FIRST to false is most useful for faster network connections, such as high-speed local area networks (LAN).