乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      在 Red Hat 5 下安裝 Oracle 10g 實踐

       lkyhzuma 2011-04-12

      一個實踐的小任務——在一臺 Dell 的 PC Server 上安裝 Oracle 10g,同事先幫把64位的 Oracle 安裝文件通過 WinSCP 傳遞到了 Server 上,然后就開始工作了,Google 了一篇網(wǎng)上的技術(shù)文檔,覺得 Linux 下安裝 Oracle 還真繁瑣,之前做的工作比較多,雖然這篇文章是32位 Linux 系統(tǒng)的,而要安裝的 Dell 機器是64位的,但是步驟大同小異,現(xiàn)總結(jié)如下:

      1.檢查內(nèi)核版本

      要在 Linux 上安裝 Oracle,所需內(nèi)核版本:2.4.9-e.25(或更高版本)
      通過運行以下命令檢查內(nèi)核版本:

      # uname -r
      2.6.18-128.e15

      2.程序包安裝和更新

      在安裝好 Linux 后,需驗證安裝是否具備 Oracle 10g 所需要的所有程序包和更新,按以下步驟驗證安裝,所需程序包的版本(或更高版本):

      gcc-3.2.3-2
      make-3.79
      binutils-2.11
      openmotif-2.2.2-16
      setarch-1.3-1
      compat-gcc-7.3-2.96.122
      compat-gcc-c++-7.3-2.96.122
      compat-libstdc++-7.3-2.96.122
      compat-libstdc++-devel-7.3-2.96.122
      compat-db-4.0.14.5

      要查看系統(tǒng)上安裝了這些程序包的哪些版本,以 root 用戶身份運行以下命令:

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

      我的實踐過程中遇到了好幾個程序包都沒有安裝,所以只能自己配置一下yum源后,進行安裝,如果不配置源的話,Linux程序包的依賴性簡直是要人命,我配置的是文件系統(tǒng)源,簡單說就是把Red Hat的ISO文件掛載到文件系統(tǒng)上,然后添加到y(tǒng)um的repos中去。具體做法如下:

      [root@newtest media]# mkdir /redhat
      [root@newtest media]# mount -o loop /media/RHEL-5.4_x86_64_DVD.iso /redhat
      [root@newtest etc]# cd /etc
      [root@newtest etc]# cd yum.repos.d/
      [root@newtest yum.repos.d]# vi rhel-debuginfo.repo

       

      [rhel-debuginfo]
      name=Red Hat Enterprise Linux $releasever – $basearch – Debug
      baseurl=ftp://ftp.redhat.com/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
      enabled=0
      gpgcheck=1
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

      [Server]
      name=Server
      enabled=1
      gpgcheck=0
      gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
      baseurl=file:///redhat/Server
      ~
      “rhel-debuginfo.repo” 14L, 388C written

      [root@newtest yum.repos.d]# yum grouplist
      Loaded plugins: rhnplugin, security
      This system is not registered with RHN.
      RHN support will be disabled.
      Setting up Group Process
      rhel-debuginfo | 1.3 kB 00:00
      rhel-debuginfo/primary | 845 kB 00:00
      rhel-debuginfo/group | 1.0 MB 00:00
      Installed Groups:
      FTP 服務器
      GNOME 桌面環(huán)境
      Java開發(fā)
      KDE (K 桌面環(huán)境)
      X 窗口系統(tǒng)
      萬維網(wǎng)服務器
      辦公/生產(chǎn)率
      圖形
      圖形化互聯(lián)網(wǎng)
      基于文本的互聯(lián)網(wǎng)
      開發(fā)工具
      開發(fā)庫
      打印支持
      服務器配置工具
      游戲和娛樂
      管理工具
      系統(tǒng)工具
      編輯器
      網(wǎng)絡服務器
      老的網(wǎng)絡服務器
      老的軟件開發(fā)
      老的軟件支持
      視頻和音頻
      郵件服務器
      Available Groups:
      DNS 名稱服務器
      GNOME 軟件開發(fā)
      KDE 軟件開發(fā)
      MySQL 數(shù)據(jù)庫
      OpenFabrics 企業(yè)版發(fā)行
      PostgreSQL 數(shù)據(jù)庫
      Windows 文件服務器
      X 軟件開發(fā)
      工程和科學
      授權(quán)和出版
      新聞服務器
      Done

      [root@newtest yum.repos.d]# yum install openmotif
      Loaded plugins: rhnplugin, security
      This system is not registered with RHN.
      RHN support will be disabled.
      rhel-debuginfo 3040/3040
      Setting up Install Process
      Resolving Dependencies
      –> Running transaction check
      —> Package openmotif.i386 0:2.3.1-2.el5 set to be updated
      rhel-debuginfo/filelists | 2.7 MB 00:00
      –> Processing Dependency: libXp.so.6 for package: openmotif
      –> Processing Dependency: libXmu.so.6 for package: openmotif
      —> Package openmotif.x86_64 0:2.3.1-2.el5 set to be updated
      –> Processing Dependency: libXp.so.6()(64bit) for package: openmotif
      –> Running transaction check
      —> Package libXmu.i386 0:1.0.2-5 set to be updated
      —> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
      —> Package libXp.x86_64 0:1.0.0-8.1.el5 set to be updated
      –> Finished Dependency Resolution

      Dependencies Resolved

      ===========================================
      Package Arch Version Repository Size
      ===========================================
      Installing:
      openmotif i386 2.3.1-2.el5 rhel-debuginfo 1.5 M
      openmotif x86_64 2.3.1-2.el5 rhel-debuginfo 1.5 M
      Installing for dependencies:
      libXmu i386 1.0.2-5 rhel-debuginfo 63 k
      libXp i386 1.0.0-8.1.el5 rhel-debuginfo 22 k
      libXp x86_64 1.0.0-8.1.el5 rhel-debuginfo 23 k

      Transaction Summary
      ===========================================
      Install 5 Package(s)
      Update 0 Package(s)
      Remove 0 Package(s)

      Total download size: 3.2 M
      Is this ok [y/N]: y
      Downloading Packages:
      ——————————————————————————
      Total 867 MB/s | 3.2 MB 00:00
      Running rpm_check_debug
      Running Transaction Test
      Finished Transaction Test
      Transaction Test Succeeded
      Running Transaction
      Installing : libXp 1/5
      Installing : libXp 2/5
      Installing : libXmu 3/5
      Installing : openmotif 4/5
      Installing : openmotif 5/5

      Installed:
      openmotif.i386 0:2.3.1-2.el5 openmotif.x86_64 0:2.3.1-2.el5

      Dependency Installed:
      libXmu.i386 0:1.0.2-5 libXp.i386 0:1.0.0-8.1.el5 libXp.x86_64 0:1.0.0-8.1.el5

      Complete!

      3.驗證系統(tǒng)要求

      要驗證系統(tǒng)是否滿足 Oracle 10g 數(shù)據(jù)庫的最低要求,以 root 用戶身份登錄并運行一些命令。

      要查看可用 RAM 和交換空間大小,運行以下命令:

      # grep MemTotal /proc/meminfo
      MemTotal:512236 kB
      # grep SwapTotal /proc/meminfo
      SwapTotal:1574360 kB

      所需最小 RAM 為 512MB,而所需最小交換空間為 1GB。對于 RAM 小于或等于 2GB 的系統(tǒng),交換空間應為 RAM 數(shù)量的兩倍;對于 RAM 大于 2GB 的系統(tǒng),交換空間應為 RAM 數(shù)量的一到兩倍。

      Oracle 10g 軟件還需要 2.5GB 的可用磁盤空間,而數(shù)據(jù)庫則另需 1.2GB 的可用磁盤空間。/tmp 目錄至少需要 400MB 的可用空間。要檢查系統(tǒng)上的可用磁盤空間,運行以下命令:

      # df -h
      Filesystem Size Used Avail Use% Mounted on
      /dev/sda3 6.8G 1.3G 5.2G 20% /
      /dev/sda1 99M 17M 77M 18% /boot

      4.創(chuàng)建 dba 組和 oracle 用戶
      Oracle數(shù)據(jù)庫必須在Oracle用戶下才能安裝,所以需要建立相應的用戶群組、用戶,以及設(shè)置相應的目錄屬主、目錄權(quán)限

      # groupadd dba
      # useradd -G dba oracle
      # mkdir -p /app/oracle/product/10.2.0/db_1
      # chown -R oracle:dba /app/oracle
      # chmod -R 775 /app/oracle
      # passwd oracle

      5.修改 /etc/redhat-release 文件
      獲得 Oracle 10g 認證的 Redhat Linux 最高版本為redhat-4, 所以需要修改 redhat-release 文件。

      # vi /etc/redhat-release
      # Red Hat Enterprise Linux Server release 5.3 (Tikanga)
      redhat-4

      6.配置Linux內(nèi)核參數(shù)

      Linux 內(nèi)核非常出色。與大多數(shù)其他 *NIX 系統(tǒng)不同,Linux 允許在系統(tǒng)啟動和運行時修改大多數(shù)內(nèi)核參數(shù)。完成內(nèi)核參數(shù)更改后不必重新啟動系統(tǒng)。Oracle 數(shù)據(jù)庫 10g 需要以下所示的內(nèi)核參數(shù)設(shè)置。其中給出的是最小值,因此如果您的系統(tǒng)使用的值較大,則不要更改它。以 root 用戶身份登錄后執(zhí)行下命令:

      # vi /etc/sysctl.conf
      # For Oracle
      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 = 262144
      net.core.rmem_max = 262144
      net.core.wmem_default = 262144
      net.core.wmem_max = 262144

      保存文件后執(zhí)行以下命令激活更改:

      # /sbin/sysctl -p

      7.為oracle用戶設(shè)置Shell限制

      Oracle 建議對每個 Linux 帳戶可以使用的進程數(shù)和打開的文件數(shù)設(shè)置限制。要進行這些更改,以 root 用戶的身份執(zhí)行

      下列命令:

      # vi /etc/security/limits.conf
      # For Oracle
      oracle soft nproc 2047
      oracle hard nproc 16384
      oracle soft nofile 1024
      oracle hard nofile 65536

       

      # vi /etc/pam.d/login
      Session required /lib/security/pam_limits.so

      以 oracle 用戶身份運行以下命令:

      # vi .bash_profile
      if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
      ulimit -p 16384
      ulimit -n 65536
      else
      ulimit -u 16384 -n 65536
      fi
      umask 022
      fi

      以 root 用戶身份運行以下命令:

      # vi /etc/csh.login
      if ( \$USER == “oracle” ) then
      limit maxproc 16384
      limit descriptors 65536
      umask 022
      endif

      8.臨時修改 Oracle 用戶語言環(huán)境

      $ LC_ALL=’us_EN’

      9.配置 Oracle 用戶環(huán)境變量

      要使用 Oracle 產(chǎn)品,應該或必須設(shè)置幾個環(huán)境變量。對于數(shù)據(jù)庫服務器,建議設(shè)置以下環(huán)境變量:

      • ORACLE_BASE
      • ORACLE_HOME
      • ORACLE_SID
      • PATH

      如果您在同一服務器上安裝了多個 Oracle 產(chǎn)品或數(shù)據(jù)庫,則 ORACLE_HOME、ORACLE_SID 和 PATH 變量可能會更改。ORACLE_BASE 變量不應更改,并可以在需要時在您的登錄配置文件中設(shè)置它。Oracle 提供了一個稱作 oraenv 的實用程序來設(shè)置其他變量。
      以 oracle 身份登錄,并通過在 .bash_profile 或 .profile(bash 或 ksh)中添加以下行,將 ORACLE_BASE 添加到登錄配置文件:

      $ vi .bash_profile
      # For Oracle
      TMP=/tmp; export TMP
      TMPDIR=$TMP; export TMPDIR
      ORACLE_BASE=/home/oracle; export ORACLE_BASE
      ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
      ORACLE_SID=orcl; export ORACLE_SID
      ORACLE_TERM=xterm; export ORACLE_TERM
      PATH=/usr/sbin:$PATH; export PATH
      PATH=$ORACLE_HOME/bin:$PATH; export PATH
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
      CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

      10.安裝 Oracle

      $ unzip 10201_database_linux32.zip
      $ cd database
      $ ./runInstaller

      進入圖形安裝界面,根據(jù)提示安裝即可。

      在安裝的最后彈出一個“Setup Privileges”窗口,提示需要以 root 用戶身份運行配置腳本。以 root 用戶身份登錄,切換到該窗口中指示的目錄,然后執(zhí)行 root.sh 腳本。該腳本提示輸入本地 bin 目錄的位置。按 Enter 鍵接受默認值。當腳本完成時,返回到 Setup Privileges 窗口并單擊 OK。

      $ su root
      # /home/oracle/oralnventory/orainstRoot.sh
      # /oracle/product/10.2.0/db_1/root.sh

      11.恢復 /etc/redhat-release 文件。

      # vi /etc/redhat-release
      Red Hat Enterprise Linux Server release 5.3 (Tikanga)

      12.啟動 Lisencer

      $ lsnrctl start

      13.啟動及關(guān)閉數(shù)據(jù)庫

      $ sqlplus /nolog
      SQL> connect / as sysdba
      Connected to an idle instance.
      SQL> startup
      SQL> shutdown

      14.設(shè)置自啟動

      # vi /etc/oratab
      TSH1:/oracle/product/10.2.0/db_1:Y

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多