中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

寫的一個oracle安裝前的準備的腳本,大家可以拿去修改修改使用

發布時間:2020-07-20 12:48:05 來源:網絡 閱讀:264 作者:IronKui 欄目:關系型數據庫

#!/bin/bash

# echo "拷貝文件:"
# read -p "please input the server you share your os installation media and oracle software:" server
# mkdir /installyationMedia
# scp root@${server}:/iso/* /installationMedia
# if [ -e /installationMedia/*.iso ]{
#  echo "文件拷貝成功。"
# }else{
#  echo "操作系統文件拷貝不成功"
# }

echo "**********************Mount the iso******************************"
mount -o loop /tmp/rhel-server-6.0-x86_64-dvd.iso /media
cat >/etc/yum.repos.d/cd.repo<<EOF
[cd]
name=cd.repo
baseurl=file:///media/Server
enabled=1
gpgcheck=0
EOF
yum clean
yum update
if [[ $? -eq 0 ]]; then
 echo "Yum repo configure success!"
 else
 echo "Yum repo configure failure!"
fi

echo "**********************Verify the dependency packages**************************"
for i in `cat package.txt`; do
 rpm -qa | grep ${i}
  if [[ $? -eq 0 ]]; then
   echo "${i} have been installed !" | tee -a log.txt
  else
   yum -y install ${i}*
   if [[ $? -eq 0 ]]; then
    echo "${i} Install Success;" | tee -a log.txt
   else
    echo "${i} install failure" | tee -a log.txt
   fi
  fi
done

echo "**********************unzip the packages*****************************"
if [[ -d /installationMedias/database ]]; then
 echo "Database Installation File have been created!"
else
 for i in `ls -l /installationMedias/linux*.zip | awk '{print $9}'`; do
  unzip ${i} -d /installationMedias
 done
fi


echo "************************Environment Prepare*******************************"
if [[ -d /u01/app ]]; then
 echo "/u01/app Directory Have Been Created!"
else
 mkdir -p /u01/app
fi

if [[ -z `cat /etc/group | grep dba` ]]; then
 groupadd dba
else
 echo "dba group have been created" | tee log.txt
fi
if [[ -z `cat /etc/group | grep oinstall` ]]; then
 groupadd oinstall
else
 echo "dba group have been created" | tee log.txt
fi
if [[ -z `id oracle` ]]; then
 useradd -g oinstall -G dba oracle
else
 echo "user oracle have been created" | tee log.txt
fi
chown -R oracle:oinstall /u01
chmod -R 755 /u01

echo "**************************kernel parameter**********************************"
cat >>/etc/sysctl.conf<<EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
EOF
/sbin/sysctl -p
echo "change User limts"
cat >>/etc/security/limits.conf<<EOF
oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536
EOF
cat >>/etc/pam.d/login<<EOF
session    required     pam_limits.so
EOF
cat >>/etc/profile<<EOF
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
EOF
cat >>/home/oracle/.bash_profile<<EOF
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
EOF

su - oracle<<EOF
source ~/.bash_profile
/installationMedias/database/runInstaller
EOF

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

娱乐| 呼玛县| 静安区| 荔浦县| 合江县| 河间市| 鄢陵县| 鹿邑县| 承德市| 贵德县| 舞钢市| 五河县| 曲靖市| 达拉特旗| 股票| 茌平县| 尼木县| 通州市| 灵川县| 呼图壁县| 紫阳县| 余姚市| 青阳县| 云浮市| 鄂托克前旗| 枣强县| 武安市| 鄂托克旗| 固安县| 丰原市| 武威市| 玉林市| 宁津县| 温宿县| 邛崃市| 海盐县| 高尔夫| 卢氏县| 正蓝旗| 信宜市| 巴里|