日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

Linux 平臺安裝Oracle Database 12c

 瞻云軒 2015-04-03

1)下載Oracle Database 12cRelease 1安裝介質(zhì)

官方的下載地址:

1:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

2:https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=16496132

URL地址2需要先注冊,然后才能登陸下載,注冊登陸界面https://edelivery.oracle.com

clip_image002

關(guān)于這兩者有啥區(qū)別: 聽一個同事說,用metalink 賬號下載的安裝文件完整一些。具體情況是不是如此,還不得而知。

地址1下載的文件為:

linuxamd64_12c_database_1of2.zip

linuxamd64_12c_database_2of2.zip

地址2下載的文件為:

V38500-01_1of2.zip

V38500-01_2of2.zip

2)檢查硬件要求(Check Hardware Requirements)

 

2.1 Check CPU

[root@getoraclelnx01 tmp]#

[root@getoraclelnx01 tmp]# grep "model name" /proc/cpuinfo

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

[root@getoraclelnx01 tmp]# cat /proc/cpuinfo | grep "processor" | wc -l

8

[root@getoraclelnx01 tmp]#  cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

4

[root@getoraclelnx01 tmp]#

clip_image004

2.2 Check Memory 

[root@getoraclelnx01 tmp]# grep MemTotal /proc/meminfo

MemTotal:       24736752 kB

[root@getoraclelnx01 tmp]# grep SwapTotal /proc/meminfo

SwapTotal:      37748728 kB

[root@getoraclelnx01 tmp]# free -g

               total           used        free     shared    buffers     cached

Mem:         23              7             16            0              0               5

-/+ buffers/cache:      1             22

Swap:        35             0             35

[root@getoraclelnx01 tmp]#

clip_image006

Oracle 12c 對系統(tǒng)內(nèi)存的最低要求為1G,推薦2G或更大的內(nèi)存,從上面結(jié)果可以知道系統(tǒng)內(nèi)存23G,完全滿足要求。

Oracle對交換分區(qū)(Swap Space)的推薦設(shè)置如下,這里Swap Space為35G,不是16G,需要做一下調(diào)整。

clip_image008

2.3 Check Disk Capacity

clip_image010

Oracle 12c 企業(yè)版的需要6.4G大小的磁盤空間,標準版需要6.1G大小的磁盤空間。/tmp 需要至少1G的大小。從上面結(jié)果得知,磁盤空間完全滿足。

3)檢查軟件要求(Checking the Software Requirements)

3.1 操作系統(tǒng)版本檢測

     Oracle 12 c 只支持64位的Linux系統(tǒng)。不支持32Linux平臺,這也許是以后的趨勢了。Operating System Requirements for x86-64 Linux Platforms。 Oracle 的官方文檔明確列出了支持下面三個Linux版本

  • Supported Oracle Linux 6 and Red Hat Enterprise Linux 6 Distributions for x86-64
  • Supported Oracle Linux 5 and Red Hat Enterprise Linux 5 Distributions for x86-64
  • Supported SUSE Distributions for x86-64

[root@getoraclelnx01 /]# uname -m

x86_64

[root@getoraclelnx01 /]# uname -r

2.6.32-200.13.1.el5uek

[root@getoraclelnx01 /]# more /etc/redhat-release

Red Hat Enterprise Linux Server release 5.7 (Tikanga)

[root@getoraclelnx01 ~]# uname -a

Linux getoraclelnx01.gfg1.esquel.com 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 21:02:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@getoraclelnx01 Server]# lsb_release -id

Distributor ID: EnterpriseEnterpriseServer

Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)

[root@getoraclelnx01 Server]#

3.2 檢查oracle 12c所需包

關(guān)于Oracle 12c所需包,從官方文檔看,不同版本的操作系統(tǒng)似乎有所不同,Oracle Linux 5 and Red Hat Enterprise Linux 5需要安裝下面一些包

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-58

glibc-2.5-58 (32 bit)

glibc-devel-2.5-58

glibc-devel-2.5-58 (32 bit)

ksh

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3.106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

libXext-1.0.1

libXext-1.0.1 (32 bit)

libXtst-1.0.1

libXtst-1.0.1 (32 bit)

