標籤:oracle 12c 安裝
1、官方下載安裝包:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
linuxamd64_12102_database_1of2.zip
linuxamd64_12102_database_1of2.zip
2、建立oracle使用者和組
[[email protected]]# groupadd oinstall
[[email protected]]# groupadd dba
[[email protected]]# useradd -g oinstall -G dba oracle
[[email protected]]# passwd oracle
3、建立目錄
[[email protected]]# mkdir -p /oracle/
[[email protected]]# chown -R oracle:oinstall /oracle/
[[email protected]]# chmod -R 775 /oracle/
4、修改核心參數
在/etc/sysctl.conf檔案下添加如下參數:
[[email protected]]# 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 使配置參數生效
[[email protected]]# /sbin/sysctl -p
5、修改使用者限制
在/etc/security/limits.conf添加如下參數:
[[email protected]]# 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添加如下參數:
[[email protected] ~]$ 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使設定檔生效
[[email protected]~]$ source .bash_profile
7、擴大swap空間
[[email protected]]#dd if=/dev/zero of=/home/swap bs=1024 count=16400000
[[email protected]]#mkswap /home/swap
[[email protected]]#swapon /home/swap
在/etc/fstab最後添加如下參數:
[[email protected]t]#vi /etc/fstab
/home/swap swap swap default 0 0
在/etc/inittab最後添加如下參數:
[[email protected]]# vi /etc/inittab
swapon /home/swap
8、安裝依賴包:
[[email protected]]# compat-libstdc++-33-3.2.3-61.x86_64.rpm
[[email protected]]# compat-libstdc++-33-3.2.3-61.i386.rpm
[[email protected]]# rpm -ivh libaio-devel-0.3.109-12.el7.i686.rpm
[[email protected]]# rpm -ivh libaio-devel-0.3.109-12.el7.x86_64.rpm
9、上傳安裝檔案到/home/oracle/
10、用root使用者開啟另外一個終端,配置圖形化安裝(配置完成不能關閉視窗)
[[email protected]]# export DISPLAY=:0.0
[[email protected]]# xhost +
oracle使用者佈建環境變數
[[email protected]~]$ export DISPLAY=:0.0
11、解壓 安裝包安裝檔案
[[email protected] oracle]# unzip linuxamd64_12102_database_1of2.zip
[[email protected] oralce]# unzip linuxamd64_12102_database_1of2.zip
12、檢查
[[email protected]~]$ cd /home/oracle/database/
[[email protected]]$ ./runInstaller -executeSysPrereqs
13、安裝
[[email protected]]$ ./runinstaller