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基础知识学习的汇总 ...
随机推荐
- uva 1606 amphiphilic carbon molecules【把缩写写出来,有惊喜】(滑动窗口)——yhx
Shanghai Hypercomputers, the world's largest computer chip manufacturer, has invented a new classof ...
- Unity原厂讲师大解密
Asset Bundle工作流程及人物换装实例- 刘刚 Unity内部的资源有两种 Resources:有10年历史,尽量用资产包 Asset Bundle:昵称AB,现今Unity处理资源的中心 A ...
- css中position属性(absolute|relative|static|fixed)概述及应用
position属性的相关定义: static:无特殊定位,对象遵循正常文档流; relative:对象遵循正常文档流; absolute:对象脱离正常文档流 fixed:对象脱离正常文档流 我们先来 ...
- java 15- 5 List集合
需求 1:List集合存储字符串并遍历.(步骤跟Collection集合一样,只是最初创建集合对象中的集合类改变了,Collection变成List) List集合的特点: 有序(存储和取出的元素一致 ...
- sqlzoo.net刷题4
SELECT name, continent FROM world a WHERE population > ( FROM world b WHERE a.continent = b.conti ...
- 用mel编写自定义节点的属性编辑器界面
用mel编写自定义节点的属性编辑器界面比较麻烦,而且网上例子又少,下面给出一个范例,说明基本的格式 // 初始化节点时调用 global proc initControl(string $attrNa ...
- f2fs解析(七)node管理器中的 free_nid 结构体
除了node_info之外, node管理器中还有还有个重要的数据结构: struct free_nid { struct list_head list; /* for free node id li ...
- Java中是否可以继承String类,为什么
Java中,是否可以继承String类?为什么? 答案: 不可以,因为String类有final修饰符,而final修饰的类是不能被继承的,实现细节不允许改变. public final class ...
- C#报错:创建调试信息文件 ……obj\Debug\model.pdb: 拒绝访问
错误:创建调试信息文件“.......\obj\Debug\model.pdb”时发生错误 --“......\obj\Debug\model.pdb: 拒绝访问. 解决办法如下: 删除该项目下的 b ...
- 学习笔记——Maven实战(五)自动化Web应用集成测试
自动化集成测试的角色 本专栏的上一篇文章讲述了Maven与持续集成的一些关系及具体实践,我们都知道,自动化测试是持续集成必不可少的一部分,基本上,没有自动化测试的持续集成,都很难称之为真正的持续集成. ...