#!/bin/bash
#!/usr/bin/expect -f
#/etc/sysctl.conf --bash-srcipts--
echo 'net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 =
net.ipv6.conf.lo.disable_ipv6 =
vm.swappiness =
net.ipv4.neigh.default.gc_stale_time =
net.ipv4.conf.all.rp_filter =
net.ipv4.conf.default.rp_filter =
net.ipv4.conf.default.arp_announce =
net.ipv4.conf.lo.arp_announce =
net.ipv4.conf.all.arp_announce =
net.ipv4.tcp_max_tw_buckets =
net.ipv4.tcp_syncookies =
net.ipv4.tcp_max_syn_backlog =
net.ipv4.tcp_synack_retries =
fs.file-max =
kernel.sem =
kernel.shmmni =
kernel.shmall =
kernel.shmmax =
kernel.panic_on_oops =
net.core.rmem_default =
net.core.rmem_max =
net.core.wmem_default =
net.core.wmem_max =
net.ipv4.conf.all.rp_filter =
net.ipv4.conf.default.rp_filter =
fs.aio-max-nr =
net.ipv4.ip_local_port_range = ' >> /etc/sysctl.conf
sysctl -p
echo $?
###################################################################### ######################################################################
#/etc/security/limits.conf --bash-srcipts--
echo 'oracle soft nofile 1024
oracle hard nofile
oracle soft nproc
oracle hard nproc
oracle soft stack
oracle hard stack
oracle hard memlock
oracle soft memlock ' >> /etc/security/limits.conf
echo $?
###################################################################### ######################################################################
yum install -y binutils compat-libcap1 compat-libstdc++- compat-libstdc++-.i686 glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libX11 libX11.i686 libXau libXau.i686 libXi libXi.i686 libXtst libXtst.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libxcb libxcb.i686 make nfs-utils net-tools smartmontools sysstat unixODBC unixODBC-devel ######################################################################
groupadd -g oinstall
groupadd -g dba
groupadd -g oper
useradd -u -g oinstall -G dba,oper oraclegroupadd -g oinstall
groupadd -g dba
groupadd -g oper
useradd -u -g oinstall -G dba,oper oracle
###################################################################### ######################################################################
#passwd oracle
echo "oracle" | passwd --stdin oracle //设置oracle用户密码...
###################################################################### #/etc/selinux/config --bash-srcipts--
#<---selinux-disabled shell script--->
sed -i '7,12s/^/#&/g;7,12s/##/#/g;13cSELINUX=disabled' /etc/selinux/config
setenforce
selinux_config=`getenforce`
disabled=`echo Disabled`
if [ $disabled == $selinux_config ]
then
echo "your selinux is `getenforce`."
else
echo "your selinux is `getenforce`,please running command'reboot' or 'init 6'and 'cat /etc/selinux/config' configuration bash file!"
fi
getenforce
###################################################################### ######################################################################
(systemctl stop firewalld;systemctl disable firewalld)
mkdir -p /usr/local/products/oracle12c
chown -R oracle:oinstall /usr/local
chmod -R /usr/local/
###################################################################### ######################################################################
spawn su oracle
expect ":"
send "oracle\r"
interact
###################################################################### #.bash_profile --bash-srcipts--
echo 'export TMP=/tmp
export TMPDIR=$TMP export ORACLE_HOSTNAME=solang
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/usr/local/products
export ORACLE_HOME=$ORACLE_BASE/oracle12c
export ORACLE_SID=cdb1 export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib' >> .bash_profile
###################################################################### ######################################################################
cd $(dirname "`find / -name 'linuxx64_12201_database.zip'`") //查找linuxx64_12201_database.zip并进入该文件所在目录 #//查找文件/文件夹并进入目录命令
#//[root@localhost /]# cd $(dirname "`find / -name 'ifcfg-ens33'`") //查找ifcfg-ens33文件并进入该文件所在目录
#//[root@localhost network-scripts]#
#//[root@localhost /]# mkdir -p /etc/sysconfig/network-scripts/kings-dev
#//[root@localhost ~]# cd $(dirname "`find / -name 'kings-dev'`") //查找kings-dev文件夹并进入该文件夹上层目录
#//[root@localhost network-scripts]#
#//[root@localhost ~]# cd $(find / -name 'kings-dev') ////查找kings-dev文件夹并进入该文件夹目录
#//[root@localhost kings-dev]#
#//[root@localhost src]# du -alh
#//1.9M ./redis-5.0.5.tar.gz
#//1.9M .
#//[root@localhost src]# cd $(dirname "`tar -zxvf redis-5.0.5.tar.gz`") //解压redis-5.0.5.tar.gz进入解压目录
#//[root@localhost redis-5.0.5]# ###################################################################### ######################################################################
unzip linuxx64_12201_database.zip

最新文章

  1. 教你分分钟开发一个属于自己的python模块(一)——能够直接在浏览器打印的方法
  2. Web服务器基础学习
  3. 1526. Martian Plates
  4. JSP网站开发基础总结《八》
  5. 初识Flask
  6. 使用ASP.NET MVC、Rabbit WeixinSDK和Azure快速开发部署微信后台
  7. js-原型以及继承小案例
  8. #import 跟 #include、@class 之间的区别
  9. php url地址重写
  10. Nodejs电影建站开发实例(上)
  11. 关于GSMMAP分支cell_log扫描不正常问题的解决办法
  12. nginx之location配置
  13. Hibernate 性能优化之一级缓存
  14. OpenRisc-47-or1200的WB模块分析
  15. DataTables warning 错误警告
  16. HttpClient 网络优化
  17. javascript基础(五)函数
  18. Sphinx学习笔记2
  19. mysql 手册关于修改列字符编码的一个bug
  20. 静态链表的C实现(基于数据结构 严蔚敏)

热门文章

  1. 开源的图片查看库之PhotoView
  2. Popover 弹出框
  3. Android studio2 中的 SDK Manager的使用-------Android SDK 的安装与更新(Install missing platform(s) and sync project 编译错误解决)
  4. ubuntu源与常用python配置pip源(win)、pip常用命令
  5. MySQL 对 IP 字段的排序问题
  6. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  7. C基础知识(5):指针--传递指针给函数&amp;返回指针的函数
  8. ubuntu安装软件失败,出现404错误,更新软件源
  9. spring boot密码管理
  10. 2019icpc南昌邀请赛F(线段树)