oracle11g 最終版本11.2.0.4安裝詳細(xì)過(guò)程介紹
--安裝背景
上次碰到問(wèn)題,cursor:mutex S導(dǎo)致的load過(guò)高, 有說(shuō)可以升級(jí)到11.2.0.4就能避免這種問(wèn)題,所以準(zhǔn)備重新搭建新版本11.2.0.4。
安裝環(huán)境是:azure云 linux centos6.5。
1,修改內(nèi)核
1.1 修改sysctl.conf文件
[root@orcltest Downloads]# vim/etc/sysctl.conf # add by tim.man kernel.shmmax = 277495689510912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 fs.file-max = 6815744 # Controls the maximum number of shared memory segments, in pages kernel.shmall = 4294967296 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 net.core.somaxconn = 262144 net.core.netdev_max_backlog = 262144 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 262144 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_fin_timeout = 1 net.ipv4.tcp_keepalive_time = 30 net.ipv4.tcp_keepalive_probes = 6 net.ipv4.tcp_keepalive_intvl = 5 net.ipv4.tcp_timestamps = 0 fs.aio-max-nr = 1048576
1.2 使參數(shù)生效
[root@orcltest Downloads]# sysctl –p
2,增加用戶(hù)和組
[root@orcltestDownloads]# groupadd oinstall [root@orcltestDownloads]# groupadd dba [root@orcltestDownloads]# groupadd oper [root@orcltestDownloads]# useradd -g oinstall -G dba,oper oracle [root@orcltestDownloads]# passwd oracle
3,修改limits.conf限制
[root@orcltestDownloads]# vim /etc/security/limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
4,修改/etc/pam.d/login
[root@orcltestDownloads]# vim /etc/pam.d/login session required/lib64/security/pam_limits.so
5,修改bash_profile文件
(1)修改profile:
[root@orcltest Downloads]# vim /etc/profile # add by tim.man if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
(2)修改bash_profile:
[oracle@orcltest ~]$ vim .bash_profile export EDITOR=vi export ORACLE_SID=doea5db export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export INVENTORY_LOCATION=/oraInventory export LD_LIBRARY_PATH=$ORACLE_HOME/lib export NLS_LANG="American_america.zhs16gbk" export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin umask 022
使bash_profile生效:
[oracle@orcltest ~]$ source .bash_profile
6,創(chuàng)建目錄
[root@orcltest~]# mkdir /data/oracle [root@orcltest~]# chown oracle:oinstall /data [root@azure_earth_dbm1_3_112 app]# mkdir /data/oracle [root@azure_earth_dbm1_3_112 app]# mkdir /data/oraInventory [root@azure_earth_dbm1_3_112 app]# cd /oracle/app [root@azure_earth_dbm1_3_112 app]# ln -s /data/oracle oracle [root@azure_earth_dbm1_3_112 app]# ln -s /data/oraInventory oraInventory [root@azure_earth_dbm1_3_112 app]# chown -R oracle.oinstall /data [root@azure_earth_dbm1_3_112 app]# chown -R oracle.oinstall /oracle [root@azure_earth_dbm1_3_112 app]# [root@ azure_earth_dbm1_3_112 oracle]# mkdir -p /oracle/app/oracle [root@ azure_earth_dbm1_3_112 oracle]# chown -R oracle:oinstall /oracle/app/oracle [root@ azure_earth_dbm1_3_112 oracle]# chmod -R 775 /oracle/app/oracle [root@ azure_earth_dbm1_3_112 oracle]#
7,安裝rpms包
Rpm包安裝:rpm -ivh *--force –nodeps
Rpms安裝有時(shí)候不一定保證有效,可以再用yum安裝:
# 采用yum安裝,如下: yum install -y binutils* yum install -y compat-libstdc* yum install -y elfutils-libelf* yum install -y gcc* yum install -y glibc* yum install -y ksh* yum install -y libaio* yum install -y libgcc* yum install -y libstdc* yum install -y make* yum install -y sysstat* yum install libXp* -y yum install -y glibc-kernheaders # 檢查下lib是否安裝齊全: [root@powerlong4 ~]# rpm -q --queryformat %-{name}-%{version}-%{release}-%{arch}"\n" \ compat-libstdc++-33 glibc-kernheaders glibc-headers libaio libgcc glibc-devel xorg-x11-deprecated-libs
如果缺少,就繼續(xù)安裝缺失的組件包。
8,安裝vnc
vnc安裝參考:http://chabaoo.cn/article/110095.htm
9,解壓縮
Oracle官網(wǎng)一般下載不到,需要用戶(hù)名密碼登錄,大家如果需要這款Oracle軟件下載,歡迎在下面留言區(qū)留下你的email地址,我看到了會(huì)及時(shí)發(fā)給你的。
這里只是準(zhǔn)備部署dataguard,所以只需要安裝1of7和2of7這2個(gè)zip包即可。
unzipp13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
解壓縮完,會(huì)看到一個(gè)database目錄。
10,vnc viewer遠(yuǎn)程安裝
[root@azure_earth_dbm1_3_112 ~]# exportDISPLAY=10.254.3.112:1.0 [root@azure_earth_dbm1_3_112 ~]# xhost + access control disabled, clients canconnect from any host [root@azure_earth_dbm1_3_112 ~]# [oracle@azure_earth_dbm1_3_111 database]$./runInstaller "You are attempting to install 64-bitOracle on a 32-bit operating system. This is not supported and will not work." [oracle@azure_earth_dbm1_3_111 database]$vim runInstaller # 注釋掉exit 126即可 if [ `$UNAME` = "Linux" ]; then if [ -e $GETCONF ]; then value=`$GETCONF LONG_BIT` if [ $value != 64 ]; then echo "\"You are attempting to install 64-bit Oracle on a32-bit operating system. This is notsupported and will not work.\""; #exit 126; #corresponding to the exit code of oui fi fi fi
然后再執(zhí)行./runInstaller,會(huì)有如下界面,正式開(kāi)始界面安裝oracle數(shù)據(jù)庫(kù),選擇忽略軟件更新的提示,點(diǎn)擊next下一步,如下圖01.png:
之后選擇單實(shí)例數(shù)據(jù)庫(kù)安裝,如02.png所示:
從左面的可用語(yǔ)言里面選擇UK、SC、TC,如下03.png所示:
之后選擇企業(yè)版本4.7GB,如下04.png所示:
下面的oraclebase根目錄以及軟件目錄,都默認(rèn)不需要設(shè)置(當(dāng)然如果你要改路徑也是可以的),默認(rèn)后直接next下一步,如05.png:
接下來(lái)在oraInventorygroup name的時(shí)候選擇oinstall,如08.png所示next下一步:
在databaseadministrator group上選擇dba,在databaseoperator group上面選擇oper,然后net下一步,如009.png所示:
然后,執(zhí)行checksoracle基礎(chǔ)組件,如果有l(wèi)ibaio、compat的提示,直接IgnoreAll即可,next下一步如010.png所示:
然后選擇install安裝,開(kāi)始安裝oracle軟件,如011.png所示:
之后進(jìn)入安裝界面,會(huì)有進(jìn)度條%顯示,如012.png所示:
如果安裝完成,會(huì)彈出ExecuteConfiguration scripts所示,選擇OK完成oracle軟件安裝,如013.png所示:
之后,看到oracle安裝到最好一步Finish,選擇close結(jié)束,如014.png所示:
11,執(zhí)行dbca初始化腳本:
以root身份執(zhí)行orainstRoot.sh和root.sh腳本(注:執(zhí)行完腳本以后,在點(diǎn)擊“ok”):
# 查找文件路徑 [oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name orainstRoot.sh /data/oraInventory/orainstRoot.sh [oracle@azure_earth_dbm1_3_111 database]$ find /data/ -name root.sh /data/oracle/product/11.2.0/dbhome_1/inventory/Templates/root.sh /data/oracle/product/11.2.0/dbhome_1/root.sh [oracle@azure_earth_dbm1_3_111 database]$ # 開(kāi)始執(zhí)行腳本 [root@azure_earth_dbm1_3_111 soft]# sh /data/oraInventory/orainstRoot.sh Changing permissions of /oracle/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /oracle/app/oraInventory to oinstall. The execution of the script is complete. [root@azure_earth_dbm1_3_111 soft]# [root@azure_earth_dbm1_3_111 soft]# sh /data/oracle/product/11.2.0/dbhome_1/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /oracle/app/oracle/product/11.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@azure_earth_dbm1_3_111 soft]#
12,netca創(chuàng)建oracle監(jiān)聽(tīng)
在shell命令行sudo – oracle,然后執(zhí)行netca命令,出現(xiàn)如下界面,選擇默認(rèn)的listener configure配置,如下015.png:
然后選擇Add,添加新的監(jiān)聽(tīng),如016.png:
默認(rèn)監(jiān)聽(tīng)名字為L(zhǎng)ISTENER,然后next下一步如017.png所示
然后繼續(xù)next下一步,如018.png所示:
端口選擇默認(rèn)的1521,然后next下一步如019.png所示:
Ok,listener添加完畢,點(diǎn)擊cancel退出,如020.png所示:
13,vnc遠(yuǎn)程dbca安裝oracle數(shù)據(jù)庫(kù)實(shí)例
[root@azure_earth_dbm1_3_112 ~]# exportDISPLAY=192.168.3.112:1.0 [root@azure_earth_dbm1_3_112 ~]# xhost + access control disabled, clients canconnect from any host [root@azure_earth_dbm1_3_112 ~]# [oracle@azure_earth_dbm1_3_111 database]$ dbca
dbca后出現(xiàn)oracle實(shí)例安裝界面,如下所示,選擇第一個(gè),然后next如021.png所示:
選擇創(chuàng)建數(shù)據(jù)庫(kù),然后next下一步如022.jpg所示:
填寫(xiě)全局實(shí)例名和SID,這里默認(rèn)是一樣的powerdes,然后next如024.jpg所示:
之后下一步默認(rèn),如025.jpg所示:
設(shè)置統(tǒng)一的sys密碼,如026.jpg、027.png所示所示:
選擇用本地的數(shù)據(jù)文件模版地址:如028.jpg所示:
之后配置閃存區(qū)和歸檔,如029.jpg所示:
選擇模版schemas,如030.jpg所示:
配置sga、pga,默認(rèn)是40%,這里因?yàn)槭菍?zhuān)用的db服務(wù)器,可以調(diào)整到70%,如031.png所示:
然后選擇連接數(shù),默認(rèn)是150,基本不夠用,這里可以設(shè)置為5000,如032.png所示:
然后選擇字符集,設(shè)定16GBK,如033.png所示:
然后出現(xiàn)Data Store,看到一些文件以及存儲(chǔ)參數(shù),如034.jpg所示:
然后選擇CreateDatabase和GenerateDatabase Creation Scripts,開(kāi)始create,如035.jpg所示:
之后,跳出確認(rèn)信息界面,點(diǎn)擊ok確認(rèn),如036.jpg所示:
之后看到配置界面,提示scripts創(chuàng)建成功了,點(diǎn)擊ok,如037.jpg所示:
再之后出現(xiàn)的是創(chuàng)建db的界面,創(chuàng)建數(shù)據(jù)文件,如038.jpg所示:
然后開(kāi)始創(chuàng)建數(shù)據(jù)文件,這個(gè)時(shí)間比較漫長(zhǎng),主要看磁盤(pán)寫(xiě)入速度,如果是ssd磁盤(pán),幾分鐘就結(jié)束了,如果是普通磁盤(pán)估計(jì)要至少一個(gè)小時(shí)左右吧,之后創(chuàng)建數(shù)據(jù)文件結(jié)束后,oracle數(shù)據(jù)庫(kù)實(shí)例就創(chuàng)建完成了,如039.jpg所示:
14,修改啟動(dòng)參數(shù)打開(kāi)歸檔和閃回
# 修改spfile參數(shù) SQL> alter system set log_archive_dest_1='location=/doea5/arch'; SQL> alter system set log_archive_format='arch_%t_%s_%r.log' scope=spfile; SQL> alter system set db_recovery_file_dest_size=20G scope=spfile; SQL> alter system set db_recovery_file_dest='/oracle/app/oracle/flash_recovery'; SQL> alter system set db_flashback_retention_target=10080 scope=spfile; SQL> alter system set undo_retention=10800; # 打開(kāi)歸檔和閃回 SQL> shutdown immediate SQL> startup mount SQL> alter database archivelog ; SQL> alter database flashback on; SQL> alter database open;
OK,至此,oracle11g2.0.4順利圓滿(mǎn)安裝完成了。
如果一直報(bào)“xhost: unable to open display”,而且沒(méi)有其它辦法解決,可以嘗試下面的途徑:
[root@pddbnew ~]# export DISPLAY=10.251.3.31:1.0 [root@pddbnew ~]# xhost + xhost: unable to open display "10.251.3.31:1.0" [root@pddbnew ~]# [root@pddbnew ~]# [root@pddbnew ~]# export DISPLAY=pddbnew:1.0 [root@pddbnew ~]# xhost + xhost: unable to open display "pddbnew:1.0" [root@pddbnew ~]#
解決方式:
執(zhí)行命令: export DISPLAY=:1.0
執(zhí)行命令:xdpyinfo(ps:xdpyinfo命令會(huì)出來(lái)一堆信息)
執(zhí)行命令:xhost +
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- Oracle組件實(shí)現(xiàn)動(dòng)態(tài)Web數(shù)據(jù)庫(kù)
- 安裝SQL Server 2016出錯(cuò)提示:需要安裝oracle JRE7 更新 51(64位)或更高版本問(wèn)題的解決方法
- Win7 64環(huán)境下Oracle10g 64位版本安裝教程
- Oracle客戶(hù)端版本及位數(shù)(Windows系統(tǒng))查看方法
- Oracle11.2.0.1如何升級(jí)到11.2.0.3 Oracle同版本升級(jí)
- VMware中l(wèi)inux環(huán)境下oracle安裝圖文教程(二)ORACLE 10.2.05版本的升級(jí)補(bǔ)丁安裝
- oracle 日期函數(shù)集合(集中版本)
- Oracle Faq(Oracle的版本)
- Oracle相關(guān)組件版本信息的介紹
相關(guān)文章
Oracle監(jiān)控?cái)?shù)據(jù)庫(kù)性能的方法步驟
監(jiān)控?cái)?shù)據(jù)庫(kù)性能是確保數(shù)據(jù)庫(kù)系統(tǒng)高效運(yùn)行并快速響應(yīng)用戶(hù)請(qǐng)求的關(guān)鍵步驟,有效的數(shù)據(jù)庫(kù)性能監(jiān)控可以幫助識(shí)別和解決性能瓶頸,預(yù)測(cè)潛在問(wèn)題,并優(yōu)化資源使用,以下是詳細(xì)的步驟和代碼示例,指導(dǎo)你如何監(jiān)控?cái)?shù)據(jù)庫(kù)性能,需要的朋友可以參考下2024-08-08Oracle ORA-22908(NULL表值的參考)異常分析與解決方法
這篇文章主要介紹了Oracle ORA-22908(NULL表值的參考)異常分析與解決方法,大家可以參考使用2013-11-11Oracle Session每日統(tǒng)計(jì)功能實(shí)現(xiàn)
客戶(hù)最近有這樣的需求,想通過(guò)統(tǒng)計(jì)Oracle數(shù)據(jù)庫(kù)活躍會(huì)話(huà)數(shù),并記錄在案,利用比對(duì)歷史的活躍會(huì)話(huà)的方式,實(shí)現(xiàn)對(duì)系統(tǒng)整體用戶(hù)并發(fā)量有大概的預(yù)估,本文給大家分享具體實(shí)現(xiàn)方法,感興趣的朋友一起看看吧2022-02-02Oracle表中已有數(shù)據(jù)修改字段類(lèi)型方式
這篇文章主要介紹了Oracle表中已有數(shù)據(jù)修改字段類(lèi)型方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-12-12Oracle使用pivot和unpivot函數(shù)實(shí)現(xiàn)行列轉(zhuǎn)換
項(xiàng)目開(kāi)發(fā)過(guò)程中常常會(huì)涉及到oracle數(shù)據(jù)庫(kù)的一個(gè)數(shù)據(jù)操作,那就是行列的互轉(zhuǎn),本文為大家介紹了兩個(gè)可以實(shí)現(xiàn)這一操作的函數(shù)pivot和unpivot,感興趣的可以了解一下2023-06-06Oracle單行子查詢(xún)返回多行結(jié)果的問(wèn)題解決
這篇文章主要給大家介紹了關(guān)于Oracle中單行子查詢(xún)返回多行結(jié)果的問(wèn)題解決的相關(guān)資料,文中通過(guò)實(shí)例代碼介紹的非常詳細(xì),對(duì)大家學(xué)習(xí)或者使用oracle具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2023-07-07