Home > Database > Mysql Tutorial > body text

Oracle 12C之环境准备工作

WBOY
Release: 2016-06-07 16:48:25
Original
863 people have browsed it

操作系统:64位Linux redhat 6.3安装Oracle 12C之环境准备工作

操作系统:64位Linux RedHat 6.3安装Oracle 12C之环境准备工作

1、安装依赖包

binutils-2.20.51.0.2-5.11.el6 (x86_64)
 compat-libcap1-1.10-1 (x86_64)
 compat-libstdc++-33-3.2.3-69.el6 (x86_64)
 compat-libstdc++-33-3.2.3-69.el6 (i686)
 gcc-4.4.4-13.el6 (x86_64)
 gcc-c++-4.4.4-13.el6 (x86_64)
 glibc-2.12-1.7.el6 (i686)
 glibc-2.12-1.7.el6 (x86_64)
 glibc-devel-2.12-1.7.el6 (x86_64)
 glibc-devel-2.12-1.7.el6 (i686)
 ksh
 libgcc-4.4.4-13.el6 (i686)
 libgcc-4.4.4-13.el6 (x86_64)
 libstdc++-4.4.4-13.el6 (x86_64)
 libstdc++-4.4.4-13.el6 (i686)
 libstdc++-devel-4.4.4-13.el6 (x86_64)
 libstdc++-devel-4.4.4-13.el6 (i686)
 libaio-0.3.107-10.el6 (x86_64)
 libaio-0.3.107-10.el6 (i686)
 libaio-devel-0.3.107-10.el6 (x86_64)
 libaio-devel-0.3.107-10.el6 (i686)
 libXext-1.1 (x86_64)
 libXext-1.1 (i686)
 libXtst-1.0.99.2 (x86_64)
 libXtst-1.0.99.2 (i686)
 libX11-1.3 (x86_64)
 libX11-1.3 (i686)
 libXau-1.0.5 (x86_64)
 libXau-1.0.5 (i686)
 libxcb-1.5 (x86_64)
 libxcb-1.5 (i686)
 libXi-1.3 (x86_64)
 libXi-1.3 (i686)
 make-3.81-19.el6
 sysstat-9.0.4-11.el6 (x86_64)


2、创建oracle用户和组
 [root@ora12c Server]# groupadd oinstall
 [root@ora12c Server]# groupadd dba
 [root@ora12c Server]# useradd -g oinstall -G dba oracle
 [root@ora12c Server]# passwd oracle
 Changing password for user oracle.
 New UNIX password:
 BAD PASSWORD: it is based on a dictionary word
 Retype new UNIX password:
 passwd: all authentication tokens updated successfully.

[root@ora12c Server]# mkdir -p /oracle/
 [root@ora12c Server]# chown -R oracle:oinstall /oracle/
 [root@ora12c Server]# chmod -R 775 /oracle/

4、修改内核参数
 在/etc/sysctl.conf文件下加入如下参数
 [root@ora12c Server]# vim /etc/sysctl.conf
 fs.aio-max-nr = 1048576
 fs.file-max = 6815744
 kernel.shmall = 2097152
 kernel.shmmax = 2536870912 
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

/sbin/sysctl -p 使参数生效
 [root@ora12c Server]# /sbin/sysctl -p
 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
 net.ipv4.ip_forward = 0
 net.ipv4.conf.default.rp_filter = 2
 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 = 4294967296

注意:kernel.shmmax一般为物理内存的一半,SGA大小不能超过这个值,否则报错
 
5、修改用户限制
 在/etc/security/limits.conf加入相关配置
 [root@ora12c Server]# vim /etc/security/limits.conf
 oracle          soft    nproc  2047
 oracle          hard    nproc  16384
 oracle          soft    nofile  1024
 oracle          hard    nofile  65536
 oracle          soft    stack  10240
 oracle          hard    stack  10240

 

修改文件/etc/pam.d/login,增加以下内容:
 session required pam_limits.so


6、配置环境变量
 在 .bash_profile配置如下变量

oracle@ora12c ~]$ vim .bash_profile
 export ORACLE_BASE=/oracle/ora12c

export ORACLE_HOME=$ORACLE_BASE/db1
 export ORACLE_SID=ora12c
 export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
 export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS";
 export PATH=$ORACLE_BASE/bin:$ORACLE_HOME/bin:/bin:/sbin:/usr/ccs/bin:/usr/local/bin:$PATH
 umask 022

使配置文件生效
 [oracle@ora12c ~]$ source .bash_profile
 
后面的安装就是使用xmanager进行图形界面安装,根据界面提示一步步来就可以了。

推荐阅读:

CentOS 6.3(x32)下安装Oracle 10g R2

Linux-6-64下安装Oracle 12C笔记

本文永久更新链接地址:

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template