Oracle安装部署之RAC安装环境配置脚本
#!/bin/bash
#Usage:Log on as the superuser('root'),and then execute the command:#./1preusers.sh
groupadd -g 1000 oinstall --grid oracle
groupadd -g 1200 asmadmin --grid
groupadd -g 1201 asmdba --grid oracle
groupadd -g 1202 asmoper --grid(可选)
groupadd -g 1300 dba --oracle
groupadd -g 1301 oper --oracle(可选)
useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash -c "grid Infrastructure Owner" grid
echo "grid" | passwd --stdin grid
echo "export TMP=/tmp">> /home/grid/.bash_profile
echo 'export TMPDIR=$TMP'>>/home/grid/.bash_profile
echo "export ORACLE_SID=+ASM1">> /home/grid/.bash_profile
echo "export ORACLE_BASE=/u01/app/grid">> /home/grid/.bash_profile
echo "export ORACLE_HOME=/u01/app/11.2.0/grid">> /home/grid/.bash_profile
echo "export ORACLE_TERM=xterm">> /home/grid/.bash_profile
echo "export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'">> /home/grid/.bash_profile
echo 'export TNS_ADMIN=$ORACLE_HOME/network/admin' >> /home/grid/.bash_profile
echo 'export PATH=/usr/sbin:$PATH'>> /home/grid/.bash_profile
echo 'export PATH=$ORACLE_HOME/bin:$PATH'>> /home/grid/.bash_profile
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib'>> /home/grid/.bash_profile
echo 'export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib'>> /home/grid/.bash_profile
echo "export LANG=en_US">> /home/grid/.bash_profile
echo "export NLS_LANG=american_america.AL32UTF8">> /home/grid/.bash_profile
useradd -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle
echo "oracle" | passwd --stdin oracle
echo "export TMP=/tmp">> /home/oracle/.bash_profile
echo 'export TMPDIR=$TMP'>>/home/oracle/.bash_profile
echo "export ORACLE_HOSTNAME=node1">> /home/oracle/.bash_profile
echo "export ORACLE_SID=dbking1">> /home/oracle/.bash_profile
echo "export ORACLE_BASE=/u01/app/oracle">> /home/oracle/.bash_profile
echo 'export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1'>> /home/oracle/.bash_profile
echo "export ORACLE_UNQNAME=dbking">> /home/oracle/.bash_profile
echo 'export TNS_ADMIN=$ORACLE_HOME/network/admin' >> /home/oracle/.bash_profile
echo "export ORACLE_TERM=xterm">> /home/oracle/.bash_profile
echo 'export PATH=/usr/sbin:$PATH'>> /home/oracle/.bash_profile
echo 'export PATH=$ORACLE_HOME/bin:$PATH'>> /home/oracle/.bash_profile
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib'>> /home/oracle/.bash_profile
echo 'export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib'>> /home/oracle/.bash_profile
echo "export LANG=en_US">> /home/oracle/.bash_profile
echo "export NLS_LANG=american_america.AL32UTF8">> /home/oracle/.bash_profile
echo "export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'">> /home/oracle/.bash_profile
echo "The Groups and users has been created"
echo "The Environment for grid,oracle also has been set successfully"
mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/11.2.0
chmod -R 775 /u01
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "oracle soft nproc 2047">>/etc/security/limits.conf
echo "oracle hard nproc 16384">>/etc/security/limits.conf
echo "oracle soft nofile 1024">>/etc/security/limits.conf
echo "oracle hard nofile 65536">>/etc/security/limits.conf
echo "grid soft nproc 2047">>/etc/security/limits.conf
echo "grid hard nproc 16384">>/etc/security/limits.conf
echo "grid soft nofile 1024">>/etc/security/limits.conf
echo "grid hard nofile 65536">>/etc/security/limits.conf
cp /etc/pam.d/login /etc/pam.d/login.bak
echo "session required /lib/security/pam_limits.so">>/etc/pam.d/login
echo "session required pam_limits.so">>/etc/pam.d/login
cp /etc/profile /etc/profile.bak
echo 'if [ $USER = "oracle" ]||[ $USER = "grid" ]; then' >> /etc/profile
echo 'if [ $SHELL = "/bin/ksh" ]; then' >> /etc/profile
echo 'ulimit -p 16384' >> /etc/profile
echo 'ulimit -n 65536' >> /etc/profile
echo 'else' >> /etc/profile
echo 'ulimit -u 16384 -n 65536' >> /etc/profile
echo 'fi' >> /etc/profile
echo 'fi' >> /etc/profile
cp /etc/sysctl.conf /etc/sysctl.conf.bak
echo "fs.aio-max-nr = 1048576">> /etc/sysctl.conf
echo "fs.file-max = 6815744">> /etc/sysctl.conf
echo "kernel.shmall = 2097152">> /etc/sysctl.conf
echo "kernel.shmmax = 4294967295">> /etc/sysctl.conf
echo "kernel.shmmni = 4096">> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128">> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500">> /etc/sysctl.conf
echo "net.core.rmem_default = 262144">> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304">> /etc/sysctl.conf
echo "net.core.wmem_default = 262144">> /etc/sysctl.conf
echo "net.core.wmem_max = 1048586">> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 262144 262144 262144">> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem = 4194304 4194304 4194304">> /etc/sysctl.conf
sysctl -p
Oracle安装部署之RAC安装环境配置脚本的更多相关文章
- Oracle安装部署,版本升级,应用补丁快速参考
一.Oracle安装部署 1.1 单机环境 1.2 Oracle RAC环境 1.3 Oracle DataGuard环境 1.4 主机双机 1.5 客户端部署 二.Oracle版本升级 2.1 单机 ...
- windows系统dokuwiki安装部署设置 xampp环境配置
简单记录一次安装dokuwiki的过程 dokuwiki下载 dokuwiki下载地址 https://download.dokuwiki.org/ 下载前有一些可选项目,版本.语言.插件,可以按照需 ...
- Oracle安装部署之Win7下oracle11g数据库的安装及配置
1.下载安装包 到oracle官网downloads下下载(第一次下载需要注册账号). Win7 64位下载64位oracle11g安装包 Win7 32位下载32位oracle11g(Oracle_ ...
- Oracle安装部署之一键安装oracle数据库及其脚本
准备工作:通过ftp工具上传oracle安装软件到linux系统/mnt目录下,并通过unzip命令解压软件.--------------------------------------------- ...
- 1. Oracle安装部署文档
一. 部署环境步骤 1.1 软件环境 操作系统:CentOS release 6.5oracle安装包:linux.x64_11gR2_database_1of1.zip:linux.x64_11gR ...
- 002.Oracle安装部署-ASM
一 环境准备 图形界面:略 安装包: linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 二 安装ASM-Oracl ...
- Oracle安装部署之RedHat安装Oracle11g_R2
硬件配置 内存 :≥1G 硬盘空间:≥10G 上传oracle11g安装包: putty上用wcw用户登录,通过ftp服务上传oracle安装文件到/home/wcw目录下解压 #unzip linu ...
- 001-使用idea开发环境安装部署,npm工具栏,脚本运行
一.概述 参看官方文档:https://ant.design/docs/spec/introduce-cn 其中包含了设计价值观.设计原则.视觉.模式.可视化.动态等. 其中Ant Design 的 ...
- 001.Oracle安装部署-本地文件系统
一 环境准备 安装包:linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip 二 安装Oracle准备 2.1 用户名/ ...
随机推荐
- smrt analysis 软件安装
pacbio 公司把三代测序常用软件整合起来,做成了一个在线的分析软件,类似于galaxy; 安装过程如下,参考官网给的指导手册 http://www.pacb.com/wp-content/uplo ...
- 你是否有遇到过某个实体类字段(属性)过多的情况,不想每次点的话戳进来(C# 反射)
贴上一段代码: bureaucraticEntities apply = new bureaucraticEntities(); Type tapp= app.GetType(); Type ttmp ...
- path与classpath的差别
1.path的作用 path是系统用来指定可运行文件的完整路径.即使不在path中设置JDK的路径也可运行JAVA文件,但必须把完整的路径写出来,如C:\Program Files\Java\ ...
- sp_configure命令开启组件Agent XPs,数据库计划(Maintenance Plan)
新建“计划(Maintenance Plan)”时,记得执行计划需把SQL的“代理服务(SQL Server Agent)”也开启 出现对话框:“SQL Server 阻止了对组件 'Agent XP ...
- jQuery on()方法绑定动态元素的点击事件无响应的解决办法
$('#check_all').on('click' , function(){ alert(1); }); $("#yujinlist").append(html); count ...
- CSS样式中” 大于号”
CSS样式中” 大于号” 在一段CSS代码中见到一个大于号(>),代码如下: BODY#css-zen-garden > DIV#extraDiv2 { BACKGROUND-IMAGE: ...
- stylus入门使用方法
https://segmentfault.com/a/1190000002712872
- oracle函数学习_根据用户id获取用户角色
create or replace function FN_GET_ROLES(v_user_id varchar2) return varchar2 istype zy_emp_cursor is ...
- 批处理bat文件dos命令复制文件
::将“C:\Users\ZZ\Desktop\快捷处理\我我我哦我”路径下的文件复制到“C:\Temp\我我我哦我”路径下::/S表示“复制目录和子目录,除了空的.”::/E表示“复制目录和子目录, ...
- m2014-architecture-webserver->百万记录级mysql数据库及Discuz!论坛优化
作者:shunz,出处:http://shunz.net/2008/06/mysql_discuz_.html 最近,帮一个朋友优化一个拥有20万主题,100万帖子,3万多会员,平均在线人数2000人 ...