echo oracle,oracle安装shell(未验证)

整个程序代码如下:(问题还没解决)

#! /bin/bash

groupadd oinstall

groupadd dba

useradd -m -g oinstall -G dba oracle

passwd oracle

chown -R oracle:oinstall /oracle

chmod -R 775 /oracle

ins=$(rpm -q binutils compat-db control-center gcc gcc-c++ glibc-common gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio openmotif21|awk '{print $2}')

if [ -n "$ins" ]

then

echo "please download and install the following packets:"

echo "$ins"

else

echo "all needed packets have installed"

fi

echo "Oracle 10g required" >> /etc/sysctl.conf

echo "kernel.shmall=2097152" >> /etc/sysctl.conf

echo "kernel.shmmax=536870912" >> /etc/sysctl.conf

echo "kernel.shmmni=4096" >> /etc/sysctl.conf

echo "kernel.sem=25032000100128" >> /etc/sysctl.conf

echo "fs.file-max=65536" >> /etc/sysctl.conf

echo "net.core.rmem_default=262144" >> /etc/sysctl.conf

echo "net.core.wmem_default=262144" >> /etc/sysctl.conf

echo "net.core.rmem_max=262144" >> /etc/sysctl.conf

echo "net.core.wmem_max=262144" >> /etc/sysctl.conf

/sbin/sysctl -p

echo "please type in the ORACLE_SID:"

read sid

echo "export ORACLE_BASE=/oracle" >> /home/oracle/.base_profile

echo "export ORACLE_HOME=oracle/product/10.2.0/db_1" >> /home/oracle/.base_profile

echo "export ORACLE_SID=$sid" >> /home/oracle/.base_profile

echo "export NLS_LANG='simplified chinese'_china.ZHS16GBK" >> /home/oracle/.base_profile

echo "export PATH=$PATH:$ORACLE_HOME/bin" >> /home/oracle/.base_profile

echo "export LANG=zh_CN.GB18030" >> /home/oracle/.base_profile

echo "export EDITOR=vi" >> /home/oracle/.base_profile

path=$(find . -name "runInstaller")

echo $path

if [ -n $path ]

su - oracle -c ./`$path` -silent -responseFile recorded.rsp

./`/oracle/oraInventory/orainsRoot.sh`

./`/oracle/product/10.2.0/db_1/root.sh`

echo “Finish!”[@more@]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值