加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle 11g(11.2.0.4) install on rhel 6

发布时间:2020-12-12 14:22:23 所属栏目:百科 来源:网络整理
导读:oracle 11g(11.2.0.4) install on rhel 6 听语音 | 浏览:1902 | 更新:2014-10-31 10:21 1 2 3 4 5 6 7 分步阅读 oracle 11g 安装高版本可以直接安装,无需升级安装。 安装思路: 1: 安装rhel 6时需要做的设置 2: 设置主机名 3: 编辑/etc/hosts 文件 4:

oracle 11g(11.2.0.4) install on rhel 6

听语音

  • |
  • 浏览:1902
  • |
  • 更新:2014-10-31 10:21
  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

分步阅读

oracle 11g 安装高版本可以直接安装,无需升级安装。

安装思路:

1: 安装rhel 6时需要做的设置

2: 设置主机名

3: 编辑/etc/hosts 文件

4: 设置内核参数

5: 安装oracle 11g 所需安装的rpm包

6: 创建oracle用户

7: 创建安装目录

8: 关闭防火墙

9: 安装oracle 11.2.0.4 软件

10:编辑oracle环境

11:dbca 建库

12:netca 创建监听

注意:安装推荐工具使用xmanager

方法/步骤

  1. 1

    安装rhel 6时需要做的设置

    1:swap 最小2G

    2:secure Linux disabled(/etc/selinux/config文件SELINUX=permissive)

    3:选择的安装包:

    Base System ----> Base

    Base System ----> Client management tools

    Base System ----> Compatibility libraries

    Base System ----> Hardware monitoring utilities

    Base System ----> Large Systems Performance

    Base System ----> Network file system client

    Base System ----> Performance Tools

    Base System ----> Perl Support

    Servers ----> Server Platform

    Servers ----> System administration tools

    Desktops ----> Desktop

    Desktops ----> Desktop Platform

    Desktops ----> Fonts

    Desktops ----> General Purpose Desktop

    Desktops ----> Graphical Administration Tools

    Desktops ----> Input Methods

    Desktops ----> X Window System

    Development ----> Additional Development

    Development ----> Development Tools

    Applications ----> Internet Browser

  2. 2

    设置主机名

    编辑/etc/sysconfig/network中的HOSTNAME

    设置完成之后重启,永久生效

  3. 编辑/etc/hosts 文件

    添加(ip 主机名):

    192.168.56.126 oracle11g

    ip 如何快捷有效设置,参考我的经验:怎样设置虚拟机virtualbox 网关和linux ip

  4. 设置内核参数

    1:编辑/etc/sysctl.conf

    添加:

    fs.suid_dumpable = 1

    fs.aio-max-nr = 1048576

    fs.file-max = 6815744

    #kernel.shmall = 2097152

    #kernel.shmmax = 536870912

    kernel.shmmni = 4096

    # semaphores: semmsl,semmns,semopm,semmni

    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

    编辑完之后需要执行命令:/sbin/sysctl -p

    2:编辑/etc/security/limits.conf

    添加:

    oracle soft nproc 16384

    oracle hard nproc 16384

    oracle soft nofile 4096

    oracle hard nofile 65536

    oracle soft stack 10240

    3:编辑/etc/pam.d/login

    添加

    session required pam_limits.so

    4:编辑/etc/security/limits.d/90-nproc.conf

    * soft nproc 1024

    设置成

    * - nproc 16384

    5:编辑/etc/selinux/config

    将SELINUX设置为permissive:SELINUX=permissive

  5. 安装oracle所需安装的rpm包

    rpm -Uvh binutils-2*x86_64*

    rpm -Uvh glibc-2*x86_64* nss-softokn-freebl-3*x86_64*

    rpm -Uvh glibc-2*i686* nss-softokn-freebl-3*i686*

    rpm -Uvh compat-libstdc++-33*x86_64*

    rpm -Uvh glibc-common-2*x86_64*

    rpm -Uvh glibc-devel-2*x86_64*

    rpm -Uvh glibc-devel-2*i686*

    rpm -Uvh glibc-headers-2*x86_64*

    rpm -Uvh elfutils-libelf-0*x86_64*

    rpm -Uvh elfutils-libelf-devel-0*x86_64*

    rpm -Uvh gcc-4*x86_64*

    rpm -Uvh gcc-c++-4*x86_64*

    rpm -Uvh ksh-*x86_64*

    rpm -Uvh libaio-0*x86_64*

    rpm -Uvh libaio-devel-0*x86_64*

    rpm -Uvh libaio-0*i686*

    rpm -Uvh libaio-devel-0*i686*

    rpm -Uvh libgcc-4*x86_64*

    rpm -Uvh libgcc-4*i686*

    rpm -Uvh libstdc++-4*x86_64*

    rpm -Uvh libstdc++-4*i686*

    rpm -Uvh libstdc++-devel-4*x86_64*

    rpm -Uvh make-3.81*x86_64*

    rpm -Uvh numactl-devel-2*x86_64*

    rpm -Uvh sysstat-9*x86_64*

    rpm -Uvh compat-libstdc++-33*i686*

    rpm -Uvh compat-libcap*

    注意:rhel 6 安装rpm包,可以参考我的经验:oracle rac 11g on rhel 6:[1]准备

    32位rpm包可以不安装

  6. 创建oracle用户

    groupadd -g 1000 oinstall

    groupadd -g 1100 dba

    useradd -m -g oinstall -G dba -u 1200 oracle

    [root@oracle11g ~]# id oracle

    uid=1200(oracle) gid=1000(oinstall) groups=1000(oinstall),1100(dba)

    设置密码

    [root@oracle11g ~]# passwd oracle

  7. 创建安装目录

    [root@oracle11g ~]# mkdir -p /u01/app/oracle/product/11.2.0/db_1

    [root@oracle11g ~]# chown -R oracle:oinstall /u01 权限赋予

  8. 关闭防火墙

    [root@oracle11g oracle]# chkconfig --level 2345 ip6tables off 设置Linux级别中防火墙关闭

    [root@oracle11g oracle]# chkconfig --level 2345 iptables off

    [root@oracle11g oracle]# service ip6tables stop 设置当前Linux级别中防火墙关闭

    [root@oracle11g oracle]# service iptables stop 查看

    [root@oracle11g oracle]# chkconfig --list | grep ip

    ip6tables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

    iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off

    参考我的经验:oracle rac 11g on rhel 6:[1]准备

  9. 安装oracle 11.2.0.4 软件

    [root@oracle11g oracle]# ll 上传后查看权限

    total 2489640

    -rw-r--r--. 1 root root 1395582860 Oct 29 08:31 p13390677_112040_Linux-x86-64_1of7.zip

    -rw-r--r--. 1 root root 1151304589 Oct 29 08:31 p13390677_112040_Linux-x86-64_2of7.zip

    [root@oracle11g oracle]# chown -R oracle:oinstall /zxx_software/oracle/ 设置权限

    [root@oracle11g oracle]# pwd

    /zxx_software/oracle

    [root@oracle11g oracle]# ll

    total 2489640

    -rw-r--r--. 1 oracle oinstall 1395582860 Oct 29 08:31 p13390677_112040_Linux-x86-64_1of7.zip

    -rw-r--r--. 1 oracle oinstall 1151304589 Oct 29 08:31 p13390677_112040_Linux-x86-64_2of7.zip

    [root@oracle11g oracle]# su - oracle 切换到oracle 用户解压

    [oracle@oracle11g ~]$ cd /zxx_software/oracle/

    [oracle@oracle11g oracle]$ unzip p13390677_112040_Linux-x86-64_1of7.zip

    [oracle@oracle11g oracle]$ unzip p13390677_112040_Linux-x86-64_2of7.zip

    [oracle@oracle11g oracle]$ ll 解压之后

    total 2489644

    drwxr-xr-x. 7 oracle oinstall 4096 Aug 27 2013 database

    -rw-r--r--. 1 oracle oinstall 1395582860 Oct 29 08:31 p13390677_112040_Linux-x86-64_1of7.zip

    -rw-r--r--. 1 oracle oinstall 1151304589 Oct 29 08:31 p13390677_112040_Linux-x86-64_2of7.zip

    [oracle@oracle11g database]$ ./runInstaller 安装

    [root@oracle11g ~]# /u01/app/oraInventory/orainstRoot.sh

    Changing permissions of /u01/app/oraInventory.

    Adding read,write permissions for group.

    Removing read,write,execute permissions for world.

    Changing groupname of /u01/app/oraInventory to oinstall.

    The execution of the script is complete.

    [root@oracle11g ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

    Performing root user operation for Oracle 11g

    The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1

    Enter the full pathname of the local bin directory: [/usr/local/bin]:

    Copying dbhome to /usr/local/bin ...

    Copying oraenv to /usr/local/bin ...

    Copying coraenv to /usr/local/bin ...

    Creating /etc/oratab file...

    Entries will be added to the /etc/oratab file as needed by

    Database Configuration Assistant when a database is created

    Finished running generic part of root script.

    Now product-specific root actions will be performed.

    Finished product-specific root actions.

  10. 编辑oracle环境

    [oracle@node1 ~]$ vi .bash_profile

    export ORACLE_SID=test

    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

    export PATH=$ORACLE_HOME/bin:$PATH

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

    if [ $USER = "oracle" ]; then

    if [ $SHELL = "/bin/ksh" ]; then

    ulimit -p 16384

    ulimit -n 65536

    else

    ulimit -u 16384 -n 65536

    fi

    fi

    [oracle@oracle11g ~]$ source .bash_profile 使环境生效

    [oracle@oracle11g ~]$ echo $ORACLE_HOME 测试是否生效

    /u01/app/oracle/product/11.2.0/db_1

  11. dbca 建库

    建库可参考我的经验:oracle 10g(10.2.0.4) install on rhel 5 中的 dbca建库

  12. netca 创建监听

    [oracle@oracle11g ~]$ netca

    然后一直点击 next,最后点击finish 即可

    END

经验内容仅供参考,如果您需解决具体问题(尤其法律、医学等领域),建议您详细咨询相关领域专业人士。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读