一、安裝前準備
1.系統:oracle linux 7.4
cat /etc/oracle-release Oracle Linux Server release 7.4
2.主機名和域名
tail -1 /etc/sysconfig/network hostname Oracle
tail -1 /etc/hosts 10.0.70.28 oracle
3.關閉SELinux和 firewalld
sed -i s#SELINUX=enforcing#SELINUX=disabled#g /etc/selinux/config setenforce 0 egrep "SELINUX=disabled" /etc/selinux/config getenforce
systemctl stop firewalld.service #關閉OEL7默認防火牆 systemctl disable firewalld.service
4.更新系統至最新
yum -y update init 6
5.時間同步
crontab -e #date sync */5 * * * * /usr/sbin/ntpdate 202.120.2.101 > /dev/null 2>&
二、安裝oracle 12c
1.安裝oracle預配置包
yum install oracle-database-server-12cR2-preinstall -y
2.使內核參數生效
sysctl -p
3.配置oracle用戶環境變量
vim /home/oracle/.bash_profile export ORACLE_SID=orcl export ORACLE_BASE=/home/oracle/database export ORACLE_HOME=$ORACLE_BASE/product/12c/db_1 export PATH=/usr/sbin:$PATH export PATH=${PATH}:${ORACLE_HOME}/bin/; source /home/oracle/.bash_profile #使其生效
4.oracle官網下載oracle 12c放到/home/oracle/database目錄下,解壓
mkdir /home/oracle/database cd /home/oracle/database unzip linuxamd64_12102_database_1of2.zip unzip linuxamd64_12102_database_2of2.zip
5.以oracle用戶登錄進行安裝
cd database ./runInstaller
在該界面中輸入My Oracle Support電子郵件和My Oracle Support Password;也可以不輸入電子郵
件,並且取消“I wish to receive security updates via My Oracle Support.”,直接單擊<Next>按鈕
請根據安裝方式以及物理內存大小配置內存參數。在該頁面中默認選擇典型配置,僅需要調整內存
當進入安裝產品界面,開始創建數據庫,並且顯示安裝進度。
進行到 Oracle Database configuration 一步中的Oracle Net Configuration Assistant 時,如果彈出
打開一個終端窗口並切換到 root 用戶,按照執行配置腳本窗口提示的路徑執行腳本