安装准备

1 物理内存大于1G

2 足够的磁盘空间

3 明确的主机名及对应hosts文件


安装pdksh因有兼容性问题需重新安装,不安装会乱码(rpm包下载)


通过yum安装支持包

yum -y install compat-libstdc* elfutils-libelf-devel* libaio-devel numactl-devel unixODBC*

调整内核参数

编辑

/etc/sysctl.conf    (内核文件)



fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 5194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
下面三行本身未注释,需要手动注释掉
#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0
sysctl -p    (使配置生效)


建立用户和组



groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle    (指定基本组,附加组)
passwd oracle    (设置密码)

建立相关目录


mkdir /opt/oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle    (对此目录权限进行更改)

添加变量

vim ~oracle/.bash_profile
umask 022
export ORACLE_BASE=/opt/oracle   oracle基本目录
exportORACLE_HOME=$ORACLE_BASE/product/11.2/db_1     oracle程序目录
export ORACLE_SID=orcl
export.UTF-8  编码
exportNLS_LANG="AMERICAN_AMERICA".ZHS16GBK
export PATH=$ORACLE_HOME/bin:$PATH
export DISPLAY=:0.0     (图形将显示在本地终端)

设置Shell限制

vim /etc/security/limits.conf      (更改oracle能够打开的进程数,将以下配置加入)
oracle soft nproc 2047       (设置进程数软限制)
oracle hard nproc 16384        (设置进程数硬限制)
oracle soft nofile 1024        (设置文件数软限制)
oracle hard nofile 65536        (设置文件数硬限制

修改/etc/pam.d/login文件加入

session required/lib/security/pam_limits.so
session required pam_limits.so

解决中文乱码(字体库同oracle文件包一起,主要为将字体库安装到相应位置)

mkdir -p /usr/share/fonts/zh_CN/TrueType    
cp /mnt/zysong.ttf /usr/share/fonts/zh_CN/TrueType/
chmod o+r /usr/share/fonts/zh_CN/TrueType/zysong.ttf

到此配置部分完成


准备安装

解压压缩包(oracle文件包

unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

切换到oracle用户-执行xhost +(表示取消所有限制)

cd database    进入解压目录
./runInstaller


通过图形界面进行安装即可