CentOS 5 2下Oracle 10G安裝詳解

2022-12-17 15:27:03 字數 5483 閱讀 9493

centos 5.2下oracle 10g安裝詳解

centos必需的安裝包

* gnome desktop environment* editors

* graphical internet* text-based internet* development libraries* development tools

* legacy software development* server configuration tools* administration tools* base

* legacy software support* system tools* x window system

注意:為swap分配的空間要超過1g,要不然後面裝oralce會因為空間不足而無法安裝。並且要關閉防火牆,關閉seliinux

修改host檔案hosts file# vi /etc/hosts

192.168.10.10 oracle oracle

127.0.0.1 oracle localhost

注意:你要把192.168.10.10改成你自己的ip,我這裡只是寫我本機的ip的。

設定核心引數# vi /etc/

在行末新增以下內容

#use for oracle

# = 2097152# = = 4096

# semaphores: semmsl, semmns, semopm, = 250 32000 100 = 65536

= 1024

再執行sysctl -p應用以上引數

# /sbin/sysctl -p

設定最大開啟檔案數

# vi /etc/security/

在行末新增以下內容

#use for oracle* soft nofile 65536* hard nofile 65536

設定會話

# vi/etc/行末新增以下內容

sessionrequired /lib/security/pam_

查詢所需安裝包是否完整

以root使用者在終端中執行以下命令:

rpm -q gcc make binutils openmotif setarch compat-db compat-gcccompat-gcc-c++ compat-libstdc++ compat-libstdc++-devel

如果沒有安裝這些包的話,可以在centos安裝光碟的centos目錄下找到相應的rmp檔案來安裝,如果你的伺服器可以聯網的話,也可以通過yum的方式**安裝,在終端中執行以下命令:

# yum -y install setarch-2*# yum -y install make-3*# yum -y install glibc-2*# yum -y install libaio-0*

# yum -y install compat-libstdc++-33-3*# yum -y install compat-gcc-34-3*# yum -y install compat-gcc-34-c++-3*# yum -y install gcc-4*# yum -y install libxp-1*

# yum -y install openmotif-2*# yum -y install compat-db-4*

按命令提示的**安裝,所需的時間取決於你的網速。如果不能上網則可以從光碟安裝具體的安裝方法是先掛載光碟機使用mount /dev/cdrom /media然後cd /media就可以進入光碟目錄了。再使用rpm -ivh 格式來安裝。

(注意***為你要安裝的安裝包名字)

可能安裝完了以後用上述命令檢視還是會出現某些包沒有安裝的資訊,這個不用理會,據說是rpm的bug。

package compat-gcc-c++ is not installed

package compat-libstdc++ is not installed

package compat-libstdc++-devel is not installed

建立oracle使用者及組# groupadd oinstall# groupadd dba# groupadd oper

# useradd -g oinstall -g dba oracle# passwd oracle

oracle資料庫**

* oracle database 10g release 2 (10.2.0.1) software去oracle的官方****。

建立oracle_home目錄,解壓資料庫安裝檔案# unzip 10201_database_ mv database /tmp/

# chown -r /tmp/database

修改作業系統版本標識# vi /etc/redhat-release#centos release 5.2 (final)redhat-4

修改oracle環境變數

# su - oracle$ vi .bash_profile

tmp=/tmp; export tmptmpdir=$tmp; export tmpdir

oracle_base=/home/oracle; export oracle_base

oracle_home=$oracle_base/product/10.2.0/db_1; export oracle_homeoracle_sid=orcl; export oracle_sidoracle_term=xterm; export oracle_termpath=/usr/sbin:

$path; export path

path=$oracle_home/bin:$path; export path

ld_library_path=$oracle_home/lib:/lib:/usr/lib; export ld_library_pathclasspath=$oracle_home/jre:

$oracle_home/jlib:$oracle_home/rdbms/jlib; export classpath

if [ $user = "oracle" ]; thenif [ $shell = "/bin/ksh" ]; thenulimit -p 16384ulimit -n 65536else

