首页 > 代码库 > Linux( rhel-server-7.0-x86_64)安装Oracle Database 12c Release 1
Linux( rhel-server-7.0-x86_64)安装Oracle Database 12c Release 1
1、官方下载安装包:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
linuxamd64_12102_database_1of2.zip
linuxamd64_12102_database_1of2.zip
2、创建oracle用户和组
[root@localhost]# groupadd oinstall
[root@localhost]# groupadd dba
[root@localhost]# useradd -g oinstall -G dba oracle
[root@localhost]# passwd oracle
3、创建目录
[root@localhost]# mkdir -p /oracle/
[root@localhost]# chown -R oracle:oinstall /oracle/
[root@localhost]# chmod -R 775 /oracle/
4、修改内核参数
在/etc/sysctl.conf文件下添加如下参数:
[root@localhost]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
执行/sbin/sysctl -p 使配置参数生效
[root@localhost]# /sbin/sysctl -p
5、修改用户限制
在/etc/security/limits.conf添加如下参数:
[root@localhost]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240
6、配置环境变量
在/home/oracle/ .bash_profile添加如下参数:
[oracle@ ~]$ vi .bash_profile
export ORACLE_BASE=/oracle/12c
export ORACLE_HOME=$ORACLE_BASE/db1
export ORACLE_SID=orcl12c
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
export EDITOR=/bin/vi
执行source .bash_profile使配置文件生效
[oracle@~]$ source .bash_profile
7、扩大swap空间
[root@localhost]#dd if=/dev/zero of=/home/swap bs=1024 count=16400000
[root@localhost]#mkswap /home/swap
[root@localhost]#swapon /home/swap
在/etc/fstab最后添加如下参数:
[root@localhost]#vi /etc/fstab
/home/swap swap swap default 0 0
在/etc/inittab最后添加如下参数:
[root@localhost]# vi /etc/inittab
swapon /home/swap
8、安装依赖包:
[root@localhost]# compat-libstdc++-33-3.2.3-61.x86_64.rpm
[root@localhost]# compat-libstdc++-33-3.2.3-61.i386.rpm
[root@localhost]# rpm -ivh libaio-devel-0.3.109-12.el7.i686.rpm
[root@localhost]# rpm -ivh libaio-devel-0.3.109-12.el7.x86_64.rpm
9、上传安装文件到/home/oracle/
10、用root用户打开另外一个终端,配置图形化安装(配置完成不能关闭窗口)
[root@localhost]# export DISPLAY=:0.0
[root@localhost]# xhost +
oracle用户设置环境变量
[oracle@~]$ export DISPLAY=:0.0
11、解压 安装包安装文件
[root@localhost oracle]# unzip linuxamd64_12102_database_1of2.zip
[root@localhost oralce]# unzip linuxamd64_12102_database_1of2.zip
12、检查
[oracle@~]$ cd /home/oracle/database/
[oracle@database]$ ./runInstaller -executeSysPrereqs
13、安装
[oracle@database]$ ./runinstaller