[root@RHAS4 etc]# vi sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax=3000000000
kernel.shmmni=4096
kernel.shmall=2097152
kernel.sem=250 322000 100 128
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
修改/etc/sysctl.conf 文件,增加绿色字体部分内容。其中的几个参数的含义是:
shmmax 最大共享内存2GB物理内存,如果小的话可以按实际情况而定(一般为
物理内存的一半)
shmmni 最小共享内存4096KB(固定大小4096)
shmall 所有内存大小
sem 4个参数依次是SEMMSL(每个用户拥有信号量最大数),SEMMNS
(系统信号量最大数),SEMOPM(每次semopm系统调用操作数),SEMMNI(系统辛苦
量集数最大数)。(这4个参数为固定内容大小)
file-max (固定大小65536)
ip_local_port_range 端口的范围(为指定的内容)
6。设置 oracle 对文件的要求
[root@RHAS4 security]# pwd
/etc/security
[root@RHAS4 security]# vi limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
................................
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
oracle soft memlock 3145728
oracle hard memlock 3145728
# End of file
修改 /etc/security/limits.conf 文件,添加上述绿色部分内容到文件。
7。准备 Oracle 安装文件目录
[root@RHAS4 /]# mkdir -p /opt/ora9/product/9.2
[root@RHAS4 /]# mkdir /var/opt/oracle
[root@RHAS4 /]# chown oracle.dba /var/opt/oracle
[root@RHAS4 /]# chown -R oracle.dba /opt/ora9
创建Oracle 安装目录并修改所属者为 oracle, 所属组为dba
8。设置 Oracle 环境变量
[root@RHAS4 /]# su - oracle
[oracle@RHAS4 ~]$ ls -a
. .bash_history .bash_profile .emacs .kde .zshrc
.. .bash_logout .bashrc .gtkrc nss_db-compat-2.2-29.i386.rpm
[oracle@RHAS4 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export DISPLAY="172.17.11.61:0.0"
export LD_ASSUME_KERNEL=2.4.19
export ORACLE_BASE=/opt/ora9
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=NMSORA
export ORACLE_TERM=xterm
IXDBA.NET社区论坛
export NLS_LANG=AMERICAN
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/lib:/usr/lib:/usr/local/lib