安裝orcle10g oel5.6

一、安裝OEL 5.6

二、安裝VMware Tools

1)  選擇菜單裏的VM選項,裏面有一個子選項是installVMware Tools,選擇它。

2)   回到操作系統,將光驅掛載到/mnt 下

 [root@tyger~]# mount /dev/cdrom /mnt

mount:block device /dev/cdrom is write-protected, mounting read-only

[root@tyger~]#

3)  解壓安裝tools壓縮包

[root@tyger~]# pwd

/root

[root@tyger~]#  tar -xzvf /mnt/VMwareTools-9.2.0-799703.tar.gz

……

[root@tyger~]# ls

anaconda-ks.cfg  Desktop install.log install.log.syslog vmware-tools-distrib

[root@tyger~]# cd vmware-tools-distrib/

[root@tygervmware-tools-distrib]# ls

bin  doc etc  FILES  INSTALL installer  lib  vmware-install.pl

[root@tygervmware-tools-distrib]# ./vmware-install.pl

回車

回車

回車

……

 

三、關閉一些沒必要的服務(自己練習階段)

service NetworkManager  stop

service acpid           stop

service anacron         stop

service apmd            stop

service atd             stop

service auditd          stop

service autofs          stop

service avahi-daemon    stop

service avahi-dnsconfd  stop

service bluetooth       stop

service conman          stop

service cpuspeed        stop

service cups            stop

service dnsmasq         stop      

service dund            stop

service firstboot       stop

service gpm             stop

service haldaemon       stop

service hidd            stop

service ip6tables       stop

service ipmi            stop

service ipmievd         stop

service iptables        stop

service irda            stop

service irqbalance      stop

service kdump           stop

service kudzu           stop

service mcstrans        stop

service mdmpd           stop

service microcode_ctl   stop

service netconsole      stop

service netfs           stop

service netplugd        stop

service nfs             stop

service nfslock         stop

service nscd            stop

service ntpd            stop

service pand            stop

service pcscd           stop

service portmap         stop

service psacct          stop

service rawdevices      stop

service rdisc           stop

service readahead_early stop

service readahead_later stop

service restorecond     stop

service rhnsd           stop

service rpcgssd         stop

service rpcidmapd       stop

service rpcsvcgssd      stop

service saslauthd       stop

service sendmail        stop

service setroubleshoot  stop

service smartd          stop

service vncserver       stop

service wdaemon         stop

service winbind         stop

service wpa_supplicant  stop

service xfs             stop

service xinetd          stop

service ypbind          stop

service yum-updatesd    stop

四、設置沒必要的服務開機不啓動

chkconfig NetworkManager  off

chkconfig acpid           off

chkconfig anacron         off

chkconfig apmd            off

chkconfig atd             off

chkconfig auditd          off

chkconfig autofs          off

chkconfig avahi-daemon    off

chkconfig avahi-dnsconfd  off

chkconfig bluetooth       off

chkconfig conman          off

chkconfig cpuspeed        off

chkconfig cups            off

chkconfig dnsmasq         off

chkconfig dund            off

chkconfig firstboot       off

chkconfig gpm             off

chkconfig haldaemon       off

chkconfig hidd            off

chkconfig ip6tables       off

chkconfig ipmi            off

chkconfig ipmievd         off

chkconfig iptables        off

chkconfig irda            off

chkconfig isdn            off

chkconfig irqbalance      off

chkconfig kdump           off

chkconfig kudzu           off

chkconfig mcstrans        off

chkconfig mdmpd           off

chkconfig microcode_ctl   off

chkconfig netconsole      off

chkconfig netfs           off

chkconfig netplugd        off

chkconfig nfs             off

chkconfig nfslock         off

chkconfig nscd            off

chkconfig ntpd            off

chkconfig pand            off

chkconfig pcscd           off

chkconfig portmap         off

chkconfig psacct          off

chkconfig rawdevices      off

chkconfig rdisc           off

chkconfig readahead_early off

chkconfig readahead_later off

chkconfig restorecond     off

chkconfig rhnsd           off

chkconfig rpcgssd         off

chkconfig rpcidmapd       off

chkconfig rpcsvcgssd      off

chkconfig saslauthd       off

chkconfig sendmail        off

chkconfig setroubleshoot  off

chkconfig smartd          off

chkconfig vncserver       off

chkconfig wdaemon         off

chkconfig winbind         off

chkconfig wpa_supplicant  off

chkconfig xfs             off

chkconfig xinetd          off

chkconfig ypbind          off

chkconfig yum-updatesd    off

