oracle 的安装脚本
==[root@oracle ~]# cat 1.preusers.sh ==
#!/bin/bash
#Purpose:Create 3 groups named 'oinstall','dba','oper', plus 1 users named 'oracle'.
#Also setting the Environment
#variable for oracle user.
#variable for grid user.
#Usage:Log on as the superuser('root'),and then execute the command:#./1preusers.sh
#Author:bao
echo "Now create 3 groups named 'oinstall','dba','oper'"
echo "Plus 1 users named 'oracle',Also setting the Environment"
groupadd -g 1000 oinstall
groupadd -g 1300 dba
groupadd -g 1301 oper
useradd -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
echo "yizhenuplooking" | passwd --stdin oracle
cat >>/home/oracle/.bash_profile <<EOF
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/11201/db1
export ORACLE_SID=esbtest
export ORACLE_OWNER=oracle
export PATH=\$PATH:\$ORACLE_HOME/bin:\$HOME/bin
export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/Apache/Apache/bin:\$PATH
LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
CLASSPATH=\$CLASSPATH:\$ORACLE_HOME/network/jlib
export CLASSPATH
export ORA_NLS33=\$ORACLE_HOME/nls/admin/data
export LANG=en_US
EOF
source /home/oracle/.bash_profile
echo "192.168.220.98 oracle" >> /etc/hosts
echo "The Groups and users has been created"
echo "The Environment for oracle also has been set successfully"
==[root@oracle ~]# cat 2predir.sh ==
#!/bin/bash
#Purpose:Create the necessary directory for oracle users and change the authention to oracle users.
#Usage:Log on as the superuser('root'),and then execute the command:#./2predir.sh
#Author:bao
echo "Now create the necessary directory for oracle users and change the authention to oracle users..."
mkdir -p /opt/oracle
chown -R oracle:oinstall /opt
chmod -R 775 /opt
mkdir -p /opt/oracle/oradata
mkdir -p /opt/oracle/product/11201/db1
mkdir /opt/oraInventory/
chown oracle:oinstall /opt/oracle/ -R
chown oracle:oinstall /opt/oraInventory/ -R
echo "The necessary directory for oracle users and change the authention to oracle users has been finished"
==[root@oracle ~]# cat 3.prelimits.sh ==
#!/bin/bash
#Purpose:Change the /etc/security/limits.conf.
#Usage:Log on as the superuser('root'),and then execute the command:#./3prelimits.sh
echo "Now modify the /etc/security/limits.conf,but backup it named /etc/security/limits.conf.bak before"
cp /etc/security/limits.conf /etc/security/limits.conf.bak
cat >>/etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
==[root@oracle ~]# cat 4.presysctl.sh ==
#!/bin/bash
#Purpose:Modify the /etc/sysctl.conf.
#Usage:Log on as the superuser('root'),and then execute the command:
#./4presysctl.sh
echo "Now modify the /etc/sysctl.conf,but with a backup named /etc/sysctl.bak"
cp /etc/sysctl.conf /etc/sysctl.conf.bak
cat >>/etc/sysctl.conf <<EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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
==[root@oracle ~]# cat 5preyum.sh ==
#!/bin/bash
yum -y install binutils compat-db compat-libstdc++-296 compat-libstdc++-33 control-center gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make pdksh sysstat xscreensaver setarch libaio libaio-devel libXp elfutils-libelf-devel
sleep 5
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm
rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm
安装的时候参考:
http://www.cnblogs.com/smail-bao/p/oracle.html
oracle 的安装脚本的更多相关文章
- oracle rac 安装脚本
1. 配置/etc/hosts 网络 192.168.1.111 rac1 rac1.oracle.com192.168.1.182 rac1-vip 192.168.1.222 rac2 rac2. ...
- Oracle自动化安装脚本-part01-亲试ok
#!/bin/bash node_num=$1 base_config=./network.conf 网络配置文件 software_config=./software.conf 软件包 ...
- Oracle安装部署之linux OS install oracle database安装脚本
#!/bin/bash#Purpose:Create and config oracle install.#Usage:Log on as the superuser('root') #1.creat ...
- Oracle自动化安装脚本-part03-亲试ok
此为 软件包配置文件 software.conf [CentOS6] binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x8 ...
- Oracle自动化安装脚本-part02-亲试ok
此为网络配置文件 network.conf [PUBLIC-IP] IP-LIST:192.168.7.198,192.168.8.221 HOSTNAME-LIST:mysql-198,RAC2 ...
- Oracle 12c 静默安装(脚本自动化)
oracle 12C 自动化静默安装脚本 项目地址: github: https://github.com/spdir/oracle-single-install 下载安装脚本 wget https: ...
- Oracle 11.2 静默安装脚本
Oracle 11.2 静默安装脚本 cat db_init.sh.20190401 #!/bin/bash####安装Oracle所需依赖包function install_yum(){ yum ...
- Oracle 11g 静默安装脚本
#!/bin/bash####安装Oracle所需依赖包function install_yum(){ yum -y install $1} i="perl-Data-Dumper lvm ...
- 【Oracle 集群】Linux下Oracle RAC集群搭建之Oracle DataBase安装(八)
Oracle 11G RAC数据库安装(八) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总 ...
随机推荐
- fiddler对手机进行抓包
1.安装fiddler web debugger 2.Tools -->telerik fiddler options-->connections,勾选allow remote compu ...
- 单调队列应用--BZOJ 3831 Little Bird
3831: [Poi2014]Little Bird Time Limit: 20 Sec Memory Limit: 128 MB Description In the Byteotian Lin ...
- CSS 属性 - position讲解
postion 属性定义了一个元素在页面布局中的位置以及对周围元素的影响.该属性共有5个值: 1. position: static2. position: inherit3. position: r ...
- Javascript中的对象和原型(3)
在Javascript中的对象和原型(二)中我们提到,用构造函数创建的对象里面,每个对象之间都是独立的,这样就会降低系统资源的利用率,解决这样问题,我们就要用到下面提到的原型对象. 一 原型对象 原型 ...
- center
center标签对其包围的文本进行水平居中处理
- 【C#】窗体动画效果
通过调用API可以实现C#窗体的动画效果,主要调用user32.dll的行数AnimateWindow 1.函数申明 [System.Runtime.InteropServices.DllImport ...
- [应用层]mail邮件协议
转:http://***/chapter-14/ 以前老记不住这smtp和pop3谁收谁发. 简单邮件传输协议(SMTP),用来发送或中转发出的电子邮件,占用tcp 25端口. 第三版邮局协议(POP ...
- C语言 复杂队列(链表队列)
//复杂的队列二 --链表队列 #include<stdio.h> #include<stdlib.h> #define datatype int struct queueli ...
- 将Axure用于需求分析工具
http://www.cnblogs.com/hnlong1/p/4113517.html?utm_source=tuicool 今年以来开始接触需求分析工作,uml是必用的建模语言. 一开始是使用最 ...
- JS案例之8——从一个数组中随机取数
近期项目中遇到一个需求,从一个列表中随机展示列表的部分内容,需求不大,JS也非常容易实现.主要是运用到了Math对象的random方法,和Array的splice方法. 思路是先新建一个数组,存放所有 ...