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基础知识学习的汇总 ...
随机推荐
- Doctype文档类型、作用及触发方式
Doctype文档类型 1) 该标签可声明三种 DTD 类型,分别表示严格版本.过渡版本以及基于框架的 HTML 文档. 2) HTML 4.01 规定了三种文档类型:Strict.Transit ...
- NOIP2008 普及组T4 立体图 解题报告-S.B.S.(施工未完成)
题目描述 小渊是个聪明的孩子,他经常会给周围的小朋友们将写自己认为有趣的内容.最近,他准备给小朋友们讲解立体图,请你帮他画出立体图. 小渊有一块面积为m*n的矩形区域,上面有m*n个边长为1的格子,每 ...
- Codeforces 369E Valera and Queries --树状数组+离线操作
题意:给一些线段,然后给m个查询,每次查询都给出一些点,问有多少条线段包含这个点集中的一个或多个点 解法:直接离线以点为基准和以线段为基准都不好处理,“正难则反”,我们试着求有多少线段是不包含某个查询 ...
- java 12-5 StringBuffer的几个案例
1. 把数组拼接成一个字符串 public class StringBufferTest2 { public static void main(String[] args) { //定义一个数组 in ...
- [转] Centos 6.4 python 2.6 升级到 2.7
http://blog.csdn.net/jcjc918/article/details/11022345
- vs2012无法启动已配置的开发Web服务器
] 有些教程说要开,我就没懂了
- struts2验证框架
如何做一个工号 用户 密码 验证登录页面? 答:1,先画一个login.jsp ,如何画呢?先引入Struts2标签库,利用Struts2标签库画登录页面:如下: 2,先进入useractiion,在 ...
- python算法:rangeBitwiseAnd(连续整数的与)
def rangeBitwiseAnd(self, m, n): i = 0 while m != n: m >>= 1 n >>= 1 i += 1 return n < ...
- Linux 信号捕捉
pause函数 pause函数挂起调用它的进程,直到有任何消息到达. 调用进程必须有能力处理送达的信号,否则信号的默认部署就会发生. int pause(void); 只有进程捕获到一个信号的时候pa ...
- ntp时间同步服务器配置
ntp同步的两种方式:1.使用ntpdate命令直接同步 2.使用NTPD服务平滑同步直接同步方式的缺陷:会导致已经做的定时任务再做一遍.平滑同步每次同步时间的偏移量不会太陡,根据偏移量,均方差等值每 ...