频道栏目
首页 > 数据库 > Oracle > 正文
oracle11g单实例安装+redhat6.3规划
2013-09-05 11:09:28           
收藏   我要投稿

oracle11g单实例安装+redhat6.3规划

 

一.查看环境

 

[root@JSCS78DB dev]# cat /etc/redhat-release 

Red Hat Enterprise Linux Server release 6.3 (Santiago)

[root@JSCS78DB dev]# uname -a

Linux JSCS78DB 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

 

 [root@JSCS78DB dev]# cat /etc/passwd

root:x:0:0:root:/root:/bin/bash

bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

adm:x:3:4:adm:/var/adm:/sbin/nologin

lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin

sync:x:5:0:sync:/sbin:/bin/sync

shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

halt:x:7:0:halt:/sbin:/sbin/halt

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin

uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin

operator:x:11:0:operator:/root:/sbin/nologin

games:x:12:100:games:/usr/games:/sbin/nologin

gopher:x:13:30:gopher:/var/gopher:/sbin/nologin

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

nobody:x:99:99:Nobody:/:/sbin/nologin

dbus:x:81:81:System message bus:/:/sbin/nologin

usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin

avahi-autoipd:x:170:170:Avahi IPv4LL Stack:/var/lib/avahi-autoipd:/sbin/nologin

vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin

rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin

rtkit:x:499:497:RealtimeKit:/proc:/sbin/nologin

ntp:x:38:38::/etc/ntp:/sbin/nologin

apache:x:48:48:Apache:/var/www:/sbin/nologin

saslauth:x:498:76:"Saslauthd user":/var/empty/saslauth:/sbin/nologin

postfix:x:89:89::/var/spool/postfix:/sbin/nologin

avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin

rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin

nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin

abrt:x:173:173::/etc/abrt:/sbin/nologin

haldaemon:x:68:68:HAL daemon:/:/sbin/nologin

pulse:x:497:496:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin

gdm:x:42:42::/var/lib/gdm:/sbin/nologin

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

tcpdump:x:72:72::/:/sbin/nologin

weblogic:x:500:500:weblogic:/home/weblogic:/bin/bash

 

 

二.关闭防火墙

checkconfig --list

[root@JSCS78DB home]# export LANG=C

[root@JSCS78DB home]# chkconfig --list | grep iptables

iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

[root@JSCS78DB home]#

 

[root@JSCS78DB home]# service iptables status

表格:filter

Chain INPUT (policy ACCEPT)

num  target     prot opt source               destination         

1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED

2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           

3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22

5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)

num  target     prot opt source               destination         

1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)

num  target     prot opt source               destination        

 

 

[root@JSCS78DB home]# chkconfig iptables off

[root@JSCS78DB home]# chkconfig --list  | grep iptables

iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off

 

[root@JSCS78DB home]# vi  /etc/selinux/config

 

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=enforcing

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

~

 

 

三.创建oracle用户组

groupadd -g 501 oinstall

groupadd -g 502 dba

groupadd -g 503 oper

useradd -u 501 -g oinstall -G dba,oper oracle

passwd oracle

mkdir -p /home/oracle/ora11g/db_base

mkdir -p /home/oracle/ora11g/db_base/product/11.2.0/db_1

chown -R oracle:oinstall /home/oracle

chmod -R  775  /home/oracle

chmod  -R 775   /oracle/app/oracle/

chmod  -R 775  /oracle/app/oracle/product/11.2.0/db_1/

chmod  -R 775 /oracle/app/oraInventory

 

 

 

 

四.编辑配置文件

 

vi  .bash_profile

export PS1="$LOGNAME@`hostname`:\$PWD>"

ORACLE_SID=xyy; export ORACLE_SID

# ORACLE_BASE

ORACLE_BASE=/home/oracle/ora11g/db_base; export ORACLE_BASE

# ORACLE_HOME

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

# JAVA_HOME 

JAVA_HOME=$ORACLE_HOME/jdk; export JAVA_HOME

# ORACLE_PATH

ORACLE_PATH=/home/oracle/ora11g/common/oracle/sql; export ORACLE_PATH

# ORACLE_TERM

ORACLE_TERM=xterm; export ORACLE_TERM

# NLS_DATE_FORMAT

NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

#NLS_LANG

NLS_LANG=american_america.zhs16gbk;export NLS_LANG

# TNS_ADMIN

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

# ORA_NLS11

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

# PATH

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:/goldengate

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/oracle/ora11g/common/oracle/bin

export PATH

# LD_LIBRARY_PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/goldengate

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

# CLASSPATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

# THREADS_FLAG

THREADS_FLAG=native; export THREADS_FLAG

# TEMP, TMP, and TMPDIR

export TEMP=/tmp

export TMPDIR=/tmp

# UMASK

umask 022

 

 

vi  /etc/hosts

[root@JSCS78DB oracle]# vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.10  JSCS78DB

 

 

 

 

vi  /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

#kernel.shmall = 2097152

#kernel.shmmax = 4294967295

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

vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

 

 

[root@JSCS78DB ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel

binutils-2.20.51.0.2-5.34.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.x86_64

elfutils-libelf-0.152-1.el6.x86_64

elfutils-libelf-devel-0.152-1.el6.x86_64

gcc-4.4.6-4.el6.x86_64

gcc-c++-4.4.6-4.el6.x86_64

glibc-2.12-1.80.el6.x86_64

glibc-common-2.12-1.80.el6.x86_64

glibc-devel-2.12-1.80.el6.x86_64

 

 

[root@JSCS78DB ~]# rpm -q glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat

glibc-headers-2.12-1.80.el6.x86_64

ksh-20100621-16.el6.x86_64

libaio-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.x86_64

libgcc-4.4.6-4.el6.x86_64

libstdc++-4.4.6-4.el6.x86_64

libstdc++-devel-4.4.6-4.el6.x86_64

make-3.81-20.el6.x86_64

numactl-devel-2.0.7-3.el6.x86_64

sysstat-9.0.4-20.el6.x86_64

 

 

 

 

五.安装

unzip 安装包

[root@JSCS78DB database]# chown -R oracle:oinstall /xyy/database/

[root@JSCS78DB database]# ll

drwxr-xr-x 12 oracle oinstall 4096 8?. 17 2009 doc

drwxr-xr-x  4 oracle oinstall 4096 8?. 14 2009 install

drwxrwxr-x  2 oracle oinstall 4096 8?. 14 2009 response

drwxr-xr-x  2 oracle oinstall 4096 8?. 14 2009 rpm

-rwxr-xr-x  1 oracle oinstall 4352 8?. 14 2009 runInstaller

drwxrwxr-x  2 oracle oinstall 4096 8?. 14 2009 sshsetup

drwxr-xr-x 14 oracle oinstall 4096 8?. 14 2009 stage

-rw-r--r--  1 oracle oinstall 5400 8?. 18 2009 welcome.html

[root@JSCS78DB database]# su - oracle

oracle@JSCS78DB:/home/oracle>export LANG=C

 

./runInstaller 

注意:接着会弹出安装界面,一步步安装就可(图片太多,不方便上传)

点击复制链接 与好友分享!回本站首页
相关TAG标签 实例
上一篇:ORACLE查询练习
下一篇:使用linux文件句柄恢复误删除的Oracle数据文件
相关文章
图文推荐
文章
推荐
点击排行

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站