首页 > 代码库 > linux 安装 oracle

linux 安装 oracle

linux 版本:centos 5.5  32位

oracle : linux_11gR2_database_1和2

使用图形界面安装

安装oracle 11g依赖的组件包

  需要安装:binutils  /  compat-libstdc++ / elfutils-libelf / elfutils-libelf-devel / elfutils-libelf-devel-static  / gcc / gcc-c++ / glibc /  glibc-common  / glibc-devel / glibc-headers  / kernel-headers / ksh /  libaio  / libaio-devel / libgcc / libgomp / libstdc++ / libstdc++-devel  / make / numactl-devel / sysstat / unixODBC / unixODBC-devel

  1.通过rpm -qa | grep 名字 去逐个寻找文件,看是否存在,如果不存在 到 xx.iso\Centos路径寻找 rpm 文件 ,上传至服务器,解压(rpm -ivh *.rpm)

  2.通过yum -y(-y(当安装过程提示选择全部为"yes"))

      yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-    devel make sysstat unixODBC unixODBC-devel pdksh numactl-devel glibc-headers

  3.我通过yum安装显示下载的文件

  Downloading Packages:
      (1/25): libaio-devel-0.3.106-5.i386.rpm                                                                                                                             
      (2/25): numactl-devel-0.9.8-12.el5_6.i386.rpm                                                                                                                       
      (3/25): elfutils-libelf-devel-0.137-3.el5.i386.rpm                                                                                                                       
      (4/25): numactl-0.9.8-12.el5_6.i386.rpm                                                                                                                              
      (5/25): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm                                                                                                                
      (6/25): libgomp-4.4.7-1.el5.i386.rpm                                                                                                                                   
      (7/25): libgcc-4.1.2-55.el5.i386.rpm                                                                                                                                    
      (8/25): nscd-2.5-123.el5_11.3.i386.rpm                                                                                                                               
      (9/25): sysstat-7.0.2-13.el5.i386.rpm                                                                                                                                  
      (10/25): pdksh-5.2.14-37.el5_8.1.i386.rpm                                                                                                                            
      (11/25): compat-libstdc++-33-3.2.3-61.i386.rpm                                                                                                                          
      (12/25): unixODBC-2.2.11-10.el5.i386.rpm                                                                                                                             
          http://mirror.lzu.edu.cn/centos/5.11/os/i386/CentOS/unixODBC-2.2.11-10.el5.i386.rpm: [Errno 4] Socket Error: (104, ‘Connection reset by peer‘)
      Trying other mirror.
      (12/25): unixODBC-2.2.11-10.el5.i386.rpm                                                                                                                                 
      (13/25): libstdc++-4.1.2-55.el5.i386.rpm                                                                                                                             
      (14/25): unixODBC-libs-2.2.11-10.el5.i386.rpm                                                                                                                            
      (15/25): glibc-headers-2.5-123.el5_11.3.i386.rpm                                                                                                                     
      (16/25): unixODBC-devel-2.2.11-10.el5.i386.rpm                                                                                                                        
      (17/25): kernel-headers-2.6.18-419.el5.i386.rpm                                                                                                                      
      (18/25): glibc-devel-2.5-123.el5_11.3.i386.rpm                                                                                                                            
      (19/25): cpp-4.1.2-55.el5.i386.rpm                                                                                                                                   
      (20/25): libstdc++-devel-4.1.2-55.el5.i386.rpm                                                                                                                            
      (21/25): binutils-2.17.50.0.6-26.el5.i386.rpm                                                                                                                        
      (22/25): gcc-c++-4.1.2-55.el5.i386.rpm                                                                                                                                   
      (23/25): gcc-4.1.2-55.el5.i386.rpm                                                                                                                                   
      (24/25): glibc-2.5-123.el5_11.3.i686.rpm                                                                                                                                
      (25/25): glibc-common-2.5-123.el5_11.3.i386.rpm 

  4.创建文件等;
     root用户下:
    groupadd oinstall
    groupadd dba
    mkdir -p /u01/oracle
    useradd -g oinstall -G dba -d /u01/oracle oracle
    cp /etc/skel/.bash_profile /u01/oracle
    cp /etc/skel/.bashrc /u01/oracle
    cp /etc/skel/.bash_logout /u01/oracle
    passwd oracle  密码123456
    chown -R oracle:oinstall u01
    检查 nobody 是否存在 ,  id nobody(缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody)
    vi /etc/sysctl.conf
      fs.aio-max-nr = 1048576
      fs.file-max = 6815744
      kernel.shmall = 2097152
      kernel.shmmax = 536870912
      kernel.shmmni = 4096
      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 = 1048586  
    vi /etc/security/limits.conf
      oracle           soft    nproc   2047
      oracle           hard    nproc   16384
      oracle           soft    nofile  1024
      oracle           hard    nofile  65536
 
    vi /etc/pam.d/login
      session    required     pam_limits.so
 
    设置oracle 用户环境变量
     切换oracle
      su - oracle
      pwd
      ls -la
    vi .bash_profile
      ORACLE_BASE=/u01
      ORACLE_HOME=$ORACLE_BASE/oracle
      ORACLE_SID=wilson
      PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
      export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
    切换到root用户(将解压的oracle.zip datebase)
      mv database /u01/
      cd /u01
      chown -R oracle:oinstall database/

  5.使用oracle账号 登陆图形界面

    cd /u01/database
    ./runInstaller

  。。。剩余就是正常安装oracle

 

 

                                                                                                           

  

 

linux 安装 oracle