oracle 10g 安裝文檔

來源:互聯網
上載者:User

標籤:proc   nes   size   fine   光碟片   生效   掛載點   eric   主機   

 1:修改核心參數

[[email protected] mnt]# vim /etc/redhat-release

      Red Hat Enterprise Linux Server release 4 (Tikanga)

2:修改主機名稱

[[email protected] ~]# vim /etc/sysconfig/network

     hostname=dba.up.com

[[email protected] ~]# vim /etc/hosts

      192.168.1.88 dba.up.com dba

3:空間需求

      記憶體至少512M 交換分區至少1G

      oracle軟體安裝位置1.3G

      資料庫安裝位置至少1G

      /tmp要有足夠400M的剩餘

      如果這些目錄都是隸屬於根檔案系統 那根需要有3G空閑才能安裝 (1.3+1+0.4)

      上述都屬於最小要求 這是遠遠不夠後期運行添加資料使用的.

      並且隨著後期運行oracle自身產生的檔案會逐漸增大 請保留足夠的空間需求

 

      檢查方法

      [[email protected] ~]# df -Th

      檔案系統      類型      容量 已用   可用 已用% 掛載點

      /dev/sda2     ext3     15G  2.3G   12G  17% /

      /dev/sda1     ext3     99M   12M   83M  12% /boot

      tmpfs        tmpfs    506M     0  506M   0% /dev/shm

      [[email protected] ~]#

      [[email protected] ~]# grep -E ‘MemTotal|SwapTotal‘ /proc/meminfo

      MemTotal:      1035108 kB

      SwapTotal:     1076344 kB

      [[email protected] ~]#

 

4:軟體包檢查

for i in binutils compat-gcc-34 compat-libstdc++-296 control-center \

            gcc gcc-c++ glibc glibc-common glibc-devel libaio libgcc \

            libstdc++ libstdc++-devel libXp make openmotif22 setarch

do

         rpm -q $i &>/dev/null || F="$F $i"

done ;echo $F;unset F

 

      如果這個命令執行後有輸出包名字 請向系統中補充

      如果沒有輸出資訊 則說明所需要的軟體包已經都在系統中了

5:作業系統資源限制

添加到

vim /etc/sysctl.conf  檔案底端 

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 = 1048576

net.core.rmem_max = 1048576

net.core.wmem_default = 262144

net.core.wmem_max = 262144

使核心參數生效

/sbin/sysctl -p

6:使用者資源限制

建立oracle使用者和組

      建議指定GID和UID方式(尤其叢集環境)

      [[email protected] ~]# groupadd -g 1000 oinstall

      [[email protected] ~]# groupadd -g 1001 dba

      [[email protected] ~]# useradd -u 1000 -g oinstall -G dba oracle

      [[email protected] ~]# passwd oracle

建立oracle軟體安裝檔案目錄

[[email protected] ~]# mkdir -p /u01/oracle

[[email protected] ~]# chown -R oracle:oinstall /u01/

 

7:設定oracle環境變數

vi ~oracle/.bash_profile

export ORACLE_BASE=/u01/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0

export ORACLE_SID=ora10g

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

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

載入配置

      oracle使用者登出重新登入 或 source .bash_profile

8:運行安裝命令

      若想支援中文介面 以後的EM或DBCA介面顯示中文

     

      安裝    rpm -ivh ttfonts-zh_CN-2.14-6.noarch.rpm

           export LANG=zh_CN.utf-8

          

      安裝介面使用英文則 export LANG=C

     

9:命令曆史復原

      安裝軟體rlwrap

      在家目錄下VIM .bashrc

      alias sqlplus=‘rlwrap sqlplus‘

      alias rman=‘rlwrap rman‘

      使檔案生效:. .bashrc

     

10:修改系統配置   

$ vim /u01/oracle/product/10.2.0/sqlplus/admin/glogin.sql

      set linesize 150

      set pagesize 200 

      set serveroutput on

      define _editor = vim

      set sqlprompt "_user>"    修改提示符為目前使用者

 

      登出root使用oracle使用者登入X-window執行安裝命令 runInstaller

      如果安裝包再光碟片介質上 掛載後要離開光碟片掛在位置絕對路徑執行

      因為安裝程式會建立臨時檔案 光碟片是唯讀 不能建立臨時檔案

     

      若當前案頭是root 用su - oracle切換使用者 需要在切換前root執行 # xhost +  否則oracle使用者不能串連root的案頭

 

 

 

 

 

 

 

 

 

 

                     

[[email protected] ~]# /u01/oracle/oraInventory/orainstRoot.sh

更改許可權/u01/oracle/oraInventory 到 770.

更改組名/u01/oracle/oraInventory 到 oinstall.

指令碼的執行已完成

[[email protected] ~]# /u01/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/oracle/product/10.2.0

 

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.

[[email protected] ~]#

                      

         

 

     

 

 

 

安裝結束後  資料庫處於啟動狀態

 

在命令列為scott使用者解鎖:

SQL>conn / as sysdba     切換到系統管理員

SQL>alter user scott identified by tiger account unlock;     解鎖scott

SQL>conn scott/tiger

 

 

系統reboot後怎麼啟動資料庫?

su - oracle

sqlplus /nolog

SQL>conn / as sysdba

SQL>startup

oracle 10g 安裝文檔

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.