centos 7 安装 Oracle 12c

#!/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
centos 7 安装 Oracle 12c的更多相关文章
- CentOS 7安装Oracle 12c图文详解
环境: CentOS7@VMware12,分配资源:CPU:2颗,内存:4GB,硬盘空间:30GB Oracle 12C企业版64位 下载地址:http://www.oracle.com/techne ...
- CentOS 7安装Oracle 12c
1.root身份安装依赖包: yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 ...
- 安装oracle 12c RAC遇到的一些问题
(1) 安装grid软件,停止在38%很长时间不动,日志显示正常 解决方法: 由于是虚拟机安装,设置的内存为600M,关闭虚拟机,把内存调成1GB,问题解决~在38%Linking RMAN Ut ...
- 在Fedora20上安装Oracle 12c
本文将引导大家在Fedora20的环境下成功安装Oracle12c. 安装前的准备 编辑/etc/hosts文件,添加本机名称 编辑/etc/selinux/config文件 编辑/etc/redha ...
- Windows 下安装 Oracle 12c 教程
原文 Windows 下安装 Oracle 12c 教程 申明:本文原作者:Jmq 本文给大家带来的是 Oracle 12C 的安装教程. 1.准备 1.1 下载 Oracle 12c 安装程序 ...
- CentOS 7 安装 Oracle 11.2.0.4
一.安装环境 CentOS Linux release 7.2.1511 (Core) Oracle Database 11g Release 2 (11.2.0.4) 二.安装前准备 2.1 修改主 ...
- CentOS 7安装Oracle 11gR2以及设置自启动(2)
6.创建表空间和用户授权 (1).连接数据库 $ sqlplus / as sysdba (2).创建数据库表空间 语法: create tablespace 表空间名 datafile ‘物理地址( ...
- CentOS 7安装Oracle 11gR2以及设置自启动(1)
一.环境准备 1.正确无误的CentOS 7系统环境 虚拟机要求: 内存至少2G 处理器至少2个 根分区要大于20G(安装oracle很占空间,空闲空间要足够) 2.正确的JDK环境 CentOS 7 ...
- (转)oracle linux 7 安装oracle 12c
原文:https://blog.csdn.net/jiuyun1986/article/details/53589446 https://blog.csdn.net/admin_root1/artic ...
随机推荐
- 2019.11.18【每天学点SAP小知识】Day4 - ABAP 7.40新语法 FOR
"今天学习一下FOR的语法,常用的2个语法. FOR wa|<fs> IN itab [INDEX INTO idx] [cond] "FOR i = … [THEN ...
- Java多线程(1):3种常用的实现多线程类的方法
(1) 继承java.lang.Thread类(Thread也实现了Runnable接口) 继承Thread类的方法是比较常用的一种,如果说你只是想起一条线程.没有什么其它特殊的要求,那么可以使用Th ...
- Hibernate不同数据库的连接及SQL方言
本文讲述Hibernate不同数据库的连接及SQL方言.Hibernate不同数据库的连接可能会出现错误,有一种情况是由于Hibernate SQL方言设置不正确而导致的. 以下代码展示Hiberna ...
- cpu切换线程上下文会耗费多少时间
cpu切换线程上下文会耗费多少时间,有人在linux下面使用不同的cpu测试过,需要1000ns以上的时间 https://blog.tsunanet.net/2010/11/how-long-doe ...
- Linux 学习路径
Linux learning path Mind Map graph LR A[Linux学习路径]-->b[计算机概论与硬件相关知识] A -->c[Linux 初级] A --> ...
- 关联SecureCRT
建议安装SecureCRT 8.1及其以上版本,打开http://EVE-NG地址/files/windows.zip下载eve-ng的Windows关联文件,然后使用文本编辑工具编辑win7_64b ...
- 【Linux开发】linux设备驱动归纳总结(三):1.字符型设备之设备申请
linux设备驱动归纳总结(三):1.字符型设备之设备申请 操作系统:Ubunru 10.04 实验平台:S3C2440 + linux2.6.29内核 注:在今后驱动程序的学习中经常需要查看内核源代 ...
- 论文阅读 | Generating Fluent Adversarial Examples for Natural Languages
Generating Fluent Adversarial Examples for Natural Languages ACL 2019 为自然语言生成流畅的对抗样本 摘要 有效地构建自然语言处 ...
- 一些css单位
https://blog.csdn.net/qq_40001322/article/details/80867289 1.em 在做手机端的时候经常会用到的做字体的尺寸单位 说白了 em就相当于“倍” ...
- OI模板のpoke流[大型考试复习必备/kl]
数论 快速乘: ll qmul(ll x,ll y,ll mod) { ll ans=0; while(y) { if(y&1) (ans+=x)%=mod; y>>=1; (x+ ...