Oracle 10G R2在Linux X86_64下的安裝

rainnyzhong發表於2009-06-25

Oracle 10G R2Linux X64下的安裝

作者:Rainny

日期:2008-6-25

,安裝的先決條件

1.硬體

(1)RAM:至少512M的實體記憶體

下面為實體記憶體和交換空間的建議值:

RAM

Swap Space

Up to 512 MB

2 times the size of RAM

Between 1024 MB and 2048 MB

1.5 times the size of RAM

Between 2049 MB and 8192 MB

Equal to the size of RAM

More than 8192 MB

0.75 times the size of RAM

(2)/tmp空間: 至少400 MB的磁碟空間在/tmp目錄

(3)1.5G~3.5G的磁碟空間給ORACLE軟體

(4)1.2G的磁碟空間給ORACLE預配置資料庫

下面為檢查硬體先決條件的命令:

(1) 檢查總的實體記憶體:

# grep MemTotal /proc/meminfo

(2) 檢查系統交換空間:

# grep SwapTotal /proc/meminfo

(3) 檢查系統可用記憶體和交換空間:

# free

(4)檢查/tmp目錄的空閒磁碟空間:

# df -k /tmp

如果/tmp目錄沒有400M的空閒磁碟空間,請按下面操作:

    • 刪除/tmp目錄中不必要的檔案以清出足夠的空閒空間
    • 設定oracle使用者的環境變數 TEMP TMPDIR
    • 增大包含/tmp 目錄的分割槽空間

    (5)檢查系統可用的總的空間磁碟空間:

    # df -k

    下面根按ORACLE安裝型別列出了大概的磁碟空間要求:

    Installation Type

    Requirement for Software Files (GB)

    Enterprise Edition

    1.9

    Standard Edition

    1.9

    Custom (maximum)

    2.0

    (6)檢查系統的體系結構(CPU)是否可以執行ORACLE軟體,請輸入下面的命令:

    # grep "model name" /proc/cpuinfo

    Note:

    這個命令會顯示CPU處理器的型別,你需要檢查一下這個CPU是否和ORACLE發行版本符合.

    2.軟體

    下面為軟體要求:

    Item

    Requirement

    Operating system

    One of the following operating system versions:

    • Red Hat Enterprise Linux AS/ES 3.0 (Update 4 or later)
    • Red Hat Enterprise Linux AS/ES 4.0 (Update 1 or later)
    • SUSE Linux Enterprise Server 9.0 with SP2 or later

    Kernel version

    The system must be running the following kernel version (or a later version):

    Red Hat Enterprise Linux 3.0:

    2.4.21-27.EL

    Note: This is the default kernel version.

    Red Hat Enterprise Linux 4.0:

    2.6.9-11.EL

    SUSE Linux Enterprise Server 9.0:

    2.6.5-7.201

    Packages

    The following packages (or later versions) must be installed:

    Red Hat Enterprise Linux 3.0:

    make-3.79.1-17

    compat-db 4.0.14-5.1

    control-center-2.2.0.1-13

    gcc-3.2.3-47

    gcc-c++-3.2.3-47

    gdb-6.1post-1.20040607.52

    glibc-2.3.2-95.30

    glibc-common-2.3.2-95.30

    glibc-devel-2.3.2-95.30

    glibc-devel-2.3.2-95.20 (32 bit)

    compat-db-4.0.14-5

    compat-gcc-7.3-2.96.128

    compat-gcc-c++-7.3-2.96.128

    compat-libstdc++-7.3-2.96.128

    compat-libstdc++-devel-7.3-2.96.128

    gnome-libs-1.4.1.2.90-34.2 (32 bit)

    libstdc++-3.2.3-47

    libstdc++-devel-3.2.3-47

    openmotif-2.2.3-3.RHEL3

    sysstat-5.0.5-5.rhel3

    setarch-1.3-1

    libaio-0.3.96-3

    libaio-devel-0.3.96-3

    Red Hat Enterprise Linux 4.0:

    binutils-2.15.92.0.2-10.EL4

    compat-db-4.1.25-9

    control-center-2.8.0-12

    gcc-3.4.3-9.EL4

    gcc-c++-3.4.3-9.EL4

    glibc-2.3.4-2

    glibc-common-2.3.4-2

    gnome-libs-1.4.1.2.90-44.1

    libstdc++-3.4.3-9.EL4

    libstdc++-devel-3.4.3-9.EL4

    make-3.80-5

    pdksh-5.2.14-30

    sysstat-5.0.5-1

    xscreensaver-4.18-5.rhel4.2

    SUSE Linux Enterprise Server 9:

    binutils-2.15.90.0.1.1-32.5

    gcc-3.3.3-43.24

    gcc-c++-3.3.3-43.24

    glibc-2.3.3-98.28

    gnome-libs-1.4.1.7-671.1

    libstdc++-3.3.3-43.24

    libstdc++-devel-3.3.3-43.24

    make-3.80-184.1

    pdksh-5.2.14-780.1

    sysstat-5.0.1-35.1

    xscreensaver-4.16-2.6

    PL/SQL native compilation, Pro*C/C++, Oracle Call Interface, Oracle C++ Call Interface, Oracle XML Developer's Kit (XDK)

    Intel C++ Compiler 8.1 or later and the version of GNU C and C++ compilers listed previously for the distribution are supported for use with these products.

    Note: Intel C++ Compiler v8.1 or later is supported. However, it is not required for installation. On Red Hat Enterprise Linux 3, OCCI is supported with version 3.2 of the GNU C++ compiler. This is the default compiler version. OCCI is also supported with Intel Compiler v8.1 with gcc 3.2.3 standard template libraries.

    Oracle XML Developer's Kit is not supported with GCC on Red Hat Linux 4.0. It is supported only with Intel C++ Compiler (ICC).

    On Red Hat Enterprise Linux 4.0, Oracle C++ Call Interface (OCCI) does not support GCC 3.4.3. To use OCCI on Red Hat Enterprise Linux 4.0, you need to install GCC 3.2.3.

    Oracle JDBC/OCI Drivers

    You can use the following optional JDK version with the Oracle JDBC/OCI drivers; however, it is not required for the installation:

    • Sun JDK 1.5.0 (64-bit)
    • Sun JDK 1.5.0 (32-bit)
    • Sun JDK 1.4.2_09 (32-bit)

    (1) 檢查linux的發行版本:

    # cat /proc/version

    (2)檢視linux的核心:

    # uname -r

    (3)檢查所要求的包是否有安裝:

    # rpm -q package_name

    ,配置主機名稱解析

    如果你沒有設定名稱解析,在你執行OUI(Oracle Universal Installer)時有可能報錯,為了避免這類錯誤,你必須確保你的主機名稱只是透過/etc/hosts檔案來解析的.

    確保主機名稱只透過/etc/hosts 檔案,你需按下面的步驟操作:

    1. Verify that the /etc/hosts file is used for name resolution. You can do this by checking the hosts file entry in the nsswitch.conf file as follows:

    # cat /etc/nsswitch.conf | grep hosts

    The output of this command should contain an entry for files.

    2. Verify that the host name has been set by using the hostname command as follows:

    # hostname

    The output of this command should be similar to the following:

    myhost.mycomputer.com

    3. Verify that the domain name has not been set dynamically by using the domainname command as follows:

    # domainname

    This command should not return any results.

    4. Verify that the hosts file contains the fully qualified host name by using the following command:

    # cat /etc/hosts | grep `eval hostname`

    The output of this command should contain an entry for the fully qualified host name and for localhost.

    For example:

    192.168.100.16    myhost.us.mycompany.com   myhost
    127.0.0.1         localhost                 localhost.localdomain

    If the hosts file does not contain the fully qualified host name, then open the file and make the required changes in it.

    ,安裝JDK:

    #chmod a+x jdk-1_5_0_15-linux-amd64-rpm.bin

    # ./ jdk-1_5_0_15-linux-amd64-rpm.bin

    #rpm –ivh jdk-1_5_0_15-linux-amd64.rpm

    移除原來的java:

    #cd /usr/bin

    #mv *.java *.java.bak

    JAVA設定全域性環境變數:

    # cd /etc

    #vi profile

    JAVA_HOME=/usr/java/j2sdk1.4.2_04

    PATH=$PATH:$JAVA_HOME/bin

    CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

    export JAVA_HOME PATH CLASSPATH

    檢視新安裝的JDK是否生效:

    #java -version

    ,建立ORACLE使用者組和使用者

    (1)OSDBA 使用者組 (dba)

    當你是在作業系統上第一次安裝ORACLE資料庫軟體時,你必須建立這個組.在這個組裡面的作業系統使用者帳戶擁有管理資料庫的許可權(sysdba許可權),這個組的預設名稱是dba.

    If you want to specify a group name other than the default dba group, then you must choose the Custom installation type to install the software or start Oracle Universal Installer as a user that is not a member of this group. In this case, Oracle Universal Installer prompts you to specify the name of this group.

    (2) Oracle 目錄冊組 (oinstall)

    當你是在作業系統上第一次安裝ORACLE資料庫軟體時,你必須建立這個組. 組名通常是 oinstall. 這個組擁有Oracle inventory, 這相當於一個目錄冊,裡面記載了安裝於這個系統上的所有ORACLE軟體.

    Note:

    If Oracle software is already installed on the system, then the existing Oracle Inventory group must be the primary group of the operating system user that you use to install new Oracle software.

    (3) The Oracle software owner user (typically, oracle)

    當你是在作業系統上第一次安裝ORACLE資料庫軟體時,你必須建立這個使用者,通常這個使用者名稱是oracle. 這個使用者擁有所有的oracle軟體.oinstall(Oracle Inventory group)必須是這個使用者的第一個組,dba(OSDBA groups)是這個使用者的第二個組.

    實際的建立:

    (1) 建立oracle目錄冊組(oinstall)

    檢查oinstall組是否已經存

    當你是在作業系統上第一次安裝ORACLE資料庫軟體時,Oracle Universal Installer將建立一個oraInst.loc 檔案. 這個檔案標識Oracle 目錄冊組的名稱以及Oracle Inventory 的目錄路徑.

    # more /etc/oraInst.loc

    If the output of this command shows the oinstall group name, then the group already exists.

    If the oraInst.loc file exists, then the output from this command is similar to the following:

    inventory_loc=/u01/app/oracle/oraInventory
    inst_group=oinstall

    The inst_group parameter shows the name of the Oracle Inventory group, oinstall.

    如果不存在,則用下面的命令建立oinstall:

    # /usr/sbin/groupadd oinstall

    (2)建立OSDBA(dba)

    檢查dba組是否存在:

    # grep dba /etc/group

    如果不存在,則用下面的命令建立:

    # /usr/sbin/groupadd dba

    (3)建立oracle軟體的擁有者(oracle使用者)

    檢查oracle使用者是否存在:

    # id oracle

    如果不存在,則用下面的命令建立:

    # /usr/sbin/useradd -g oinstall -G dba[,oper] oracle

    In this command:

    · The -g option specifies the primary group, which must be the Oracle Inventory group, for example oinstall

    · The -G option specifies the secondary groups, which must include the OSDBA group and if required, the OSOPER group. For example, dba or dba,oper

    oracle使用者設密碼:

    # passwd oracle

    修改oracle使用者:

    如果oracle使用者的首要組不是oinstall,或次要組不是dba,則用下面的命令對oracle使用者進行修改:

    # /usr/sbin/usermod -g oinstall -G dba[,oper] oracle

    (4)建立nobody使用者:

    
                                            

    來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/684234/viewspace-1025021/,如需轉載,請註明出處,否則將追究法律責任。

    相關文章