CentOS系統(tǒng)上安裝配置Oracle數(shù)據(jù)庫的詳細(xì)教程
一.基本配置
1.硬盤剩余空間:10G以上
雖然Oracle 10g的安裝文件只有800多MB,但安裝后的oracle+oraInventory目錄會(huì)用差不多4G空間,再加上安裝時(shí)Oracle生成的臨時(shí)文件(/tmp目錄需要至少400MB)。
2.內(nèi)存1.5G以上
官方文檔說512M內(nèi)存也可以安裝。為了避免不必要的麻煩,請(qǐng)把內(nèi)存加多一些。
3.Swap交換區(qū)2G
二.CenOS6 上安裝Oracle 10g
1.準(zhǔn)備安裝
在安裝Oracle之前執(zhí)行以下命令:
yum install yum-fastestmirror -y yum install compat-db* yum install compat-libc* yum install compat-gcc* yum install libXp.so.6 yum install libc-* yum install libaio* yum install openmotif yum install glibc-devel* yum install libgcc* yum install gnome-lib*
2.安裝包解壓
[root@localhost ~]# cpio -idmv > 10201_database_linux_x86_64.cpio
3.創(chuàng)建 Oracle 組和用戶帳戶
創(chuàng)建用于安裝和維護(hù)Oracle 10g 軟件的賬戶。用戶帳戶將稱為oracle,而組將稱為oracleinstall和oracle。以root用戶身份執(zhí)行以下命令:
[root@localhost ~]# groupadd oracleinstall [root@localhost ~]# groupadd oracle [root@localhost ~]# useradd -m -g oracleinstall-G oracle oracle [root@localhost ~]# id oracle uid=501(oracle) gid=501(oracleinstall) groups=501(oracleinstall),502(oracle)
設(shè)置oracle帳戶的口令
[root@localhost ~]# passwd oracle Changing password for user oracle. New password: Retype new password:passwd:all authentication tokens updated successfully.
4.創(chuàng)建目錄
創(chuàng)建Oracle 10g及其數(shù)據(jù)庫文件的目錄,以root用戶身份執(zhí)行以下命令:
[root@localhost ~]# mkdir -p /oracledata/oracle [root@localhost ~]# mkdir -p /oracledata/oradata [root@localhost ~]# chown -R oracle:oracleinstall /oracledata/oracle /oracledata/oradata [root@localhost ~]# chmod -R 775 /oracledata/oracle /oracledata/oradata
5.修改內(nèi)核參數(shù)
安裝Oracle 10g需修改內(nèi)核參數(shù),否則安裝檢測時(shí)會(huì)報(bào)Failed,甚至導(dǎo)致安裝時(shí)出現(xiàn)Error。以root身份執(zhí)行以下命令:
cat >> /etc/sysctl.conf <<EOF kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144 EOF
如果檢查沒有問題后,即可以開始裝Oralce 10g。
6.安裝Oracle 10g
(1)先以oracle用戶身份登陸XWindow。因?yàn)閛racle安裝會(huì)彈出界面讓你配置,如果使用putty登陸安裝的話,你是沒有辦法操作彈出框的,所以一定要登錄XWindow,然后在Terminal里啟動(dòng)安裝程序。
(2)如果你的系統(tǒng)語言為中文,請(qǐng)把他設(shè)置為英文,否則安裝的時(shí)候會(huì)出現(xiàn)亂碼。
(3)Terminal中啟動(dòng)Oracle 10g安裝程序:
[oracle@www/]$ ./Oracle/database/runInstaller
如果一切正常,界面會(huì)彈出如下對(duì)話框:
如果在Terminal啟動(dòng)runInstaller時(shí)遇到“Checking operating system version: must be redhat-2.1, redhat-3, SuSE-9, SuSE-8 or UnitedLinux-1.0 Failed ”這種問題,表明oracle不能識(shí)別你的系統(tǒng)內(nèi)核,這個(gè)問題可以通過修改內(nèi)核配置文件解決,如下:
cat > /etc/redhat-release << EOF Red Hat Enterprise Linux AS release 3 (Taroon) EOF
7.Oracle 10g安裝配置
修改Oralce Home Localtion,填寫database password后,按“Next”。如圖:

8.數(shù)據(jù)庫配置
修改Inventory directory,Specify Operating System group name選:oracleinstall,然后“Next”,如圖:

9.Oracle安裝前檢查
檢查一下有什么不符合安裝要求,看是否需要修改配置,如果按照上面步驟下來,這里的warning應(yīng)該為0,然后“Next”。如果有警告可以搜下是什么問題。
10.Install Oracle 10g
直接按“Install”。在軟件安裝完成之后,會(huì)自動(dòng)進(jìn)行Configuration Assistant的配置。
11.以root權(quán)限運(yùn)行腳本
當(dāng)iSQL*Plus Configuration Assistant配置完成時(shí),會(huì)彈出一下框,里面有兩個(gè)Srcipt需要你用root權(quán)限運(yùn)行。
在Terminel中以root權(quán)限執(zhí)行以上兩個(gè)腳本:
[root@www oradata]# ./orainstRoot.sh Changing permissions of /oracledata/oradata to 770. Changing groupname of /oracledata/oradata to oracleinstall. The execution of the script is complete [root@www oracle]# ./root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /oracledata/oracle 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.sh script. Now product-specific root actions will be performed.
然后按界面中的“OK”。
至此Oracle 10g安裝完成。按“Exit”退出安裝。
三、一些常見的錯(cuò)誤
1.[INS-06101] IP address of localhost could not be determined
圖如下:

