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

#1.create groups and users.
groupadd dba -g 111
groupadd oinstall -g 110
useradd oracle -u 110 -g 110 -G 111
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=localhost.localdomain">> /home/oracle/.bash_profile
echo "export ORACLE_SID=orcl">> /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 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"

#2.create directory for oracle.
mkdir -p /u01
mkdir -p /u01/app
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /u01/app
chown -R oracle:oinstall /u01/app/oracle

echo "The directory has beeb created."

#3.config limits.
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 "Modifing the /etc/security/limits.conf has been succeed."

#4.config login.
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
echo "Modifing the /etc/pam.d/login has been succeed."

#5.config profile.
cp /etc/profile /etc/profile.bak
echo 'if [ $USER = "oracle" ]; 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
echo "Modifing the /etc/profile has been succeed."

#6.config sysctl.ctl
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 = 1285103616" >> /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
echo "Modifing the /etc/sysctl.conf has been succeed."
sysctl -p

oracle 11g install linux的更多相关文章

  1. Oracle安装部署之 oracle 11g install linux

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

  2. deinstall oracle 11g on linux

    deinstall oracle 11g on linux   From 11gR2, oracle provide us an deinstall tool. With that now we ca ...

  3. Linux上Oracle 11g安装步骤图解

    Oracle 11g下载地址: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 选 ...

  4. centos安装oracle 11g 完全图解

    摘要: 说明: Linux服务器操作系统:CentOS 5.8 32位(注意:系统安装时请单独分区/data用来安装oracle数据库) Linux服务器IP地址:192.168.21.150 Ora ...

  5. Zero Downtime Upgrade of Oracle 10g to Oracle 11g Using GoldenGate — 1

    Source Database DB Name:        zwc Schemas:         HR,OE,PM Version:          10.2.0.4 RAC:       ...

  6. oracle 11g goldengate搭建(一)

    初学ogg,基本了解ogg原理及架构之后,趁热打铁,搭建一个简单的学习环境,以实现目标:将sourcedb数据库的2个表:sourceuser.test01和sourceuser.dept通过ogg分 ...

  7. Oracle 11g RAC运维总结

    转至:https://blog.csdn.net/qq_41944882/article/details/103560879 1 术语解释1.1 高可用(HA)什么是高可用?顾名思义我们能轻松地理解是 ...

  8. HOWTO install Oracle 11g on Ubuntu Linux 12.04 (Precise Pangolin) 64bits

    安装了Ubuntu 12.04 64bit, 想在上面安装Oracle 11gr2,网上找了好多文档都没成功,最后完全参考了MordicusEtCubitus的文章. 成功安装的关键点:install ...

  9. ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1

    博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...

随机推荐

  1. 安装swoole 扩展,在phpinfo中显示,但是php -m 中不显示的问题

    步骤如下: 1 首先找到php.ini的目录:linux命令:find / -name php.ini 我的路径如下:

  2. mysql通过data文件恢复数据库的方式

    1.首先定位mysql的my.ini配置文件,查找datadir的位置 #Path to the database rootdatadir="C:/ProgramData/MySQL/MyS ...

  3. Sharepoint创建List

    (一)在一个环境下创建site 首先在sharepoint 2013 Central Administration中run administration --Application Managemen ...

  4. 用ajax获取后台数据,返回json数据,怎么在前台使用?

    用ajax获取后台数据,返回json数据,怎么在前台使用呢?后台 C# code   ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 if (dataType == &qu ...

  5. c# datagridview 中DataSource的使用总结

    由于当前项目的窗体更新使用的是订阅事件的方式.其中有个datagridview 动态显示统计数据的列表框.本来想用textbox显示,但不规则,看起来也不美观,改由dgv显示. 我没打算用改dgv表的 ...

  6. JiaThis分享插件的使用

    jia This的下载地址:http://www.jiathis.com/ 只需要在页面上加上以下代码即可 <span class="jiathis_style"> & ...

  7. XML文件的读写

    using System; using System.Collections.Generic; using System.Xml; namespace COMMON { public class Xm ...

  8. MySqlHelper

    package utils; import java.io.IOException; import java.sql.CallableStatement; import java.sql.Connec ...

  9. Linux三剑客之grep 与 egrep

    grep: Linux上文本处理三剑客 grep:文本过滤(模式:pattern)工具; *(grep, egrep, fgrep) sed:stream editor,文本编辑工具: awk:Lin ...

  10. java中double变量保留小数问题

    (转载自玄影池扁舟) 做java项目的时候可能经常会遇到double类型变量保留小数的问题,下面便把我的经验做个简短的总结: java中double类型变量保留小数问题大体分两种情况: (一):小数点 ...