1 安裝規(guī)劃
ORACLE安裝到新磁盤上,磁盤掛載到u01,d01
和d02
是符號連接,實(shí)際目錄在u01
下
參數(shù) | 值 |
---|---|
Oracle base | /d01/app/oracle |
Software location | /d01/app/oracle/product/12102/dbhome_1 |
DATAFILEDESTINATION | /d02/oradata |
RECOVERYAREADESTINATION | /d02/fast_recovery_area |
Global database name | gorcl12c |
SID | orcl12c |
2 掛載磁盤
fdisk -l # 查看實(shí)例上的數(shù)據(jù)盤fdisk -u /dev/vdb # 分區(qū)數(shù)據(jù)盤# np1..wfdisk -lu /dev/vdb # 查看新分區(qū)mkfs.ext4 /dev/vdb1cp /etc/fstab /etc/fstab.bakecho /dev/vdb1 /mnt ext4 defaults 0 0 >> /etc/fstabcat /etc/fstabmkdir /u01mount /dev/vdb1 /u01df -h
3 掛載SWAP
### ORACLE需要內(nèi)存的1/4作為swap,確認(rèn)存在swap,如果有的話swapoff /swapfileswapon -s# 確認(rèn)硬盤空間df -hal# 創(chuàng)建swap文件1024 * 16 = 16384 = 16GB(實(shí)際創(chuàng)建的時(shí)候多一點(diǎn)16384)dd if=/dev/zero of=/swapfile bs=16386 count=1024k# 格式化mkswap /swapfilechmod 0600 /swapfile# 激活swapswapon /swapfile# 確認(rèn)存在swapswapon -s
4 系統(tǒng)環(huán)境配置
系統(tǒng)配置
### ORACLE需要內(nèi)存的1/4作為swap,確認(rèn)存在swap,如果有的話swapoff /swapfileswapon -s# 確認(rèn)硬盤空間df -hal# 創(chuàng)建swap文件1024 * 16 = 16384 = 16GB(實(shí)際創(chuàng)建的時(shí)候多一點(diǎn)16384)dd if=/dev/zero of=/swapfile bs=16386 count=1024k# 格式化mkswap /swapfilechmod 0600 /swapfile# 激活swapswapon /swapfile# 確認(rèn)存在swapswapon -s
ORACLE用戶環(huán)境變量
su - oraclevim ~/.bash_profileORACLE_BASE=/d01/app/oracleORACLE_HOME=$ORACLE_BASE/product/12102/dbhome_1ORACLE_SID=orcl12cPATH=$PATH:$ORACLE_HOME/binexport ORACLE_BASE ORACLE_HOME ORACLE_SIDPATH ORACLE_SID
5 圖形化界面配置踩坑
安裝圖形化依賴與桌面系統(tǒng)
$ yum groupinstall "X Window System"# 確認(rèn)available里面的gnome名稱,下一步使用$ yum grouplist# 安裝gnome$ yum groupinstall "GNOME Desktop"#進(jìn)入圖形界面$ startx
root下執(zhí)行xdpyinfo,記錄連接字符
$ xdpyinfo | grep namename of display: :0
root下執(zhí)行(重要),默認(rèn)xwindow不允許別的用戶連接
$ xhost +
oracle下執(zhí)行dpyinfo
$ export DISPLAY=:0xdpyinfo...# 正常顯示...
這個(gè)步驟完成
5 圖形化安裝
database/runInstaller
6 圖形化創(chuàng)建數(shù)據(jù)庫
dbca
7 圖形化配置listener & tns連接數(shù)據(jù)庫
參考這篇文章配置
http://www.5lwq4hdr.cn/article/170289.htm
sqlplus sys/oracle@hostname:1521/orcl12c as sysdbasqlplus sys/oracle@tnsname as sysdba
8 啟動數(shù)據(jù)庫
select status from v$instance;startup nomountalter database mount;alter database open;
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。
新聞熱點(diǎn)
疑難解答
圖片精選