1.参考文档
http://blog.csdn.net/ljunjie82/article/details/42201473:
oracle-rdbms-server-12cR1-preinstall包适用OS版本确定
2.介质下载
(12.2.0.1.0) - Standard Edition 2 and Enterprise Edition
linuxx64_12201_database.zip
3.操作系统环境配置
- RPM包安装
For Oracle Linux 6, run the Oracle RDBMS Server 12cR1 Pre-Install RPM package (formerly known as Oracle Validated RPM). For Oracle Linux 5, run the Oracle Validated RPM.
配置本地YUM源
mkdir /media/disk
插入OEL DVD光盘
mount /dev/cdrom /media/disk
如果挂载光盘则:
scp oracle@10.3.61.13:/home/softw/CentOS-6.5-x86_64-bin-DVD1.iso /u01/soft
du -h CentOS-6.5-x86_64-bin-DVD1.iso
mount -o loop CentOS-6.5-x86_64-bin-DVD1.iso /mnt/disk/
vi /etc/yum.repos.d/oel6.repo
[oel6.5-base-media]
name=Oel-6.5 - 64bit
baseurl=file:///media/disk/Server/
gpgcheck=0
enabled=1
=
Start a terminal session and enter the following command as root
, depending on your platform. For example:
Oracle Linux 6:
# yum install oracle-rdbms-server-12cR1-preinstall
# yum install oracle-rdbms-server-12cR2-preinstall
Oracle Linux 5:
# yum install oracle-validated
检查安装日志
/var/log/oracle-validated/results/orakernel.log
注意: OEL6.5上最新的RPM是oracle-rdbms-server-11gR2-preinstall,到了OEL7才有oracle-rdbms-server-12cR1-preinstall; Oracle官方文档中指定的在OracleLinux 6上使用oracle-rdbms-server-12cR1-preinstall功能,其实应该具体指定到ORACLELinux 6U6(6.6)版本才能支持。
在OEL6.5上只能手工安装rpm包了:具体是:
yum install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libgcc libstdc++ libstdc++-devel libaio libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat
yum install xclock
- 内存等信息
To determine the distribution and version of Linux installed, enter one of the following commands:
# cat /etc/oracle-release
# cat /etc/redhat-release
# lsb_release -id
保证u01目录至少7G空间
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
df -h /tmp
free
uname -m
RAM | Swap Space |
---|---|
Between 1 GB and 2 GB | 1.5 times the size of the RAM |
Between 2 GB and 16 GB | Equal to the size of the RAM |
More than 16 GB | 16 GB |
如果安装集群的话:需要额外安装cvudisk
If you do not use an Oracle Pre-Install RPM, then you must install the
cvuqdisk
RPM. Without
cvuqdisk
, the Cluster Verification Utility cannot find shared disks, and you receive a "Package cvuqdisk not installed" error when you run the Cluster Verification Utility. Use the
cvuqdisk
RPM for your hardware (for example,
x86_64
, or
i386
).
CVUQDISK_GRP=oinstall; export CVUQDISK_GRP
# rpm -iv cvuqdisk-1.0.9-1.rpm
关闭SELinux
[root@rac1 ~]# vi /etc/selinux/config
将SELINUX 值改为 “SELINUX=disabled”.
如果原来是enabled,改为disabled,需要重启
chkconfig iptables off
chkconfig NetworkManager off
禁止防火墙在系统启动时启动
/sbin/chkconfig --level 2345 iptables off
- 用户和组
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
#如果已经创建过oracle 可以执行
/usr/sbin/usermod -g oinstall -G dba oracle
- 修改系统内核参数
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall =33554432
kernel.shmmax = 137438953472
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 = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
- 修改用户Limits
vi /etc/security/limits.conf
新增如下内容:
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
- 创建目录
mkdir -p /u01/app/
chown -R oracle:oinstall /u01/app/
chmod -R 775 /u01/app/
- 配置网络配置hosts
hostname Oracle12
vi /etc/hosts
12.3.11.120 db01
- 配置环境变量
vi ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1
export ORACLE_SID=CDB
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
- 安装
xhost +
cd ~
unzip linuxx64_12201_database.zip
cd database
./runInstaller