五、修改版本支持

   經過oracle驗證的redhat操作系統版本最高爲4,4以後的版本都沒有經過oracle驗證。沒有驗證的版本如果不修改的話,是無法安裝的。

 

[root@tyger ~]# vi /etc/redhat-release

Red Hat Enterprise Linux Server release 5.6 (Tikanga)

改爲

Red Hat Enterprise Linux Server release 4.6 (Tikanga)

[root@tyger ~]# cat/etc/redhat-release

cat /etc/redhat-release

Red Hat Enterprise LinuxServer release 4.6 (Tikanga)

六、YUM安裝軟件包

   用YUM的工具來安裝所需軟件包(先將OEL5.6安裝鏡像文件加載到虛擬機光驅中)

[root@tyger ~]# mount /dev/cdrom /mnt

mount: block device /dev/cdrom is write-protected,mounting read-only

[root@tyger ~]#

[root@tyger ~]# vi/etc/yum.repos.d/public-yum-el5.repo

[root@tyger ~]#

[oel5]

name = Enterprise Linux 5.6 DVD

baseurl=file:///mnt/Server/

gpgcheck=0

enabled=1

[root@tyger etc]#

[root@tyger etc]# yum install oracle-validated

……略……

Total download size: 36 M

Is this ok [y/N]:y

Downloading Packages:

--------------------------------------------------------------------------

Total                                           1.8GB/s |  36 MB     00:00    

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

 Installing     : unixODBC                                                1/18

 Installing     : libXp                                                  2/18

 Installing     : sysstat                                                3/18

 Installing     : compat-db                                               4/18

 Installing     : gdb                                                    5/18

 Installing     :kernel-headers                                          6/18

 Installing     :glibc-headers                                           7/18

 Installing     : glibc-devel                                            8/18

 Installing     :libstdc++-devel                                         9/18

 Installing     :unixODBC-devel                                        10/18

 Installing     : libaio-devel                                          11/18

 Installing     :compat-gcc-34                                          12/18

 Installing     : gcc                                                   13/18

 Installing     : gcc-c++                                               14/18

 Installing     :compat-gcc-34-c++                                      15/18

 Installing     :elfutils-libelf-devel                                  16/18

  Installing     : elfutils-libelf-devel-static                           17/18

 Installing     :oracle-validated                                       18/18

 

Installed:

 oracle-validated.i386 0:1.0.0-24.el5                                         

 

Dependency Installed:

 compat-db.i386 0:4.2.52-5.1                                                  

 compat-gcc-34.i386 0:3.4.6-4.1                                               

 compat-gcc-34-c++.i386 0:3.4.6-4.1                                           

  elfutils-libelf-devel.i3860:0.137-3.el5                                     

 elfutils-libelf-devel-static.i386 0:0.137-3.el5                              

  gcc.i3860:4.1.2-50.el5                                                      

 gcc-c++.i386 0:4.1.2-50.el5                                                  

  gdb.i3860:7.0.1-32.el5                                                      

 glibc-devel.i386 0:2.5-58                                                    

 glibc-headers.i386 0:2.5-58                                                  

 kernel-headers.i386 0:2.6.18-238.el5                                         

  libXp.i3860:1.0.0-8.1.el5                                                   

 libaio-devel.i386 0:0.3.106-5                                                

 libstdc++-devel.i386 0:4.1.2-50.el5                                          

 sysstat.i386 0:7.0.2-3.el5_5.1                                               

 unixODBC.i386 0:2.2.11-7.1                                                    

 unixODBC-devel.i386 0:2.2.11-7.1                                             

 

Complete!

[root@tyger ~]#

1.1.  修改/etc/sysctl.conf文件

    在安裝oracle軟件的驗證步驟,會明確的告訴你下面的設置,所以,我們可以提前將其改之,如果有興趣的同學,可以先安裝,驗證的時候,再改也是一樣的。

[root@tyger soft]# vi/etc/sysctl.conf

net.ipv4.ip_local_port_range = 9000 65500

改爲                                 

net.ipv4.ip_local_port_range = 1024 65000

--使上面修改生效

[root@tyger soft]#/sbin/sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter= 2

net.ipv4.conf.default.accept_source_route= 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies =1

fs.file-max = 6815744

kernel.msgmni = 2878

kernel.msgmax = 8192

kernel.msgmnb = 65536

kernel.sem = 250 32000100 142

kernel.shmmni = 4096

kernel.shmall =1073741824

kernel.shmmax =4294967295

kernel.sysrq = 1

net.core.rmem_default =262144

net.core.rmem_max =4194304

