全部博文(535)
分类: AIX
2013-02-19 17:35:19
#!/usr/bin/ksh
x() {
chdev -l aio0 -P $*
if [ $? = 0 ]
then
dspmsg smit.cat -s 25 763 'Changes will become effective at next syste
m restart'
fi
}
x -a minservers='30' -a maxservers='60' -a autoconfig='available'
#chfs -a size=+128M /
#chfs -a size=+128M /home
echo "oradb:/oraapp/product/10.2/db1:N" >> /etc/oratab
mkgroup oinstall
mkgroup dba
x() {
LIST=
SET_A=
for i in "$@"
do
if [ "$i" = "admin=true" ]
then
SET_A="-a"
continue
fi
LIST="$LIST \"$i\""
done
eval mkuser $SET_A $LIST
}
x id='203' pgrp='oinstall' groups='oinstall,dba' home='/home/oracle' shell='/usr/bin/ksh' fsize='-1' data='-1' stack='-1' core='-1' oracle
cd /oradata
ftpUser=root
ftpPWD=root
/usr/bin/ftp -n<
open 10.14.54.168 21
user $ftpUser $ftpPWD
bin
#passive
#mkdir $date0
#cd $date0
cd /oradata
lcd /oradata
get oradb.tar
get oraapp.tar
#get IBM.tar
bye
EOF
cd /oradata && tar xvf /oradata/oradb.tar
cd /oraapp && tar xvf /oradata/oraapp.tar
chown -R oracle:oinstall /oradata &
chown -R oracle:oinstall /oraapp &
chmod -R 775 /oraapp &
chmod -R 741 /oradata &
cat >> /home/oracle/.profile <
if [ -s "\$MAIL" ] # This is at Shell startup. In normal
then echo "\$MAILMSG" # operation, the Shell checks
fi # periodically.
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:\$HOME/bin:/usr/bin/X11:/sbin:.
umask 022
export TERM=xterm
export ORACLE_BASE=/oraapp
export ORACLE_HOME=\$ORACLE_BASE/product/10.2/db1
export ORACLE_SID=oradb
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export PATH=\$PATH:\$ORACLE_HOME/bin
export DISPLAY=10.14.41.24:0.0
EOF
su - oracle <
sqlplus / as sysdba
startup
EOF