zoukankan      html  css  js  c++  java
  • 在RHEL5上安装oracle10gLinux

    一、准备编译安装包
    [root@oracleserver ~]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
    gcc-4.1.2-42.el5
    make-3.81-3.el5
    binutils-2.17.50.0.6-6.el5
    package openmotif is not installed
    setarch-2.0-1.1
    package compat-db is not installed
    package compat-gcc-c++ is not installed
    package compat-libstdc++ is not installed
    package compat-libstdc++-devel is not installed
    [root@oracleserver ~]# cd /media/RHEL_5.2\ x86_64\ DVD/
    [root@oracleserver RHEL_5.2 x86_64 DVD]# cd Server/
    [root@oracleserver Server]# rpm -Uvh compat-db-4*
    warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
       1:compat-db              ########################################### [ 50%]
       2:compat-db              ########################################### [100%]
    [root@oracleserver Server]# rpm -Uvh libaio-0*
    warning: libaio-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package libaio-0.3.106-3.2 is already installed
    [root@oracleserver Server]# rpm -Uvh compat-libstdc++-33-3*
    warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package compat-libstdc++-33-3.2.3-61 is already installed
    [root@oracleserver Server]# rpm -Uvh compat-gcc-34-3*
    warning: compat-gcc-34-3.4.6-4.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package compat-gcc-34-3.4.6-4 is already installed
    [root@oracleserver Server]# rpm -Uvh compat-gcc-34-c++-3*
    warning: compat-gcc-34-c++-3.4.6-4.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package compat-gcc-34-c++-3.4.6-4 is already installed
    [root@oracleserver Server]# rpm -Uvh libXp-1*
    warning: libXp-1.0.0-8.1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
       1:libXp                  ########################################### [ 50%]
       2:libXp                  ########################################### [100%]
    [root@oracleserver Server]# rpm -Uvh openmotif-2*
    warning: openmotif-2.3.0-0.5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
       1:openmotif              ########################################### [ 50%]
       2:openmotif              ########################################### [100%]
    [root@oracleserver Server]# rpm -Uvh gcc-4*
    warning: gcc-4.1.2-42.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package gcc-4.1.2-42.el5 is already installed
    [root@oracleserver Server]# rpm -Uvh glibc-2.5-24.i686.rpm
    warning: glibc-2.5-24.i686.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
    Preparing...                ########################################### [100%]
            package glibc-2.5-24 is already installed
    [root@oracleserver Server]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
    gcc-4.1.2-42.el5
    make-3.81-3.el5
    binutils-2.17.50.0.6-6.el5
    openmotif-2.3.0-0.5.el5
    openmotif-2.3.0-0.5.el5
    setarch-2.0-1.1
    compat-db-4.2.52-5.1
    compat-db-4.2.52-5.1
    package compat-gcc-c++ is not installed
    package compat-libstdc++ is not installed
    package compat-libstdc++-devel is not installed

    二、查看硬件配置
    [root@oracleserver Server]# grep Mem

    [root@oracleserver Server]# grep MemTotal /proc/meminfo
    MemTotal:     16401408 kB
    [root@oracleserver Server]# grep SwapTotal /proc/meminfo
    SwapTotal:    33551712 kB

    三、配置用户及目录权限
    [root@oracleserver Server]# /usr/sbin/groupadd oinstall
    [root@oracleserver Server]# /usr/sbin/groupadd dba
    [root@oracleserver Server]# /usr/sbin/useradd -m -g oinstall -G dba oracle
    [root@oracleserver Server]# id oracle
    uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
    [root@oracleserver Server]# passwd oracle
    Changing password for user oracle.
    New UNIX password:
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
    [root@oracleserver Server]#
    [root@oracleserver Server]# chown -R oracle:oinstall /oracleapp /oracledata
    [root@oracleserver Server]# chmod -R 777 /oracleapp /oracledata

    四、配置核心环境
    [root@oracleserver ~]# vi /etc/redhat-release
    redhat-4

    [root@oracleserver Server]# vi /etc/sysctl.conf
    # Controls the use of TCP syncookies
    net.ipv4.tcp_syncookies = 1

    # 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 = 429496729

    #use 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

     


    [root@oracleserver Server]# /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
    kernel.msgmnb = 65536
    kernel.msgmax = 65536
    kernel.shmmax = 68719476736
    kernel.shmall = 429496729
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100 128
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 655000

     

    [root@oracleserver Server]# vi /etc/security/limits.conf
           - sigpending - max number of pending signals
           - msgqueue - max memory used by POSIX message queues (bytes)
           - nice - max nice priority allowed to raise to
           - rtprio - max realtime priority
    #
    #<domain>      <type>  <item>         <value>
    #

    #*               soft    core            0
    #*               hard    rss             10000
    #@student        hard    nproc           20
    #@faculty        soft    nproc           20
    #@faculty        hard    nproc           50
    #ftp             hard    nproc           0
    #@student             maxlogins       4

    # End of file

    #use for orcal
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536


    [root@oracleserver Server]# vi /etc/pam.d/login

    #%PAM-1.0
    auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
    auth       include      system-auth
    account    required     pam_nologin.so
    account    include      system-auth
    password   include      system-auth
    # pam_selinux.so close should be the first session rule
    session    required     pam_selinux.so close
    session    include      system-auth
    session    required     pam_loginuid.so
    session    optional     pam_console.so
    # pam_selinux.so open should only be followed by sessions to be executed in the user context
    session    required     pam_selinux.so open
    session    optional     pam_keyinit.so force revoke

    #use for oracle
    session required /lib/security/pam_limits.so

     

    [root@oracleserver Server]# vi /etc/selinux/config

    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
          enforcing - SELinux security policy is enforced.
          permissive - SELinux prints warnings instead of enforcing.
          disabled - SELinux is fully disabled.
    SELINUX=disabled
    # SELINUXTYPE= type of policy in use. Possible values are:
          targeted - Only targeted network daemons are protected.
          strict - Full SELinux protection.
    SELINUXTYPE=targeted


    五、配置用户环境变量
    [oracle@oracleserver ~]$ vi .bash_profile

    # .bash_profile

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

    # User specific environment and startup programs

    PATH=$PATH:$HOME/bin

    export PATH

    #use for oracle
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    ORACLE_BASE=/oracleapp; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/10g/; export ORACLE_HOME
    ORACLE_SID=orcl; export ORACLE_SID
    ORACLE_TERM=xterm; export ORACLE_TERM
    PATH=$PATH:/usr/sbin; export PATH
    PATH=$PATH:$ORACLE_HOME/bin; 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


    if [ $USER = "oracle" ]; then
      if [ $SHELL = "/bin/ksh" ]; then
            ulimit -p 16384
            ulimit -n 65536
      else
            ulimit -u 16384 -n 65536
      fi
    fi


    [root@oracleserver ~]# vi /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    #127.0.0.1       oracleserver    localhost.localdomain   localhost
    #::1     localhost6.localdomain6 localhost6
    192.168.60.40   oracleserver    oracleserver


    六、安装Oracle
    [oracle@oracleserver orac]$ unset LANG
    [oracle@oracleserver orac]$ ./runInstaller
    [oracle@oracleserver orac]$ su -l root
    [root@oracleserver orac]$ ./oracleapp/10g/orainstRoot.sh
    [root@oracleserver orac]$ ./oracleapp/10g/root.sh
    [root@oracleserver orac]$ exit

    七、测试Oracle
    [oracle@oracleserver orac]$ sqlplus '/as sysdba'
    SQL> startup


    The following J2EE Applications have been deployed and are accessible at the URLs listed below.

    iSQL*Plus URL:
    http://oracleserver:5560/isqlplus

    iSQL*Plus DBA URL:
    http://oracleserver:5560/isqlplus/dba

    Enterprise Manager 10g Database Control URL:
    http://oracleserver:1158/em

  • 相关阅读:
    原生js可爱糖果数字时间特效
    jQuery绑定事件的四种方式
    jQuery选择器总结
    正则表达式
    this对象
    网页瀑布流效果实现的几种方式
    关于DOM
    SparkSQL读写外部数据源--数据分区
    SparkSQL读写外部数据源-通过jdbc读写mysql数据库
    SparkSQL读写外部数据源-基本操作load和save
  • 原文地址:https://www.cnblogs.com/eagleking0318/p/6521268.html
Copyright © 2011-2022 走看看