天天看點

oracle11g 安裝過程

安裝oracle軟體

1>建立使用者組、使用者和目錄

bjdb節點下:

[root@node1 /]# groupadd -g 200 oinstall

[root@node1 /]# groupadd -g 201 dba

[root@node1 /]# useradd -u 200 -g oinstall -G dba oracle

Creating mailbox file: File exists

[root@node1 /]# 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@node1 /]# mkdir -p /top/app/oracle

[root@node1 /]# chown -R oracle:oinstall /eb_db

shdb節點下建立相同的使用者組和使用者,腳本一樣;

關閉郵件伺服器

[root@node1 /]# chkconfig sendmail off

2>修改核心參數

/etc/sysctl.conf檔案添加:

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

[root@node1 /]# sysctl -p   //參數檔案生效

/etc/security/limits.conf 檔案下添加:

oracle              soft    nproc   2047

oracle              hard    nproc   16384

oracle              soft    nofile  1024

oracle              hard    nofile  65536

oracle              soft    stack   10240

/etc/pam.d/login 檔案下添加:

session required /lib/security/pam_limits.so

/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

oracle使用者下修改 .bash_profile 檔案

[oracle@beijing ~]$ vi .bash_profile 

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

# User specific environment and startup programs

export EDITOR=vi

export ORACLE_SID=prod

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

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

umask 022

建立監聽:在oracle使用者下操作

Bash-3.00$ netca    //此後會打開一個建立監聽的圖形化界面。進行後續配置。

Bash-3.00$ lsnrctl status  //檢視監聽狀态

3>安裝軟體并在bjdb上使用dbca建立資料庫

在bjdb和shdb上分别安裝oracle軟體

本文轉自 天樂 51CTO部落格,原文連結:http://blog.51cto.com/tianlegg/1693428,如需轉載請自行聯系原作者