Linux 下安装Oracle10g

        一直想在Linux下学习oracle软件,不过没有这个环境,就装了个虚拟机,在虚拟机上安装oracle,经过几天的鼓捣,终于安装上了,为了防止自己忘了,把安装的记录放在这里,用的centos 4.8 ,oracle 10g。
        1.Read the release notes:http://www.oracle.com/technology/documentation:阅读发行纪录:明白对平台的特别要求。
         2.Planning the installation:计划安装:对oracle数据库了解及明白安装注意事项。
         3.Completing preinstallation tasks:完成安装前的系统配置工作。
          (a.以root用户登录
          (b.检查硬件要求:内存1G以上,检查内存的命令:grep MemTotal /proc/meminfo。
                   交换空间:1G-2G,1.5倍内存;2G-4G,等于内存;大于4G,0.75倍内存;
                   检查交换空间的名令:grep SwapTotal /proc/meminfo。
                   临时空间400M,检查临时空间的名令:df -k /tmp。 
                   1.5G-3.5G硬盘空间用于存储数据库软件,检查硬盘空间的名令:df -k
                   1.2G硬盘空间用于数据库文件系统(可选)。
       检查系统体系是否适合oracle软件:grep "model name" /proc/cpuinfo
        (c.检查软件要求:
                   操作系统需求:Red Hat Linux 4.0 命令:cat /etc/issue
       内核版本:2.6.9-5.EL            命令:uname -r
       软件包:binutils-2.15.92.0.2-13.EL4 命令:rpm -q package_name
                           compat-db-4.1.25-9
                           compat-libstdc++-296-2.96-132.7.2
                           control-center-2.8.0-12
                           gcc-3.4.3-22.1.EL4
                           gcc-c++-3.4.3-22.1.EL44
                           glibc-2.3.4-2.9
                           glibc-common-2.3.4-2.9
                           gnome-libs-1.4.1.2.90-44.1
                           libstdc++-3.4.3-22.1
                           libstdc++-devel-3.4.3-22.1
                           make-3.80-5
                           pdksh-5.2.14-30
                           sysstat-5.0.5-1
                           xscreensaver-4.18-5.rhel4.2
                           setarch-1.6-1
                           rpm -ivh 安装
         (d.检查网络要求:
                   确认/etc/hosts文件,命令:cat /etc/nsswitch.conf | grep hosts
                   查看hosts中的hostname命令:hostname
                   查看domainname正确设置:domainname     
      (e.创建安装用户:
                   确定是否存在Oracle Inventory Group:more /etc/oraInst.loc;
       建立Oracle Inventory Group:/usr/sbin/groupadd oinstall
                   建立OSDBA Group:/usr/sbin/groupadd dba
       建立OSOPER Group(可选):/usr/sbin/groupadd oper
       检查是否存在oracle用户:id oracle
       创建oracle用户:/usr/sbin/useradd -g oinstall -G dba[,oper] -d /u01/oracle oracle
       修改oracle用户:/usr/sbin/usermod -g oinstall -G dba[,oper] -d /u01/oracle oracle
       设置oracle密码:passwd oracle
       验证nobody用户:id nobody
       建立nobody用户:/usr/sbin/useradd nobody
  (f.配置内核参数(/etc/sysctl.conf 不启动让参数有效:sysctl -p):
                   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/security/limits.conf):
                   oracle              soft    nproc   2047
                   oracle              hard    nproc   16384
                   oracle              soft    nofile  1024
                   oracle              hard    nofile  65536
            (/etc/pam.d/login):
                   session    required     /lib/security/pam_limits.so
                   session    required     pam_limits.so             
        (g.建立oracle base home 目录:
                   rm -rf 删除文件目录
       mv     移动目录
                   mkdir -p /mount_point/app/oracle_sw_owner
                   chown -R oracle:oinstall /mount_point/app/oracle_sw_owner
                   chmod -R 775 /mount_point/app/oracle_sw_owner
       (h.配置oracle环境变量,以oracle用户:
                    su - oracle
                     vi .bash_profile
                     ORACLE_BASE=/u01/app/oracle
                    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1(装完后设置)
                    ORACLE_SID=orcl
                    export ORACLE_BASE ORACLE_HOME ORACLE_SID
                    改完,运行source .bash_profile使参数生效。
                    echo $ORACLE_HOME
    4.Installing software:安装oracle数据库
                    export DISPLAY=fully_qualified_remote_host_name:0.0
                    xhost fully_qualified_remote_host_name
                     xclock
                    su -oracle
                    ./runInstaller&
   5.Completing postinstallation tasks:完成安装后的工作
  6.Get started using Oracle Database:开始使用数据库
请使用浏览器的分享功能分享到微信等