无码视频在线观看,99人妻,国产午夜视频,久久久久国产一级毛片高清版新婚

  • 始創(chuàng)于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊有禮 登錄
    • 掛牌上市企業(yè)
    • 60秒人工響應(yīng)
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補(bǔ)償
    全部產(chǎn)品
    您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

    Redhat Linux下Oracle 10g安裝說明

    發(fā)布時(shí)間:  2012/8/15 17:37:51

    RedHat linux下Oracle 10g 安裝說明 (以下步驟是直接在服務(wù)器上的gnome下安裝。)
    (以下代碼轉(zhuǎn)自互聯(lián)網(wǎng)上的多篇文章,為了便于學(xué)習(xí),經(jīng)過整理和完善。)
    RHEL5 ()安裝RedHat5時(shí)要獨(dú)立分配磁盤給SWAP,空間大小應(yīng)該是內(nèi)存大小*2
    最好使用內(nèi)存>1G的機(jī)器
    系統(tǒng)檢查命令:
    檢查內(nèi)存情況
    # grep MemTotal /proc/meminfo -內(nèi)存大小
    -
     

    # grep SwapTotal /proc/meminfo --交換分區(qū)大小swap
    /tmp分區(qū)
    # df -k /tmp 要求/tmp 400MB
    cpu信息
    # grep "model name" /proc/cpuinfo
    操作系統(tǒng)型號(hào)
    # cat /etc/issue
    內(nèi)核型號(hào)
    # uname -r
    Oracle 分64位和32位 因此 你的機(jī)器,rehat as5,oracle 應(yīng)同樣是64位 或32位
    RHEL5 安裝Oracle10所應(yīng)該注意的
    1 .由于orcale10不支持 RHEL5 所以需要修改/etc/RedHat_realease 將 Red Hat Enterprise Linux Server release 5 (Tikanga) 改為Red Hat Enterprise Linux Server release 4 (Tikanga)
    2 .修改/etc/hosts 文件將127.0.0.1改為你的ip 否則網(wǎng)絡(luò)檢查通不過
    3 .依次安裝下面的包
    rpm -q libXp openmotif compat libaio ---檢查是否有安裝
    rpm -ivh libXp-1.0.0-8.i386.rpm
    ...
    libXp-1.0.0-8.i386.rpm
    openmotif22-2.2.3-18.i386.rpm
    compat-db-4.2.52-5.1.i386.rpm
    compat-gcc-34-3.4.6-4.i386.rpm
    compat-gcc-34-c++-3.4.6-4.i386.rpm
    compat-libstdc++-33-3.2.3-61.i386.rpm
    libaio-0.3.106-3.2.i386.rpm
    4 .因?yàn)橹形挠衼y碼所以設(shè)置用英文安裝 export LC_ALL=en_US
    5 .在安裝過程中選擇高級(jí)安裝,并將數(shù)據(jù)庫語言選中文 字符集選GBK的。
    6.
    RHEL5 上 安裝 Oracle 10.2.0.1 步驟
    以root的身份完成下面的工作:
    修改內(nèi)核參數(shù)
    增加下面的內(nèi)容到文件 /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
    附加說明:
    編輯文件 /etc/sysctl.conf,修改以下項(xiàng)目,如果沒有可以自己添加。
    kernel.shmall = 2097152 # 可以使用的共享內(nèi)存的總量。
    kernel.shmmax = 2147483648 # 最大共享內(nèi)存段大小。
    kernel.shmmni = 4096 # 整個(gè)系統(tǒng)共享內(nèi)存段的最大數(shù)目。
    kernel.sem = 250 32000 100 128 # 每個(gè)信號(hào)對(duì)象集的最大信號(hào)對(duì)象數(shù);系統(tǒng)范圍內(nèi)最大信號(hào)對(duì)象數(shù);每個(gè)信號(hào)對(duì)象支持的最大操作數(shù);系統(tǒng)范圍內(nèi)最大信號(hào)對(duì)象集數(shù)。
    fs.file-max = 65536 # 系統(tǒng)中所允許的文件句柄最大數(shù)目。
    net.ipv4.ip_local_port_range = 1024 65000 # 應(yīng)用程序可使用的IPv4端口范圍。
    net.core.rmem_default = 1048576 # 套接字接收緩沖區(qū)大小的缺省值
    net.core.rmem_max = 1048576 # 套接字接收緩沖區(qū)大小的最大值
    net.core.wmem_default = 262144 # 套接字發(fā)送緩沖區(qū)大小的缺省值
    net.core.wmem_max = 262144 # 套接字發(fā)送緩沖區(qū)大小的最大值
    注:內(nèi)核參數(shù)并非必須修改,可以根據(jù)自己實(shí)際情況而定。
    運(yùn)行下面的命令使得內(nèi)核參數(shù)生效:
    /sbin/sysctl -p
    然后,應(yīng)該檢查一下上面的操作是否正確:
    # /sbin/sysctl -a | grep sem
    # /sbin/sysctl -a | grep shm
    # /sbin/sysctl -a | grep file-max
    # /sbin/sysctl -a | grep ip_local_port_range
    增加下面的內(nèi)容到文件 /etc/security/limits.conf 文件中:
    soft nproc 2047
    hard nproc 16384
    soft nofile 1024
    hard nofile 65536
    增加下面的內(nèi)容到文件 /etc/pam.d/login 中:
    session required /lib/security/pam_limits.so
    session required pam_limits.so
    因?yàn)镾ELINUX對(duì)Oracle有影響,所以把secure linux設(shè)成無效,編輯文件 /etc/selinux/config :
    SELINUX=disabled
    當(dāng)然你也可以用圖形界面下的工具 (系統(tǒng) > 管理 > 安全級(jí)別和防火墻). 選擇SELinux頁面并且設(shè)為無效.
    安裝(以下安裝命令沒有執(zhí)行,只是安裝3列出的軟件包即可)
    安裝下面的包:
    # 從RedHat AS5 光盤1
    cd /media/cdrom/Server
    rpm -Uvh setarch-2* U為更新軟件包。
    rpm -Uvh make-3*
    rpm -Uvh glibc-2*
    rpm -Uvh libaio-0*
    cd /
    eject
    # 從RedHat AS5 光盤2
    cd /media/cdrom/Server
    rpm -Uvh compat-libstdc++-33-3*
    rpm -Uvh compat-gcc-34-3*
    rpm -Uvh compat-gcc-34-c++-3*
    rpm -Uvh gcc-4*
    rpm -Uvh libXp-1*
    cd /
    eject
    # 從RedHat AS5 光盤3
    cd /media/cdrom/Server
    rpm -Uvh openmotif-2*
    rpm -Uvh compat-db-4*
    cd /
    eject
    新增組和用戶:
    groupadd oinstall
    groupadd dba
    groupadd oper
    useradd -g oinstall -G dba Oracle
    passwd Oracle
    創(chuàng)建Oracle的安裝目錄,并把權(quán)限付給oracle用戶:
    mkdir -p /u01/app/Oracle/product/10.2.0/db_1
    chown -R Oracle.oinstall /u01
    登錄到Oracle 用戶并且配置環(huán)境變量(增加下面的內(nèi)容到文件 .bash_profile
    # Oracle Settings
    Oracle_BASE=/u01/app/oracle; export ORACLE_BASE
    Oracle_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
    Oracle_SID=orcl; export ORACLE_SID
    PATH=$PATH: $Oracle_HOME/bin ; export PATH
    如果本機(jī)有Xserver圖形界面的話以下這段可以不寫
    DISPLAY=192.168.0.11:0,0; export DISPLAY
    Oracle_TERM=xterm; export ORACLE_TERM
    LD_LIBRARY_PATH=$Oracle_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$Oracle_HOME/jre:$ORACLE_HOME/jlib:$ORAC LE_HOME/rdbms/jlib; export CLASSPATH
    配置好后用 source .bash_profile 命令使配置生效 。
    對(duì) Bourne、Bash、Korn shell,用編輯器 qedit 在文件/etc/profile 中加入下面的行:(備注以下的命令添加后,會(huì)提示ulimit 出錯(cuò):-bash: ulimit: pipe size: cannot modify limit: Invalid argument)
    if [ $USER = "Oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    else
    ulimit -u 16384 -n 65536
    fi
    fi
    注釋:$Oracle_home 可以自己定;為效率有的人單獨(dú)為oracle 分配磁盤空間 主目錄自己定的情況下
    現(xiàn)在終于可以安裝Oracle了。
    重新登錄到Oracle用戶.
    到剛才解壓出來的目錄用下面的命令,啟動(dòng)Oracle智能安裝向?qū)?Oracle Universal Installer ),就出現(xiàn)了圖形界面,再按照提示一步一步安裝:
    ./runInstaller
    #如出現(xiàn)Xlib: connection to ":0.0″ refused by server錯(cuò)誤,可以運(yùn)行xhost + ,如果不是在本地安裝,可能還需要指定DISPLAY=IP:0.0 & export DISPLAY
    安裝時(shí)根據(jù)說明操作即可,在選擇字符集時(shí),可選Unicode standard utf-8 al32utf8,并選擇"Create database with sample schemas"; 另外在
    Specify database schema passwords處,選擇Use the same password for all the accounts(根據(jù)需要)
    #如出現(xiàn)/usr/lib/libstdc++.so.5: No such file or directory錯(cuò)誤,可以安裝compat-libstdcxxx.rpm
    查看以下三個(gè).ora文件中的主機(jī)與端口
    /u01/app/Oracle/product/10.2.0/db_1/network/admin
    listener.ora sqlnet.ora tnsnames.ora
    安裝快完成好的時(shí)候,會(huì)出現(xiàn)提示,必須以root 的身份執(zhí)行兩個(gè)腳本。
    最后,單擊完成按鈕,完成安裝。
    結(jié)束安裝
    編輯 /etc/RedHat-release 文件把RHEL的版本信息改回去:
    Red Hat Enterprise Linux Server release 5 (Tikanga)
    安裝后要做的工作
    3.1 Oracle系統(tǒng)初始化
    用root用戶登錄,然后運(yùn)行$Oracle_HOME/root.sh進(jìn)行Oracle的系統(tǒng)初始化工作,通常一路按回車用默認(rèn)值即可。
    3、登陸并啟動(dòng)數(shù)據(jù)庫的操作。
    檢查:$Oracle_home/ network/admin/listener.ora 的配置是否正確
    [Oracle@oracle oracle]$ lsnrctl start
    [Oracle@oracle oracle]$ sqlplus /nolog
    SQL*Plus: Release 9.2.0.0 - Production on Sat Mar 12 22:58:53 2005
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> connect / as sysdba
    Connected.
    SQL> shutdown immediate 關(guān)閉數(shù)據(jù)庫(OR "dbshut" command)
    Database closed.
    Database dismounted.
    Oracle instance shut down.
    SQL> startup; 啟動(dòng)數(shù)據(jù)庫
    Oracle instance started.
    Total System Global Area 236000356 bytes
    Fixed Size 451684 bytes
    Variable Size 201326592 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    //以下腳本未做測試
    4, dbstart腳本修改
    數(shù)據(jù)庫創(chuàng)建完成后,修改vi /etc/oratab,把orcl:/opt/Oracle/oracle/product/10g:N那一行最后的N改成Y,
    然后執(zhí)行dbstart啟動(dòng)數(shù)據(jù)庫數(shù)據(jù)庫可能無法啟動(dòng),報(bào)告Can't find init file ...的錯(cuò)誤,需要復(fù)制一個(gè)初始化文件:
    cp /opt/Oracle/admin/ge01/pfile/init.ora.* /opt/oracle/product/10.2.0/dbs/initge01.ora
    重新執(zhí)行dbstart就可以了。
    修改vi /opt/Oracle/product/10g/bin/dbstart中ORACLE_HOME_LISTNER=/opt/oracle/oracle/product/10g /
    vi /etc/rc.local 加入下面一行 起動(dòng)Oracle ON system boot
    /opt/oracel/product/10g/bin/dbstart
    5. 編寫啟動(dòng)腳本(OPTION)
    為了方便管理,可以寫一個(gè)啟動(dòng)腳本ora10g:
    以root身份進(jìn)入,編寫以下腳本:
    #!/bin/bash
    #
    # chkconfig: 2345 91 19
    # description: starts the Oracle listener and instance
    status() {
    pid=`ps -ef | grep ora_pmon | grep -v grep | awk '{print $8}'`
    if [ "X$pid" = "X" ]
    then
    echo "Oracle10g is not running."
    exit 1
    else
    echo "Oracle10g is running."
    exit 0
    fi
    }
    case "$1" in
    start)
    #startup the listener and instance
    echo -n "Oracle begin to startup: "
    su - Oracle -c "lsnrctl start"
    su - Oracle -c dbstart
    echo "Oracle10g started"
    ;;
    stop)
    # stop listener, apache and database
    echo -n "Oracle begin to shutdown:"
    su - Oracle -c "lsnrctl stop"
    su - Oracle -c dbshut
    echo "Oracle10g shutdowned"
    ;;
    reload|restart)
    $0 stop
    $0 start
    ;;
    'status')
    status
    ;;
    *)
    echo "Usage: ora10g [start|stop|reload|restart]"
    exit 1
    esac
    exit 0
    存為ora10g后,然后
    chmod a+x ora10g
    ln -s /opt/Oracle/product/10.2.0/bin/ora10g /etc/rc.d/init.d/
    即可在以后以root身份運(yùn)行/etc/rc.d/init.d/ora10g start |stop 來管Oracle的啟動(dòng)和停止了。
    如果要將這個(gè)腳本加入到系統(tǒng)中使其可開機(jī)運(yùn)行,那么要運(yùn)行以下命令:
    chkconfig --level 345 ora10g on
    或者可在/etc/rc.d/rc.local中加入如下:
    su - Oracle -c "lsnrctl start"
    su - Oracle -c "dbstart"
    6, 關(guān)于數(shù)據(jù)庫刪除重新安裝的問題:
    把Oracle安裝目錄刪除及/etc/ora*.*刪除就行了
    #rm -f /etc/ora*.*
    7.修改Oracle10g數(shù)據(jù)庫字符集
    SQL> connect sys/Oracle as sysdba
    SQL> startup mount
    SQL> alter session set sql_trace=true;
    Session altered.
    SQL> alter system enable restricted session;
    System altered.
    SQL> alter system set job_queue_processes=0;
    System altered.
    SQL> alter system set aq_tm_processes=0;
    System altered.
    SQL> alter database open;
    Database altered.
    SQL> set linesize 120;
    SQL> alter database character set zhs16gbk;
    alter database character set zhs16gbk
    *
    ERROR at line 1:
    ORA-12712: new character set must be a superset of old character set
    SQL> ALTER DATABASE character set INTERNAL_USE zhs16gbk; # 使用INTERNAL_USE可以跳過超集的檢查,ALTER DATABASE character set INTERNAL_USE
    Database altered.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    Oracle instance shut down.
    SQL> STARTUP
    SQL> select name,value$ from props$ where name like '%NLS%';
    NLS_CHARACTERSET
    ZHS16GBK
    8. Oracle database備份
    (1)vi bachupDb.sh
    #!/bin/sh
    #Oracle用戶下
    #crontab -e 增加 "35 4 * * * /home/Oracle/dbbackup/backupDb.sh",保存后自動(dòng)安裝
    #或echo "35 4 * * * /home/Oracle/dbbackup/backupDb.sh" > backupDb.cron
    #crontab backupDb.cron
    #############
    #@tip 修改為本機(jī)數(shù)據(jù)庫home目錄
    export Oracle_HOME=/opt/oracle/product/10g
    export PATH=$Oracle_HOME/bin:$PATH:$HOME/bin
    # 注意字符集必須和數(shù)據(jù)庫的字符集一致,以避免字符集轉(zhuǎn)化失敗
    export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
    #@tip 125修改為要備份的Oracle的ip地址的最后一段
    dmpfile="`echo ~/`dbbackup/gedb_`date +%w`.dmp"
    logfile="`echo ~/`dbbackup/gedb_`date +%w`.log"
    if [ -w $dmpfile ]
    then
    echo "rm -f $dmpfile"
    rm -f "$dmpfile"
    fi
    #@tip ip地址修改為要備份的Oracle的主機(jī)地址
    exp USERID=gedb/gedb@10.248.1.5/ge01 file=$dmpfile log=$logfile owner=gedb grants=y
    (2)copy bachupDb.sh 到slave Oracle srever 相應(yīng)目錄,
    chown Oracle.oinstall bachupDb.sh
    chmod 744 bachupDb.sh
    vi bachupDb.sh 以符合安裝情況
    (3)以O(shè)racle user role
    crontab -e
    35 4 * * * /home/Oracle/dbbackup/backupDb.sh
    9. restore Oracle backup
    su - Oracle
    imp USERID=gedb/gedb file=gedb_6.dmp log=implogfile commit=y grants=y full=y 附1 Oracle 10g對(duì)硬件環(huán)境的要求
    物理內(nèi)存
    基本 - 512MB
    推薦 - 1024MB
    內(nèi)存交換分區(qū)相對(duì)于物理內(nèi)存的比例
    物理內(nèi)存1024MB~2048MB - 150%
    物理內(nèi)存2049MB~8192MB - 100%
    物理內(nèi)存大于8192MB - 75%
    磁盤空間
    /tmp目錄所在的分區(qū)至少要有400MB空閑磁盤空間。
    根據(jù)安裝類型,安裝Oracle服務(wù)器軟件的分區(qū)至少要有1.5GB到3.5GB的空閑磁盤空間。
    1.2GB磁盤空間用于數(shù)據(jù)庫預(yù)配置文件系統(tǒng)存儲(chǔ)(可選)
    附2 Oracle 10g對(duì)軟件環(huán)境的要求
    操作系統(tǒng)
    Red Hat Enterprise Linux AS/ES 3.0 (update 4 or later)
    Red Hat Linux 4.0
    SUSE Linux Enterprise Server 9.0 with SP 2 or later
    Asianux 1.0
    Asianux 2.0
    軟件包
    X11相關(guān)的庫 (軟件包名視操作系統(tǒng)而定,故不一一列出)
    gcc (版本至少為2.96-124)
    make (版本至少為3.79)
    binutils (版本至少為2.11)
    openmotif (版本至少為2.1.30)
    setarch (版本至少為1.3)
    compat-db (版本至少為4.0.14.5)
    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)
    sysstat (版本至少為5.0.5-1)
    libaio (版本至少為0.3.103-3)
    libaio-devel (版本至少為0.3.103-3)
    4 結(jié)束語
    現(xiàn)在Oracle 10g的安裝已經(jīng)完成,在任何一臺(tái)電腦上裝個(gè)Oracle客戶端就可以對(duì)它進(jìn)行管理了。
    如果要卸載Oracle,只須運(yùn)行
    $./runInstaller -silent -deinstall -removeallfiles -removeAllPatches "REMOVE_HOMES={$Oracle_HOME}" -responseFile <安裝時(shí)使用的應(yīng)答文件>
     


    本文出自:億恩科技【mszdt.com】

    服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經(jīng)營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經(jīng)營性ICP/ISP證:贛B2-20080012
  • 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
  • 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
  • 專注服務(wù)器托管17年
    掃掃關(guān)注-微信公眾號(hào)
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
      1
     
     
     
     

    0371-60135900
    7*24小時(shí)客服服務(wù)熱線