oracle11.2.0.4.0 資料庫安裝

531079521發表於2015-09-13

-rw-r--r--. 1 oracle oinstall 1395582860 Jun 24 18:02 p13390677_112040_Linux-x86-64_1of7.zip
-rw-r--r--. 1 oracle oinstall 1151304589 Jun 24 18:02 p13390677_112040_Linux-x86-64_2of7.zip

oracle11.2.0.4.0 資料庫安裝

一、修改核心

1.1 修改sysctl.conf檔案

[root@doea5db01 Downloads]# vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

kernel.shmmax = 277495689510912

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

fs.file-max = 6815744

1.2 使引數生效

[root@doea5db01 Downloads]# sysctl –p

二、增加使用者和組

[root@doea5db01 Downloads]# groupadd oinstall

[root@doea5db01 Downloads]# groupadd dba

[root@doea5db01 Downloads]# groupadd oper

[root@doea5db01 Downloads]# useradd -g oinstall -G dba,oper oracle

[root@doea5db01 Downloads]# passwd oracle

三、修改limits.conf限制

[root@doea5db01 Downloads]# vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

四、修改/etc/pam.d/login

[root@doea5db01 Downloads]# vi /etc/pam.d/login

session required /lib64/security/pam_limits.so

五、修改bash_profile檔案

5.1 修改profile

[root@doea5db01 Downloads]# vi /etc/profile

if [ $USER = "oracle" ]; then

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

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

5.2 修改bash_profile

[oracle@doea5db01 ~]$ vi .bash_profile

export EDITOR=vi

export ORACLE_SID=doea5db

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

export INVENTORY_LOCATION=/oraInventory

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export NLS_LANG="American_america.zhs16gbk"

export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'

export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin

umask 022

5.3 使bash_profile生效

[oracle@doea5db01 ~]$ source .bash_profile

六、建立目錄

[root@doea5db01 ~]# mkdir /doea5

[root@doea5db01 ~]# chown oracle:oinstall /doea5

七、安裝oracle資料庫軟體

[oracle@doea5db01 ~]$ cd database/

[oracle@doea5db01 database]$ pwd

/home/oracle/database

7.1 執行runInstaller安裝程式

clip_image002

clip_image004

clip_image005

clip_image007

7.2 僅安裝oracle軟體

選擇“install database software only”選項:

clip_image009

選擇“single instance database installation”:

clip_image011

選擇語言(注:沒有特殊需求,預設即可):

clip_image013

選擇“Enterprise Editor(4.7GB)”:

clip_image015

7.3選擇安裝目錄(注:路徑是從環境變數裡讀取的,一般不需要修改):

clip_image017

clip_image019

選擇使用者dba和組oper:

clip_image021

確保檢查結果無警告出現(注:下圖提示的swap size是警告,是可以忽略的):

clip_image023

clip_image025

clip_image027

7.4 root執行shell指令碼

clip_image029

以root身份執行orainstRoot.sh和root.sh指令碼(注:執行完指令碼以後,在點選“ok”):

[root@doea5db01 Packages]# /doea5/oraInventory/orainstRoot.sh

Changing permissions of /doea5/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

Changing groupname of /doea5/oraInventory to oinstall.

The execution of the script is complete.

[root@doea5db01 Packages]# /doea5/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= /doea5/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.

點選“close”按鈕完成安裝:

clip_image031

八、建立listener

8.1 執行netca

clip_image033

clip_image035

8.2新增listener

clip_image037

8.3 命名listener

clip_image039

clip_image041

8.4 選擇埠1521(注:1521是預設埠):

clip_image043

clip_image045

clip_image047

九、建立例項

9.1 執行dbca

clip_image049

clip_image051

9.2 選擇建立資料庫例項

clip_image053

clip_image055

9.3 選擇例項名

clip_image057

clip_image059

9.3 填寫內建賬號的密碼

clip_image061

clip_image063

9.4 取消歸檔和閃回

取消“Specify Fast Recovery Area”和“Enable Archiving”(注:待安裝完成後,會單獨定製這兩個功能):

clip_image065

clip_image067

clip_image069

9.5 修改資料庫程式數量

修改資料庫最大程式的數量為3000:

clip_image071

9.6 修改資料庫字符集

選擇資料庫字符集:ZHS16GBK –GBK 16-bit Simplified Chinese

clip_image073

clip_image075

clip_image077

clip_image079

clip_image081

clip_image082

十、開啟歸檔和閃回功能

10.1 建立目錄

[oracle@doea5db01 doea5]$

mkdir /doea5/{arch, flash_recovery }

[oracle@doea5db01 doea5]$ sqlplus / as sysdba

10.2 修改spfile引數

SQL> alter system set log_archive_dest_1='location=/doea5/arch';

SQL> alter system set log_archive_format='arch_%t_%s_%r.log' scope=spfile;

SQL> alter system set db_recovery_file_dest_size=20G;

SQL> alter system set db_recovery_file_dest='/doea5/flash_recovery';

SQL> alter system set db_flashback_retention_target=10080;

SQL> alter system set undo_retention=10800;

10.3 開啟歸檔和閃回

SQL> shutdown immediate

SQL> startup mount

SQL> alter database archivelog ;

SQL> alter database flashback on;

SQL> alter database open;

十一、表空間分類及資料初始化

根據“A5業務系統.zip”附件裡的README提示,執行指令碼和命令完成表空間分類和資料初始化工作。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28841119/viewspace-1798384/,如需轉載,請註明出處,否則將追究法律責任。

相關文章