Oracle 12C之環境準備工作

來源:互聯網
上載者:User

作業系統: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筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.