net.core.wmem_default =262144

net.core.wmem_max =1048576

fs.aio-max-nr = 3145728

net.ipv4.ip_local_port_range= 1024 65000

vm.min_free_kbytes =51200

[root@tyger soft]#

1.2.  修改密碼及創建目錄和權限

1)  修改oracle用戶的密碼(我們使用YUM安裝了相關的程序包的同時,也爲我們創建了Oracle賬戶和相關的組)

[root@tyger ~]# passwdoracle

Changing password foruser oracle.

New UNIX password:

BAD PASSWORD: it is basedon a dictionary word

Retype new UNIX password:

passwd: allauthentication tokens updated successfully.

2)  創建相關目錄並賦權

[root@tyger ~]# mkdir/soft

[root@tyger ~]# chown -Roracle:oinstall /soft

[root@tyger ~]# chmod -R755 /soft

[root@comu ~]# mkdir -p/u01/app/oracle

[root@tyger ~]# chown -Roracle:oinstall /u01

[root@tyger ~]# chmod -R755 /u01

1.3.  主機名及IP的設定

[root@tyger ~]# vi/etc/hosts

 

# Do not remove thefollowing line, or various programs

# that require networkfunctionality will fail.

127.0.0.1              tygerlocalhost.localdomain localhost (注意:本行的tyger要刪除,因爲下面增加的一行已經存在了)

::1             localhost6.localdomain6 localhost6

192.168.1.32 tyger

(注:增加此行,因爲在安裝的過程中,oracle會根據ip地址去做一些操作,如果此處沒有計算機的ip地址及計算機名,則在驗證的過程中會有警告)

1.4.  設置oracle用戶環境變量

[root@tyger ~]# su -oracle

[oracle@tyger ~]$

[oracle@tyger ~]$ vi.bash_profile

注:在文件的最下方增加如下內容

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export ORACLE_SID=ORCL

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

修改完成,使其修改生效,如下:

[oracle@tyger ~]$ ..bash_profile

[oracle@tyger ~]$

或者

[oracle@tyger ~]$ source.bash_profile

[oracle@tyger ~]$

再或者註銷重新登錄

注:

ORACLE_BASE:oracle產品基目錄

ORACLE_HOME:數據庫產品目錄通常情況下HOME目錄是BASE的子目錄

ORACLE_SID:操作系統和oracle實例關聯的紐帶

PATH:將安裝後的oracle命令追加到執行搜索路徑

LD_LIBRARY_PATH:動態庫的位置

1.5.  上傳oracle安裝介質

(通過工具ssh進行上傳)

1、         連接ssh得先配置一下你的linux

①  VM-----settings------NetworkAdapter

設置爲host-only模式 Devicestatus中的都勾選

OK

②  Edit------VirtualNetwork Editor-----

設置VMnet1 爲host-only且將Subnet IP設置與你linuxIP地址在同一個網段(我的IP192.168.12.70所以我設置爲:192.168.12.0

====================================================

補充:如果你不知道你的liunxIP地址你可以打開一個終端查一下

[root@tyger ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:2A:24:66 

          inet addr:192.168.12.70  Bcast:192.168.12.255  Mask:255.255.255.0

          inet6 addr:fe80::20c:29ff:fe2a:2466/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1

          RX packets:3030 errors:0 dropped:0overruns:0 frame:0

          TX packets:1739 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:302428 (295.3 KiB)  TX bytes:274398 (267.9 KiB)

          Interrupt:67 Base address:0x2024

 

lo        Link encap:Local Loopback 

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436 Metric:1

          RX packets:1026 errors:0 dropped:0overruns:0 frame:0

          TX packets:1026 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1359652 (1.2 MiB)  TX bytes:1359652 (1.2 MiB)

 

[root@tyger ~]#

============================================================================

 

OK

2、         連接SSH上傳文件10201_database_linux32到linux的 /soft 目錄下

上傳完成

1.6.  安裝軟件

1)       解壓剛剛上傳文件

[root@tyger ~]# xhost +

access control disabled,clients can connect from any host

[root@tyger ~]# su -oracle

[oracle@tyger ~]$ cd/soft

[oracle@tyger soft]$ ls

10201_database_linux32.zip  linux-oracle-needed-software

[oracle@tyger soft]$unzip 10201_database_linux32.zip

…………

  inflating:database/stage/oracle.server.10_2_0_1_0_dep_default.properties 

  inflating:database/stage/oracle.server.10_2_0_1_0_1120187896411.bak 

  inflating: database/stage/fastcopy.xml 

  inflating: database/welcome.html  

[oracle@tyger soft]$

[oracle@tyger soft]$ ls

10201_database_linux32.zip  database linux-oracle-needed-software

2)   開始安裝oracle軟件(啓動圖形化界面)