解決方法:是因?yàn)槟愕闹鳈C(jī)名與IP地址不一至,在/etc/hosts文件對(duì)應(yīng)就行了
vim /etc/hosts
IP地址 主機(jī)名
2.at Oracle.install.ivwdb.dirver.DBinstaller.main(DBinstaller.java:132)
圖如下:

解決方法:在root用戶終端下執(zhí)行xhost +就行了
3.Error in invoking target 'client_sharedlib' of makefile '/oracle/u01/app/oracle/product/10.2.0/db_1/network/lib/ins_net_client.mk'
圖如下:

解決方法:查看oracle是多少位的系統(tǒng),一般32位系統(tǒng)裝32位oracle軟件,64位系統(tǒng)可以裝32位和64位的oracle。打開下載oracle的軟件包,里面有一個(gè)網(wǎng)頁,打開那個(gè)網(wǎng)頁就可以看到。
4.查看監(jiān)聽(lsnrctl)或者是命令(sqlplus)提示:
-bash: lsnrctl: command not found
圖如下:

解決方法:查找oracle的命令安裝目錄,我的是(/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin)添加到環(huán)境變量中。
vim ~/.bash_profile
--是oracle用戶根目錄的文件,修改這一行
export PATH=$PATH:/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
source ~/.bash_profile
--配置文件生效
- centos7下安裝oracle11gR2的詳細(xì)步驟
- centos 6.5下安裝oracle 11gR2與Oracle自動(dòng)啟動(dòng)的配置
- Linux下安裝Oracle(CentOS-Oracle 12c)的方法
- CentOS命令行下裝oracle 12c的方法(命令行模式安裝)
- CentOS下PHP安裝Oracle擴(kuò)展
- CentOS6.2上安裝Oracle10g報(bào)ins_emdb.mk錯(cuò)誤處理方法
- CentOS 6.3下安裝部署Oracle服務(wù)器圖文教程
- Linux+php+apache+oracle環(huán)境搭建之CentOS下安裝Oracle數(shù)據(jù)庫
- Linux+php+apache+oracle環(huán)境搭建之CentOS下源碼編譯安裝PHP
- centos下Oracle11G圖文安裝教程
相關(guān)文章
Oracle使用觸發(fā)器和mysql中使用觸發(fā)器的案例比較
這篇文章主要介紹了Oracle使用觸發(fā)器和mysql中使用觸發(fā)器的案例比較,本文通過示例講解,給大家介紹的非常詳細(xì),需要的朋友參考下2016-12-12
CentOS8下安裝oracle客戶端完整(填坑)過程分享(推薦)
這篇文章主要介紹了CentOS8下安裝oracle客戶端完整(填坑)過程分享,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-12-12
Oracle導(dǎo)入導(dǎo)出dmp文件的方法對(duì)比及示例
這篇文章主要介紹了Oracle數(shù)據(jù)庫中的dmp文件格式及其相關(guān)工具impdp/expdp的使用方法,包括它們的區(qū)別、參數(shù)說明及示例,并指出了執(zhí)行導(dǎo)入導(dǎo)出時(shí)需要的前置條件,需要的朋友可以參考下2025-01-01
Oracle實(shí)現(xiàn)同表更新或插入的三種方案
這篇文章主要給大家介紹了Oracle實(shí)現(xiàn)同表更新或插入的三種方案,文章通過代碼示例和圖文結(jié)合講解的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作有一定的幫助,需要的朋友可以參考下2023-11-11
oracle異常(預(yù)定義異常,自定義異常)應(yīng)用介紹
在開發(fā)過程中,經(jīng)常會(huì)遇到一些測試,這時(shí)候就會(huì)想了解測試的過程,然后再根據(jù)過程分析代碼錯(cuò)在哪里,這種情況下,就需要用到自定義異常,需要了解的朋友可以參考本文2012-11-11
Oracle9i 動(dòng)態(tài)SGA,PGA特性探索
雖然Oracle9i中的內(nèi)存管理仍然需要很多的手工操作,不過大部分的Oracle管理員可以使用工具來連續(xù)地監(jiān)控Oracle SGA中的內(nèi)存使用,并且可以根據(jù)Oracle instance中現(xiàn)在的使用情況來自動(dòng)地重新分配內(nèi)存。2009-03-03
ORACLE 正則解決初使化數(shù)據(jù)格式不一致
在初使化用戶基礎(chǔ)數(shù)據(jù)時(shí)會(huì)出現(xiàn)一些數(shù)據(jù)格式不正確的情況。。2009-05-05
VMware中l(wèi)inux環(huán)境下oracle安裝圖文教程(二)ORACLE 10.2.05版本的升級(jí)補(bǔ)丁安裝
這篇文章是VMware中l(wèi)inux環(huán)境下oracle安裝圖文教程系列的第二篇,主要介紹了ORACLE 10.2.05版本的升級(jí)補(bǔ)丁安裝,需要的朋友可以參考下2014-08-08