libX11-1.0.3

libX11-1.0.3 (32 bit)

libXau-1.0.1

libXau-1.0.1 (32 bit)

libXi-1.0.1

libXi-1.0.1 (32 bit)

make-3.81

sysstat-7.0.2

rpm -q binutils compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libXi make sysstat

clip_image012

如上所示,還需要安裝包 compat-libstdc++和 libaio-devel相關(guān)包

clip_image014

[root@getoraclelnx01 Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

package compat-libstdc++-33-3.2.3-61.i386 is already installed

[root@getoraclelnx01 Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm

warning: compat-libstdc++-33-3.2.3-61.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

package compat-libstdc++-33-3.2.3-61.x86_64 is already installed

[root@getoraclelnx01 Server]# ls *libaio-devel*

libaio-devel-0.3.106-5.i386.rpm libaio-devel-0.3.106-5.x86_64.rpm

[root@getoraclelnx01 Server]# rpm -ivh libaio-devel-0.3.106-5.i386.rpm

warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

1:libaio-devel ########################################### [100%]

[root@getoraclelnx01 Server]# rpm -ivh libaio-devel-0.3.106-5.x86_64.rpm

warning: libaio-devel-0.3.106-5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

1:libaio-devel ########################################### [100%]

[root@getoraclelnx01 Server]#

如上所示,既可以用rpm安裝,也可以用yum本地源進行安裝,這個就看那個方便以及個人的喜好、習(xí)慣了。一般推薦用yum安裝,不過需要進行配置。具體可以參見我的博客。

4)系統(tǒng)配置準備

4.1 創(chuàng)建Oracle用戶和用戶組

[root@getoraclelnx01 Server]# groupadd dba

[root@getoraclelnx01 Server]# groupadd oinstall

[root@getoraclelnx01 Server]# useradd -g oinstall -G dba oracle

[root@getoraclelnx01 Server]# id oracle

uid=502(oracle) gid=503(oinstall) groups=503(oinstall),502(dba)

[root@getoraclelnx01 Server]#

clip_image016

創(chuàng)建了oracle用戶以及相關(guān)用戶組后,需要設(shè)置oracle用戶密碼。

4.2 創(chuàng)建安裝目錄

[root@getoraclelnx01 Server]#

[root@getoraclelnx01 Server]# mkdir -p /u01/app/oracle

[root@getoraclelnx01 Server]# chown -R oracle:oinstall /u01/app/oracle

[root@getoraclelnx01 Server]# chmod -R 775 /u01/app/oracle

[root@getoraclelnx01 Server]#

clip_image018

4.3 Disable SELinux

[root@getoraclelnx01 ~]# /usr/sbin/sestatus

SELinux status: disabled

[root@getoraclelnx01 ~]# /usr/sbin/getenforce

Disabled

[root@getoraclelnx01 ~]#

clip_image020

從上面可以看出SELinux已經(jīng)被禁用了,如果沒有禁用,則可以通過下面命令禁用

getenforce (returns "Enforcing")

setenforce 0

getenforce (returns "Permissive")

End to restore it to enforcing

setenforce 1

getenforce (returns "Enforcing")

[root@getoraclelnx01  os]# /usr/sbin/sestatus

SELinux status:                 disabled

[root@getoraclelnx01  os]# /usr/sbin/getenforce

Disabled

[root@getoraclelnx01  os]#

Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

SELINUX=disabled

 

4.4 修改系統(tǒng)內(nèi)核參數(shù)

在修改系統(tǒng)內(nèi)核參數(shù)前,你可以用命令先查看一下當前各類系統(tǒng)參數(shù)的值,亦或直接查看配置文件/etc/sysctl.conf

[root@getoraclelnx01 ~]# getconf PAGESIZE

4096

[root@getoraclelnx01 ~]# sysctl -a | grep sem

kernel.sem = 250 32000 32 128

[root@getoraclelnx01 ~]# sysctl -a | grep shm

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

kernel.shmmni = 4096

vm.hugetlb_shm_group = 0

[root@getoraclelnx01 ~]# sysctl -a | grep file-max

fs.file-max = 2414060

[root@getoraclelnx01 ~]# sysctl -a | grep ip_local_port_range

net.ipv4.ip_local_port_range = 32768 61000

[root@getoraclelnx01 ~]#

clip_image022

關(guān)于內(nèi)核參數(shù)的一些設(shè)置建議,可以參考下面資料:

kernel.shmmax關(guān)于內(nèi)核參數(shù)kernel.shmmax,oracle 建議,kernel.shmmax的值不能少于物理內(nèi)存的一半,而且要大于Oracle中sga-max-size的值,否則會造成oracle性能下降一般32bit操作系統(tǒng),直接設(shè)置為系統(tǒng)支持的最大內(nèi)存即可,64bit操作系統(tǒng)設(shè)置大于sga-max-size的值即可如:當前內(nèi)存為2G 則kernel.shmmax = 2*1024*1024=2097152當前內(nèi)存為8G則 kernel.shmmax = 7*1024*1024=7340032Kernel.shmallShmall指系統(tǒng)一次可以使用的共享內(nèi)存段的最大數(shù)量,以頁為單位。Oracle默認設(shè)置為 kernel.shmall = 2097152即最大8G(2097152*4/1024/1024),(在調(diào)整SGA時需要注意,SGA大小設(shè)置不可超過該值),根據(jù)系統(tǒng)內(nèi)存大小和使用的不同可以參考如下:設(shè)置的一般規(guī)律kernel.shmall = 8G/4k=8388608k/4k=2097152    ---內(nèi)存8Gkernel.shmall = 16G/4k=16777216k/4k=4194304    ---內(nèi)存16Gkernel.shmall = 32G/4k=33554432k/4k=8388608    ---內(nèi)存32G(RedHat linux系統(tǒng)中頁大小為4096即4K,實際環(huán)境以getconf PAGE_SIZE結(jié)果為準)kernel.shmmnishmmni 指系統(tǒng)共享內(nèi)存段的最大數(shù)量oracle設(shè)置默認值為4096,一般是足夠用了,不需要調(diào)整文件句柄數(shù)的相關(guān)內(nèi)核參數(shù)設(shè)置fs.file-maxfs.file-max指系統(tǒng)能夠打開最大的文件句柄數(shù)oracle建議設(shè)置為65536,一般不用修改信號的相關(guān)內(nèi)核參數(shù)設(shè)置kernel.semkernel.sem是指 semmsl,semmns,semopm,semmni這4個參數(shù)semmsl 指每個線號集的最大信號數(shù),Oracle建議是設(shè)置為oracle的最大進程數(shù)+10semmni 指整個系統(tǒng)的信號集的最大數(shù)量semmns 指整個系統(tǒng)的信號總數(shù),也就是semmni*semmsl的結(jié)果semopm 指每個semop系統(tǒng)調(diào)用可以執(zhí)行的信號操作的最大數(shù)量oracle默認設(shè)置semmsl=250semmns=3200semopm=100semmni=128即kernel.sem= 250 3200 100 128例:在oracle  ora.init文件參數(shù)中設(shè)置PROCESSES參數(shù)為5000則semmsl=5010,semmni=128,semmns=semmsl* semmni=641280另外semopm建議設(shè)置等于semmsl值即5010那么kernel.sem=5010 641280 5010 128網(wǎng)絡(luò)相關(guān)的內(nèi)核參數(shù)設(shè)置net.core.rmem_defaultnet.core.rmem_default 指網(wǎng)絡(luò)套接字的默認接收緩沖區(qū)的大小,oracle建議設(shè)置為265K即262144net.core.rmem_maxnet.core.rmem_max 指網(wǎng)絡(luò)套接字的最大接收緩沖區(qū)的大小,oracle10g及以前版本建議設(shè)置為256k即262144 oracle11g建議設(shè)置為4M 即4194304net.core.wmem_defaultnet.core.wmem_default指網(wǎng)絡(luò)套接字的默認發(fā)送緩沖區(qū)的大小,oracle建議設(shè)置為265K即262144net.core.wmem_maxnet.core.wmem_max  指網(wǎng)絡(luò)套接字的最大發(fā)送緩沖區(qū)的大小,oracle10g及以前版本建議設(shè)置為256k即262144 oracle11g建議設(shè)置為1M即1048576net.ipv4.ip_local_port_rangenet.ipv4.ip_local_port_range ,指本地的允許打開隨機端口范圍oracle10g前建議端口范圍為1024 65000,oracle11g建議端口范圍為:9000 65500 并忽略oracle安裝程序任何關(guān)于這個參數(shù)的警告Asynchronous I/O相關(guān)的內(nèi)核參數(shù)設(shè)置fs.aio-max-nrfs.aio-max-nr 指系統(tǒng)允許的最大的異步IO請求大小oracle默認設(shè)置為1M即1048576,一般不用更改
View Code

 

修改前最后先備份一下/etc/sysctl.conf,以防萬一。

[root@getoraclelnx01 ~]# cp /etc/sysctl.conf /etc/sysctl.conf.bak

[root@getoraclelnx01 ~]# vi /etc/sysctl.conf 添加或修改下面參數(shù)

kernel.shmmax = 68719476736

kernel.shmall = 6029312

kernel.shmmni = 4096

kernel.sem =250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 262144

net.ipv4.ip_local_port_range =9000 65500

fs.file-max=65536

fs.aio-max-nr=1048576

kernel.shmall =physical RAM size / pagesize (getconf PAGESIZE) -- If the defaults are greater then leave it.

kernel.shmall = 內(nèi)存大小/4k=23G*1024*1024/4k = 6029312

kernel.shmmax = 20*1024*1024=20971520 而默認的為68719476736,那么使用默認值

修改完成后保存,然后運行sysctl -p 命令使之生效

clip_image024

 

4.5 設(shè)置用戶限制

/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

Add the following line to the "/etc/pam.d/login" file,

if it does not already exist.

session required /lib/security/pam_limits.so

session required pam_limits.so

Add the following to

/etc/profile if Oracle user will use the bash shell.

if [ $USER = "oracle" ]; then

ulimit -u 16384

ulimit -n 65536

fi

4.6 配置環(huán)境變量

首先切換到oracle賬戶 ,編輯修改主目錄下 .bash_profile

clip_image026

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOME

ORACLE_SID=epps; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

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

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then

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

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

使配置生效

[oracle@getoraclelnx01 ~]$ source .bash_profile

[oracle@getoraclelnx01 ~]$

解壓安裝鏡像文件

[oracle@getoraclelnx01 tmp]$ unzip V38500-01_1of2.zip

[oracle@getoraclelnx01 tmp]$ unzip V38500-01_2of2.zip

安裝步驟截圖

clip_image028

clip_image030

clip_image032

clip_image034

clip_image036

clip_image038

clip_image040

clip_image042

clip_image044

clip_image046

在這一步時,無法繼續(xù),因為oracle賬戶無法創(chuàng)建oraInventory目錄,所以必須先創(chuàng)建該用戶并授權(quán)

[root@getoraclelnx01 ~]# mkdir -p /u01/app/oraInventory

[root@getoraclelnx01 ~]# chown -R oracle:oinstall /u01/app/oraInventory

[root@getoraclelnx01 ~]# chmod -R 775 /u01/app/oraInventory

clip_image048

clip_image050

clip_image052

clip_image054

clip_image056

clip_image058

clip_image060

clip_image062

clip_image064

clip_image066

驗證參數(shù)時,fs.file-max設(shè)置為65536,但是ORACLE推薦使用68157744,net.core.wmem_max大小為262144,oracle 推薦使用1048576,修改內(nèi)核參數(shù),運行sysctl -p使之生效。然后重新驗證通過

[root@getoraclelnx01 ~]# sysctl -p

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 = 6029312

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.ip_local_port_range = 9000 65500

fs.file-max = 6815744

fs.aio-max-nr = 1048576

[root@getoraclelnx01 ~]#

clip_image068

clip_image070

clip_image072

 

運行過程會提示讓你用root賬戶執(zhí)行2個腳本,你將腳本的文件拿下來,在root賬戶下執(zhí)行即可。

 

clip_image078

clip_image080

[參考資料]:

Database Quick Installation Guide for Linux x86-64 e17718.pdf

http://blog.csdn.net/lnwf5188588/article/details/8779001

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多