ulimit -u 16384 -n 65536fi

fi配置xdmcp對於gdm

# vi /etc/gdm/

注意:這個檔案可能是唯讀檔案,需要改成可寫屬性才能修改。

解決方法:使用root身份進行改寫。在root下先查找到

(find–

因為預設centos5.1不支援10.2,0.1,修改安裝檔案#vi /tmp/database/install/

找到### #[certified versions]

linux=redhat-3,suse-9,redhat-4,centos-5,unitedlinux-1.0,asianux-1,asianux-2再後面新增

[linux-centos-5.2-optional]temp_space=80swap_space=150

min_display_colors=256

安裝oracle資料庫# su - oracle

$ export display=192.168.10.3:0.0$ /home/oracle/database/runinstaller

注意:這裡的ip192.168.

10.3是你的另外一台電腦,這台電腦使用的是windows系統,能過這台電腦安裝遠端介面來遠端安裝資料庫的。**xmanager 2.

0連線遠端伺服器的桌面來連線這台centos伺服器就可以通過桌面形式來安裝資料庫了。

1. select installation method選擇advanced installation

2. specify inventory directory and credentials3. select installation type選擇enterprise edition4.

specify home detailsname文字框中填寫db_1

5. product-specific prerequisite checks6. select configuration option選擇create a database

7. select database configuration選擇general purpose

8. specify database configuration options選擇select database character set : utf-8

9. select database management option

選擇use database control database management10. specify database storage option選擇file system

11. specify backup and recovery options選擇do not enable automated backups12. specify database schema passwords選擇use the same password for all the accounts13.

summary14. install

15. configuration assistants

16. database configuration assistant

17. database configuration assistant password management選擇password management,除system以外全部鎖定18. execute configuration scripts在root環境中執行

# /home/oracle/orainventory/ /home/oracle/product/10.2.0/db_1/ end of installation

恢復作業系統版本# vi /etc/redhat-release

centos release 5.2 (final)

設定資料庫開機自動啟動# /etc/oratab

orcl:/home/oracle/product/10.2.0/db_1:y# vi /etc/

su - oracle -c 『dbstart』# su - oracle

$ vi /home/oracle/product/10.2.0/db_1/bin/dbstart第78行修改為

oracle_home_listner=$oracle_home/

資料庫相關命令

$ dbstart [ start | status | stop ]$ lsnrctl [ start | status | stop ]$ emctl [ start | status | stop ] console$ sqlplus /nolog

>connect system/passwd as sysdba

dbca - database configuration assistant$ dbca

啟動em

至此已經完成資料庫安裝了。我在此僅把我的安裝過程分享給大家。

CentOS安裝步驟

一 圖形介面安裝方法 用光碟機引導啟動伺服器,介面如下 我們選用 圖形 模式來安裝,所以在這裡,我們按下 enter 回車鍵 之後會出現一些字元,停止後介面如下 這是詢問我們是否檢查磁碟,正常情況,我們選擇 skip 在 ok 與 skip 之間切換,用鍵盤的tab鍵來操作 選擇 skip 後,稍後...

centos安裝教程

因為centos的系統很難用u盤裝,所以這裡介紹的是用光碟裝centos的步驟 3.3選擇安裝語言 選擇安裝語言,在這裡選擇 english,使用者可以根據自己的需求選擇。3.4選擇鍵盤布局型別 選擇完安裝語言後,進入如下圖所示的介面,選擇鍵盤型別一般缺省會選擇 u s 美國 英語式 即美式鍵盤,在...

CentOS7安裝需要注意的地方

安裝centos 7的一點體會 linux系統都不太好安,如果你想自己管理磁碟的話,當然這是對新手說的。對於老手,分分鐘的事,後面也還是可以用cmd line來新建磁碟。不過,我私以為對於centos7的安裝,最大的困難在於新手不知道該如何進入那個gui介面。首先製作u盤啟動盤,在f12選擇 可能是...