RHEL5.4安装Oracle-10g,系统安装脚本

 # Kickstart file automatically generated by anaconda.

 
install
url --url http://192.168.1.254/rhel5.4
key --skip
lang en_US.UTF-8
keyboard us
xconfig --startxonboot
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$87jgKg/r$Leoc.b8lPzvVqLBJX/VMx0
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
reboot
timezone --utc Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --linux
#part /boot --fstype ext3 --size=200
#part pv.3 
#volgroup vsr --pesize=4096 pv.3
#logvol /tmp --fstype ext3 --name=lvtmp --vgname=vsr --size=1024
#logvol swap --fstype swap --name=swap --vgname=vsr --size=2048
#logvol /home --fstype ext3 --name=lvhome --vgname=vsr --size=1024
#logvol / --fstype ext3 --name=lvroot --vgname=vsr --size=15204
 
%packages
@admin-tools
@base
@chinese-support
@core
@development-libs
@development-tools
@dialup
@editors
@gnome-desktop
@gnome-software-development
@games
@graphical-internet
@graphics
@java
@java-development
@kde-software-development
@legacy-software-development
@legacy-software-support
@office
@printing
@ruby
@sound-and-video
@system-tools
@text-internet
@x-software-development
@base-x
libhbaapi
kexec-tools
fipscheck
device-mapper-multipath
fuse-libs
sgpio
systemtap-sdt-devel
perl-XML-SAX
pth
perl-XML-Twig
perl-XML-Dumper
perl-TimeDate
perl-libxml-perl
tog-pegasus-devel
perl-Convert-ASN1
libstdc++44-devel
libassuan-devel
perl-XML-NamespaceSupport
perl-DateManip
libksba-devel
fipscheck-devel
sblim-cmpi-dhcp-devel
perl-Crypt-SSLeay
perl-Mozilla-LDAP
pth-devel
perl-LDAP
perl-XML-Grove
libpciaccess-devel
python-imaging
libhbaapi-devel
fuse-devel
libksba
perl-Archive-Zip
gcc44-c++
gcc44-gfortran
pexpect
dejagnu
imake
java-1.6.0-openjdk-devel
gcc-objc
ElectricFence
memtest86+
gcc-gnat
libgfortran44
gcc44
expect
java-1.6.0-openjdk
unifdef
python-docs
nasm
emacs
libgnome-java
gob2
libgtk-java
libglade-java
libgconf-java
libsane-hpaio
bsh-demo
kdesdk-devel
gtk+
eruby
ruby-ri
tog-pegasus
audit
sysstat
xorg-x11-xbitmaps
mesa-libGLw-devel
openmotif-devel
icon-naming-utils
mesa-libGLU-devel
icon-slicer
xorg-x11-server-sdk
libXp-devel
xorg-x11-utils
libpciaccess
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
compat-db
pdksh
 
%post
#sed -i.bak '1d' /etc/redhat-release
cat >/etc/redhat-release <<END
redhat-4
END
 
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
/bin/echo "oracle" |/usr/bin/passwd --stdin oracle
 
cat >> /etc/sysctl.conf << END
#for oracle
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
END
 
cat >> /etc/security/limits.conf << END
#for oracle
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
END
 
cat >> /etc/pam.d/login << END
session    required     /lib64/security/pam_limits.so
session    required     pam_limits.so
 
cat >> /etc/profile << END
if [ \$USER = "oracle" ]; then
        if [ \$SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
END
 
cat >> /home/oracle/.bash_profile << END
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID
ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME
PATH=\$ORACLE_HOME/bin:\$PATH
export PATH
END
 
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01
%end

你可能感兴趣的:(oracle,RHEL5.4,系统安装脚本)