在 RHEL 6.2 上安裝 Oracle 11gR2

在 RHEL 6.2 上安裝 Oracle 11gR2

我在 RHEL 6.2 上安裝 Oracle 11gR2 時遇到一些困難。

我已經列出了迄今為止我所採取的每一步的巨大清單。我在 VMware 上安裝了 RHEL 6.2。它自動完成了簡單的安裝。

  • 我選的是4GB內存
  • 選擇的最大大小為 80GB
  • 選定兩個處理器

我下載的oracle版本是Linux x86-64 11.2.0.1。

我正在本地電腦上安裝它,而不是遠端電腦上

我遵循了這個文檔:http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

我將我的研究中最不確定的步驟加粗:

  1. 使用適用於 VMware 的 RHEL 6.2 輕鬆安裝
  2. 已註冊 Red Hat,以便我可以獲得更新
  3. 在每個選擇處按 Enter 鍵重新安裝 vmware-tools
  4. sudo yum update最後 - 有關 GPG 金鑰的信息,選擇 y 然後選擇 y
  5. 檢查記憶體需求:

    grep MemTotal /proc/meminfo
        MemTotal: 3921368 kb
    
    uname -m
        x86_64
    
    grep SwapTotal /proc/meminfo
        SwapTotal: 6160376 kb
    
    free
                     total       used       free     shared    buffers     cached
        Mem:       3921368    2032012    1889356          0      76216    1533268
        -/+ buffers/cache:     422528    3498840
        Swap:      6160376          0    6160376
    
    df -h /dev/shm
        Filesystem            Size  Used Avail Use% Mounted on
        tmpfs                 1.9G  276K  1.9G   1% /dev/shm
    
    df -h /tmp
        Filesystem            Size  Used Avail Use% Mounted on
        /dev/sda2              73G  2.7G   67G   4% /
    
    
    df -h
        Filesystem            Size  Used Avail Use% Mounted on
        /dev/sda2              73G  2.7G   67G   4% /
        tmpfs                 1.9G  276K  1.9G   1% /dev/shm
        /dev/sda1             291M   58M  219M  21% /boot
    

    在我看來一切都很好,除了交換?

  6. 軟體需求:

    cat /proc/version
        Linux version 2.6.32-220.el6.x86_64 ([email protected]) (gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC) ) #1 SMP Wed Nov 9 08:03:13 EST 2011
    
    uname -r
        2.6.32-220.el6.x86_64
    

    (與上方相同,但無論如何)

    根據教學應該是在 Red Hat Enterprise Linux 6、2.6.32-71.el6.x86_64 或更高版本上。

  7. 這些是我安裝的軟體版本:

    binutils-2.20.51.0.2-5.28.el6.x86_64
    compat-libcap1-1.10-1.x86_64
    compat-libstdc++-33-3.2.3-69.el6.x86_64
    compat-libstdc++-33.i686 0:3.2.3-69.el6
    gcc-4.4.6-3.el6.x86_64
    gcc-c++.x86_64 0:4.4.6-3.el6
    glibc-2.12-1.47.el6_2.12.x86_64
    glibc-2.12-1.47.el6_2.12.i686
    glibc-devel-2.12-1.47.el6_2.12.x86_64
    glibc-devel.i686 0:2.12-1.47.el6_2.12
    ksh.x86_64 0:20100621-12.el6_2.1
    libgcc-4.4.6-3.el6.x86_64
    libgcc-4.4.6-3.el6.i686
    libstdc++-4.4.6-3.el6.x86_64
    libstdc++.i686 0:4.4.6-3.el6
    libstdc++-devel.i686 0:4.4.6-3.el6
    libstdc++-devel-4.4.6-3.el6.x86_64
    libaio-0.3.107-10.el6.x86_64
    libaio-0.3.107-10.el6.i686
    libaio-devel-0.3.107-10.el6.x86_64
    libaio-devel-0.3.107-10.el6.i686
    make-3.81-19.el6.x86_64
    sysstat-9.0.4-18.el6.x86_64
    
    unixODBC-2.2.14-11.el6.x86_64 
    unixODBC-devel-2.2.14-11.el6.x86_64
    unixODBC-devel-2.2.14-11.el6.i686
    unixODBC-2.2.14-11.el6.i686
    
  8. 可能在這裡或第9步搞砸了:

    /usr/sbin/groupadd oinstall
    /usr/sbin/groupadd dba (not sure why this isn't in the tutorial)
    /usr/sbin/useradd -g oinstall -G dba oracle
    passwd oracle
    
    /sbin/sysctl -a | grep sem
    Xkernel.sem = 250   32000   32  128
    
    /sbin/sysctl -a | grep shm
    kernel.shmmax = 68719476736
    kernel.shmall = 4294967296
    kernel.shmmni = 4096
    vm.hugetlb_shm_group = 0
    
    /sbin/sysctl -a | grep file-max
    Xfs.file-max = 384629
    
    /sbin/sysctl -a | grep ip_local_port_range
    Xnet.ipv4.ip_local_port_range = 32768   61000
    
    /sbin/sysctl -a | grep rmem_default
    Xnet.core.rmem_default = 124928
    
    /sbin/sysctl -a | grep rmem_max
    Xnet.core.rmem_max = 131071
    
    /sbin/sysctl -a | grep wmem_max
    Xnet.core.wmem_max = 131071
    
    /sbin/sysctl -a | grep wmem_default
    Xnet.core.wmem_default = 124928
    

    這是我的 sysctl.conf 文件,我只添加了較大的項目:

    # Kernel sysctl configuration file for Red Hat Linux
    #
    # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
    # sysctl.conf(5) for more details.
    
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    
    # Controls source route verification
    net.ipv4.conf.default.rp_filter = 1
    
    # Do not accept source routing
    net.ipv4.conf.default.accept_source_route = 0
    
    # Controls the System Request debugging functionality of the kernel
    kernel.sysrq = 0
    
    # Controls whether core dumps will append the PID to the core filename.
    # Useful for debugging multi-threaded applications.
    kernel.core_uses_pid = 1
    
    # Controls the use of TCP syncookies
    net.ipv4.tcp_syncookies = 1
    
    # Disable netfilter on bridges.
    net.bridge.bridge-nf-call-ip6tables = 0
    net.bridge.bridge-nf-call-iptables = 0
    net.bridge.bridge-nf-call-arptables = 0
    
    # Controls the maximum size of a message, in bytes
    kernel.msgmnb = 65536
    
    # Controls the default maxmimum size of a mesage queue
    kernel.msgmax = 65536
    
    # Controls the maximum shared segment size, in bytes
    kernel.shmmax = 68719476736
    
    # Controls the maximum number of shared memory segments, in pages
    kernel.shmall = 4294967296
    
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576
    
    /sbin/sysctl -p
    net.ipv4.ip_forward = 0
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.default.accept_source_route = 0
    kernel.sysrq = 0
    kernel.core_uses_pid = 1
    net.ipv4.tcp_syncookies = 1
    error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
    error: "net.bridge.bridge-nf-call-iptables" is an unknown key
    error: "net.bridge.bridge-nf-call-arptables" is an unknown key
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.shmmax = 68719476736
    kernel.shmall = 4294967296
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 262144
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576
    

    蘇甲骨文

    ulimit -Sn
    1024
    ulimit -Hn
    1024
    ulimit -Su
    1024
    ulimit -Hu
    30482
    ulimit -Su
    1024
    ulimit -Ss
    10240
    ulimit -Hs
    unlimited
    

    蘇-

    nano /etc/security/limits.conf
    

    (添加到文件末尾):

    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  1024
    oracle              hard    nofile  65536
    oracle              soft    stack   10240
    
    exit
    exit
    su -
    
    mkdir -p /app/
    chown -R oracle:oinstall /app/
    chmod -R 775 /app/
    
  9. 這可能是我搞砸的地方

    然後我退出了根帳戶,所以現在我回到了我的帳戶克里斯,然後我:

    su - oracle
    
    echo $SHELL
    /bin/bash
    
    umask
    0022 (so it should be set already to what is necessary)
    

    另外,從我讀到的內容來看,我不需要設定 DISPLAY 變量,因為我將其安裝在本地主機上。

    然後我打開Oracle的.bash_profile並將其更改為以下內容:

    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    

使用者特定環境和啟動程序:

PATH=$PATH:$HOME/bin; export PATH
ORACLE_BASE=/app/oracle
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID

然後,我關閉了從 Windows 7 共享我的桌面資料夾的虛擬機,然後在 chris 打開終端時重新打開登入的虛擬機:

su - 

由於某種原因,共用資料夾沒有出現,所以我再次重新安裝了VMware Tools並重新啟動,然後和以前一樣:

su - 

cp -R linux_oracle/database /db; chown -R oracle:oinstall /db; chmod -R 775 /db; ll /db
drwxrwxr-x. 8 oracle oinstall 4096 Jun  5 06:20 database

exit
su - oracle
cd /db/database
./runInstaller

最後是臭名昭著的 JAVA:132 錯誤訊息:

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 65646 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 6015 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-06-05_06-47-12AM. Please wait ...[oracle@localhost database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2012-06-05_06-47-12AM/jdk/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
    at java.lang.Runtime.load0(Runtime.java:769)
    at java.lang.System.load(System.java:968)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
    at java.lang.Runtime.loadLibrary0(Runtime.java:822)
    at java.lang.System.loadLibrary(System.java:993)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1509)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1530)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    **at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

答案1

當你遇到這類問題時,yum whatprovides答案是:

$ sudo yum whatprovides libXext.so.6
Loaded plugins: protect-packages, protectbase, rhnplugin, security
0 packages excluded due to repository protections
libXext-1.0.1-2.1.i386 : X.Org X11 libXext runtime library
Repo        : rhel-x86_64-server-5
Matched from:
Other       : libXext.so.6



libXext-1.0.1-2.1.i386 : X.Org X11 libXext runtime library
Repo        : installed
Matched from:
Other       : Provides-match: libXext.so.6

所以你需要安裝libXext。

答案2

您是否從 root 或 oracle 用戶開始安裝?我認為這是顯示相關錯誤...如果您從 root 登出並使用 oracle 用戶登錄,然後嘗試安裝可能會解決此錯誤。

請不要執行 su - oracle,完全從 root 登出並以 oracle 使用者身分登入。錯誤將得到解決。

相關內容