redhat as3+oracle 9i 安装脚本
时间:2006-06-25 来源:ren76ren
#!/bin/sh
echo
echo "=============Copyright pike , All Rights Reserved"
echo "Press any key to continue..."
read
echo groupadd dba
groupadd oinstall
useradd oracle -g oinstall -G dba
echo "=============going to passwd oracle..."
echo "Press any key to continue..."
read
passwd oracle
echo "=============finished passwd oracle" mkdir /datafile
chown oracle.dba /datafile
chmod 777 /datafile
#You can choose not to use 777 if you have a higher demand for the security. cp /home/oracle/.bash_profile /home/oracle/.bash_profile-bak-pke
#============my version===============
echo "export ORACLE_HOME=/home/oracle/PROGRAM/9i" >> /home/oracle/.bash_profile
echo "export ORACLE_BASE=/datafile" >> /home/oracle/.bash_profile
echo "export ORACLE_SID=name" >> /home/oracle/.bash_profile export ORACLE_HOME=/home/oracle/PROGRAM/9i
echo "export PATH=$PATH:$ORACLE_HOME/bin:./:/home/oracle:$ORACLE_HOME/Apache/Apache/bin" >> /home/oracle/.bash_profile
#The row above may need modification... echo "export LD_ASSUME_KERNEL=2.4.1" >> /home/oracle/.bash_profile
#2.4.1 is a low version, thus can be compatible with most cases. echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/lib:/usr/lib/usr/local/lib" >> /home/oracle/.bash_profile echo "umask 000" >> /home/oracle/.bash_profile
#You can choose not to use 000 if you have a higher demand for the security. #=======These are optional===========
#echo "export LANG=en_US" >> /home/oracle/.bash_profile
#echo "export NLS_LANG=AMERICAN" >> /home/oracle/.bash_profile
#echo "export ORACLE_OWNER=oracle" >> /home/oracle/.bash_profile
#echo "export ORACLE_TERM=vt100" >> /home/oracle/.bash_profile
#echo "export THREADS_FLAG=native" >> /home/oracle/.bash_profile echo "============going to chech the modified .bash_profile..."
echo "Press any key to continue..."
read
less /home/oracle/.bash_profile
cp /etc/sysctl.conf /etc/sysctl.conf-bak-pke echo "kernel.shmmax = $[`free |grep Mem |awk '{print $2}'`/2*1000]" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf echo "============going to chech the modified sysctl.conf..."
echo "Press any key to continue..."
read
less /etc/sysctl.conf echo "===========press ctrl+c to stop if anything is wrong"
echo " or press any key to continue..."
read
sysctl -p echo "Please make sure the patch is present in the /pke dir"
echo "Press any key to continue..."
read
unzip -d /pke /pke/p3006854_9204_linux.zip
echo "==========going to execute the patch"
sh /pke/3006854/rhel3_pre_install.sh
echo "==========executing patch finished"
echo "===========going to set DISPLAY"
export DISPLAY=127.0.0.1:0.0
xhost 127.0.0.1
echo "==========setting DISPLAY finished" #gcc & g++: lower the versions of them. echo "===========going to check if the necessary RPM packages have been installed..."
sleep 5
rpm -q gcc cpp compat-libstdc++ glibc-devel binutils
echo "===========if some of the above have NOT been installed, install them after this shell is finished."
echo "Press any key to continue..."
read
echo "=========going to start installing interface..."
echo "Press any key to continue..."
read
su - oracle -c "/pke/oracle9i/CD1/runInstaller"
echo "=============Copyright pike , All Rights Reserved"
echo "Press any key to continue..."
read
echo groupadd dba
groupadd oinstall
useradd oracle -g oinstall -G dba
echo "=============going to passwd oracle..."
echo "Press any key to continue..."
read
passwd oracle
echo "=============finished passwd oracle" mkdir /datafile
chown oracle.dba /datafile
chmod 777 /datafile
#You can choose not to use 777 if you have a higher demand for the security. cp /home/oracle/.bash_profile /home/oracle/.bash_profile-bak-pke
#============my version===============
echo "export ORACLE_HOME=/home/oracle/PROGRAM/9i" >> /home/oracle/.bash_profile
echo "export ORACLE_BASE=/datafile" >> /home/oracle/.bash_profile
echo "export ORACLE_SID=name" >> /home/oracle/.bash_profile export ORACLE_HOME=/home/oracle/PROGRAM/9i
echo "export PATH=$PATH:$ORACLE_HOME/bin:./:/home/oracle:$ORACLE_HOME/Apache/Apache/bin" >> /home/oracle/.bash_profile
#The row above may need modification... echo "export LD_ASSUME_KERNEL=2.4.1" >> /home/oracle/.bash_profile
#2.4.1 is a low version, thus can be compatible with most cases. echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:/lib:/usr/lib/usr/local/lib" >> /home/oracle/.bash_profile echo "umask 000" >> /home/oracle/.bash_profile
#You can choose not to use 000 if you have a higher demand for the security. #=======These are optional===========
#echo "export LANG=en_US" >> /home/oracle/.bash_profile
#echo "export NLS_LANG=AMERICAN" >> /home/oracle/.bash_profile
#echo "export ORACLE_OWNER=oracle" >> /home/oracle/.bash_profile
#echo "export ORACLE_TERM=vt100" >> /home/oracle/.bash_profile
#echo "export THREADS_FLAG=native" >> /home/oracle/.bash_profile echo "============going to chech the modified .bash_profile..."
echo "Press any key to continue..."
read
less /home/oracle/.bash_profile
cp /etc/sysctl.conf /etc/sysctl.conf-bak-pke echo "kernel.shmmax = $[`free |grep Mem |awk '{print $2}'`/2*1000]" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf echo "============going to chech the modified sysctl.conf..."
echo "Press any key to continue..."
read
less /etc/sysctl.conf echo "===========press ctrl+c to stop if anything is wrong"
echo " or press any key to continue..."
read
sysctl -p echo "Please make sure the patch is present in the /pke dir"
echo "Press any key to continue..."
read
unzip -d /pke /pke/p3006854_9204_linux.zip
echo "==========going to execute the patch"
sh /pke/3006854/rhel3_pre_install.sh
echo "==========executing patch finished"
echo "===========going to set DISPLAY"
export DISPLAY=127.0.0.1:0.0
xhost 127.0.0.1
echo "==========setting DISPLAY finished" #gcc & g++: lower the versions of them. echo "===========going to check if the necessary RPM packages have been installed..."
sleep 5
rpm -q gcc cpp compat-libstdc++ glibc-devel binutils
echo "===========if some of the above have NOT been installed, install them after this shell is finished."
echo "Press any key to continue..."
read
echo "=========going to start installing interface..."
echo "Press any key to continue..."
read
su - oracle -c "/pke/oracle9i/CD1/runInstaller"
相关阅读 更多 +