CentOS_5-x86-64下安装Oracle_11g


这篇文章是我集合网上的文章和自己的实际操作改写的,因为安装过程中出现了很多问题,也不是完全按照网上别人写的一样完全没有错误的一帆风顺,Oracle的官方文档是最标准的安装手册,个人认为有必要结合着一起看

一,需要的软件有:

    1、 linux_11gR2 x86-64      

    2、Oracle的官方帮助文档

    3、 CentOS-5.5-x86_64-bin-DVD-1of2和CentOS-5.5-x86_64-bin-DVD-2of2

二,我们就开始安装Linux操作系统
    在虚拟机中安装,详细安装过程这里就不描述,不过,值得提醒的是虚拟机在配置虚拟硬件环境时,内存必须大于1G,硬盘空间20G。

    1, 在安装好虚拟Linux 系统之后,将事先下载好的 linux_11gR2 x86-64 拷贝至Linux虚拟机里边,建立一个存放目录如:/u01/database

    2,检查主机名是否完整合格:

    [root@oracle ~]# cat /etc/hosts

    因为是作为服务器使用,所以必须是静态的IP,若是DHCP分配的,则修改为静态的。

    [root@oracle ~]# vi /etc/hosts

    # Do not remove the following line, or various programs

    # that require network ality will fail.

    127.0.0.1               localhost.localdomain localhost

    ::1             localhost6.localdomain6 localhost6

    192.168.0.66            oracle                      //oracle为本机主机名

    2,创建oracle所需要的用户名(oracle)和组名(oinstall、dba),并设置相应的权限:

        [root@oracle ~]# /usr/sbin/groupadd oinstall

        [root@oracle ~]# /usr/sbin/groupadd dba

        [root@oracle ~]# /usr/sbin/useradd -g oinstall -G dba oracle

        [root@oracle ~]# passwd oracle                   //这里的命令为设置oracle的密码,输入二次进行确认。

        创建oracle数据库安装的文件目录及路径,并设置文件权限:

        [root@oracle ~]# mkdir -p /u01/app/oracle/product/         //设置oracle的安装目
        录

        [root@oracle ~]# chown -R oracle:oinstall /u01             //设置安装目录所属的
        用户和组

        [root@oracle ~]# chmod -R 775 /u01                         //设置文件权限

    3,接下来修改系统配置:

        [root@oracle ~]# 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

        保存命令: :wq

        [root@oracle ~]# /sbin/sysctl -p                       //使修改后的配置文件生效
        [root@oracle ~]# vi /etc/security/limits.conf
        末尾加上
        oracle soft nproc 2047
        oracle hard nproc 16384
        oracle soft nofile 1024
        oracle hard nofile 65536
        oracle soft stack 10240

  • 1
  • 2
  • 3
  • 下一页

相关内容