#user settings
groupadd -g 1000 oinstall
groupadd -g 1100 dba
useradd -u 1001 -g oinstall -G dba oracle
mkdir -p / oracle
chown -R oracle: oinstall / oracle
chmod -R 755 / oracle
mkdir -p / kk
#Modify the environment variable configuration
export ORACLE_BASE = / oracle
export ORACLE_HOME = $ ORACLE_BASE / product / 10.2.0
export ORA_CRS_HOME = $ ORACLE_BASE / product / crs
export ORACLE_SID = EDWPRD1
export PATH = $ PATH: $ HOME / bin: $ ORACLE_HOME / bin: $ ORA_CRS_HOME / bin
export LD_LIBRARY_PATH = $ ORACLE_HOME / lib: / lib: / usr / lib
#Establish a soft connection
# 10.2.0.1 Modify the kernel
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
net.core.rmem_max = 262144
#Modify shell restrictions
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
#Check the package
rpm -q binutils compat-gcc-34 compat-libstdc ++-296 control-center
rpm -q gcc-c ++ glibc glibc-common glibc-devel libaio libgcc
rpm -q gcc libstdc ++ libstdc ++-devel libXp make openmotif22 setarch
#Modify os version
export JAVA_HOME = / usr / jdk
export JRE_HOME = $ JAVA_HOME / jre
export CLASSPATH =.: $ CLASSPATH: $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar
export PATH = $ PATH: $ JAVA_HOME / bin: $ ANT_HOME / bin
#hangcheckmodule
echo "options hangcheck-timer hangcheck_tick = 30 hangcheck_margin = 180" >> /etc/modprobe.conf
More exciting content in this column: http: //www.bianceng.cnhttp: //www.bianceng.cn/database/Oracle/
echo "/ sbin / modprobe hangcheck-timer" >> /etc/rc.local
#Configure VNC
vi /root/.vnc/xstartup
#! / bin / sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec / etc / X11 / xinit / xinitrc
[-x / etc / vnc / xstartup] && exec / etc / vnc / xstartup
[-r $ HOME / .Xresources] && xrdb $ HOME / .Xresources
xsetroot -solid grey
vncconfig -iconic &
#xterm -geometry 80x24 + 10 + 10 -ls -title "$ VNCDESKTOP Desktop" &
#twm &
gnome-session &
0 0 * * * / usr / sbin / ntpdate 10.10.10.10; / sbin / hwclock -w;
#Configure ssh
cat * .pub >> key
id_dsa id_dsa.pub id_rsa id_rsa.pub key
cat key >> authorized_keys
scp authorized_keys ts03: /home/oracle/.ssh/
#ntpConfiguration
#server
restrict default nomodify
restrict 127.0.0.1
server 127.127.1.0
fudge 127.127.1.0 stratum 10
driftfile / var / lib / ntp / drift
broadcastdelay 0.008
#client
server 10.10.10.10
restrict 10.10.10.10 mask 255.255.255.255 nomodify notrap noquery
#Configure shared storage
/ bin / raw / dev / raw / raw1 / dev / mapper / ocr1
/ bin / raw / dev / raw / raw2 / dev / mapper / ocr2
/ bin / raw / dev / raw / raw3 / dev / mapper / vot1
/ bin / raw / dev / raw / raw4 / dev / mapper / vot2
/ bin / raw / dev / raw / raw5 / dev / mapper / vot3
/ bin / raw / dev / raw / raw6 / dev / mapper / oradata1
/ bin / raw / dev / raw / raw7 / dev / mapper / oradata2
/ bin / raw / dev / raw / raw8 / dev / mapper / oradata3
/ bin / raw / dev / raw / raw9 / dev / mapper / oradata4
sleep 2
chmod 660 / dev / raw / raw *
chown root: oinstall / dev / raw / raw {1,2}
chown oracle.oinstall / dev / raw / raw {3,4,5,6,7,8,9}
#java
export JAVA_HOME = / usr / jdk
export JRE_HOME = $ JAVA_HOME / jre
export CLASSPATH =.: $ CLASSPATH: $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar
export PATH = $ PATH: $ JAVA_HOME / bin: $ ANT_HOME / bin
#JREDIR
unset LD_ASSUME_KERNEL
JRE_JAVA = ""
JAVA_HOME
#
/oracle/product/10.2.0/OPatch/opatch lsinventory
#vify
cluvfy stage -pre crsinst -n ts03, ts04 -verbose
srvctl status database -d edwprd
srvctl status nodeapps -n host1
srvctl config database
srvctl config nodeapps -n host2 -a -g -s -l
select instance_number, instance_name, parallel, status, database_status, host_name from gv $ instance;
#asm