当前位置:数据库 > Oracle >>

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

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_LIBRAR
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,