==[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 的安装脚本的更多相关文章

  1. oracle rac 安装脚本

    1. 配置/etc/hosts 网络 192.168.1.111 rac1 rac1.oracle.com192.168.1.182 rac1-vip 192.168.1.222 rac2 rac2. ...

  2. Oracle自动化安装脚本-part01-亲试ok

      #!/bin/bash   node_num=$1 base_config=./network.conf   网络配置文件 software_config=./software.conf  软件包 ...

  3. Oracle安装部署之linux OS install oracle database安装脚本

    #!/bin/bash#Purpose:Create and config oracle install.#Usage:Log on as the superuser('root') #1.creat ...

  4. Oracle自动化安装脚本-part03-亲试ok

     此为 软件包配置文件 software.conf [CentOS6] binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x8 ...

  5. Oracle自动化安装脚本-part02-亲试ok

     此为网络配置文件  network.conf [PUBLIC-IP] IP-LIST:192.168.7.198,192.168.8.221 HOSTNAME-LIST:mysql-198,RAC2 ...

  6. Oracle 12c 静默安装(脚本自动化)

    oracle 12C 自动化静默安装脚本 项目地址: github: https://github.com/spdir/oracle-single-install 下载安装脚本 wget https: ...

  7. Oracle 11.2 静默安装脚本

    Oracle 11.2 静默安装脚本 cat db_init.sh.20190401 #!/bin/bash####安装Oracle所需依赖包function install_yum(){  yum ...

  8. Oracle 11g 静默安装脚本

    #!/bin/bash####安装Oracle所需依赖包function install_yum(){  yum -y install $1} i="perl-Data-Dumper lvm ...

  9. 【Oracle 集群】Linux下Oracle RAC集群搭建之Oracle DataBase安装(八)

    Oracle 11G RAC数据库安装(八) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇总 ...

随机推荐

  1. SDRAM总结

    使用的流程 W9825G6JH winbond sdram 4M words X 4banks X 16bits=. Accesses to the SDRAM are burst oriented. ...

  2. 自定义listview的步骤

    1.定义一个实体类: public class Fruit { private String name; private int imageId; public Fruit(String name, ...

  3. Java的IO操作---File类

    目标 1)掌握File类作用 2)可以使用file类中方法对文件进行读写操作. File类 唯一与文件有关的类.使用file类可进行创建或删除操作,要想使用File类,首先观察File类的构造方法. ...

  4. sql语句原则

    整理尘封的文档,sql语句方面的几条原则再次回顾一下.更详细版本 1. 尽量使用临时表扫描替代全表扫描: 2. 抛弃in和not in语句,使用exists和not exists替代:IN和EXIST ...

  5. .net程序集强命名(签名)

    要想得到强签名的dll有两种情况: 1.给项目添加强命名 在你的项目右键->属性->签名,勾选“为程序集签名”,新建 或 浏览已经新建过的.pfx文件,然后重新build项目,生成的dll ...

  6. SpringMVC中的@PathVariable

    @PathVariable是用来动态获得url中的参数的,代码示例如下: 可以在代码中获得lev_1.lev_2和target参数的值看一下 // 支持跳转到WEB-INF/目录下二层目录 @Requ ...

  7. WorldWind源码剖析系列:BMNG类构造函数深入分析

    BMNG构造函数深入分析 一.主要类图 二.主要功能: 1)        BMNG类 BMNG类将包含以“Blue Marble”为主题的所有可渲染影像的根节点添加到当前星球的可渲染对象列表中,包括 ...

  8. 联想Y50p预装win8系统改为win7

    &1 修改OS Optimized Defaults 开机,按[F2]进入BIOS设置,按右方向键选择到EXIT上面,按下方向键选择OS Optimized Defaults,回车,将Win8 ...

  9. linux查看系统信息命令

    本文转载自江一<linux查看系统信息命令> # uname -a # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue # 查看操作系统版本 # cat /p ...

  10. dxut.h(29): fatal error C1083: Cannot open include file: 'dxsdkver.h': No such file or directory

    从网上download一个三维演示模型的软件编译发现报找不到dxsdkver.h文件,网上查阅这是MS的DirectX sdk中的库文件,于是先download DirectX SDK 安装之后,配置 ...