[oracle@tyger soft]$ cddatabase/

[oracle@tyger database]$ls

doc  install response  runInstaller  stage welcome.html

[oracle@tyger database]$ ./runInstaller

 

3)       下面開始就跟着圖片做,剛開始不需要管因爲什麼,只知道怎麼做。

Next

Next

Next

出現下面時是自動添加的,和環境變量設置是一樣的

Next

可以看到全部通過,perfect!!!

Next

選擇Install database Software only 就好,之後我們會創建數據庫

Next

此時可以總體看一下你的配置信息,接下去就要開始安裝oracle數據庫軟件了

Install…….

手下留情!!!!!

此時會彈出兩個需要執行的腳本文件,還是打開一個新的終端執行了吧,要不還得自己去找腳本執行,

 

[root@tyger ~]#/u01/app/oracle/oraInventory/orainstRoot.sh

Changing permissions of/u01/app/oracle/oraInventory to 770.

Changing groupname of /u01/app/oracle/oraInventoryto oinstall.

The execution of the script is complete

[root@tyger ~]#/u01/app/oracle/product/10.2.0/root.sh

Running Oracle10 root.sh script...

 

The following environment variables are set as:

   ORACLE_OWNER= oracle

   ORACLE_HOME= /u01/app/oracle/product/10.2.0

 

Enter the full pathname of the local bin directory:[/usr/local/bin]:

   Copyingdbhome to /usr/local/bin ...

   Copyingoraenv to /usr/local/bin ...

   Copyingcoraenv to /usr/local/bin ...

 

 

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file asneeded by

Database Configuration Assistant when a database iscreated

Finished running generic part of root.sh script.

Now product-specific root actions will beperformed.

[root@tyger ~]#

 

 

OK……

EXIT

Yes

 

1.7.  創建oracle數據庫

接着開始用圖形化界面創建oracle數據庫(DBCA)

 

[oracle@tyger ~]$ dbca

-bash: dbca: command not found

如果出現上面的問題,是因爲環境變量設置的有問題

 

[oracle@tyger ~]$ vi .bash_profile

將路徑:

exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

改爲

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0

 

修改完成,使其修改生效,如下:

[oracle@tyger ~]$ ..bash_profile

[oracle@tyger ~]$

或者

[oracle@tyger ~]$ source.bash_profile

[oracle@tyger ~]$

再或者註銷重新登錄

準備工作做好了,好了……開始圖形化界面

[oracle@tyger ~]$ dbca

Next

Next

Next

 

輸入你的Global Database Name (全局數據庫名稱),下面的SID會自動補全,這個SID一定要和你環境變量設置的SID相同。

環境變量的SID設置如下:

export ORACLE_SID=ORCL

next

接下來這個界面問你是否要安裝oracle的EM ,這裏可以不安裝,到後來我們學習自己手動安裝EM(oracle的一個圖形化界面管理工具)

 

 

你可以創建完數據庫,接着配置EM,要問怎麼辦,給你網址你懂得~~

我自己總結的 tyger tyger   tyger ~~~~~~~~~~~~~~~~~~

http://blog.csdn.net/wanghui5767260/article/details/15506419

 

 

NEXT

這裏統一設置密碼爲:oracle

Next

..

Next

..

Next

….

只有選中後,數據庫安裝時纔會將SCOTT、HR等用戶創建上,否則是沒有此用戶的。另注意,默認情況下,這些用戶都是鎖定的,需要人工解鎖。

1.71_內存、塊大小、字符集、連接模式設置

1)  內存,可以分配百分比,也可以手工指定SGA和PGA的大小

2)  數據庫默認塊大小

3)  字符集設置,可以採用默認的(默認字符集是什麼跟操作系統有關係),也可以使用UTF8或者選擇你指定的字符集

4)  連接模式,選擇,專用模式

1.72_確認數據庫存儲信息,下一步

1.73_默認只有創建數據庫是選中狀態

可以將我們目前所有創建的步驟保存爲模板,同時也可以將這些步驟保存爲腳本

1.74_所有安裝的組件

1.75_點擊OK後,首先彈出模板保存成功對話框

1.76_然後彈出,腳本保存成功對話框

1.77_點擊OK,開始創建數據庫

根據機器的情況不同,時間也有所差異,請慢慢等待

1.78_點擊EXIT,安裝完成

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章