#!/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 = 1054472192" >> /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
linux OS install oracle database的更多相关文章
-
Oracle安装部署之linux OS install oracle database安装脚本
#!/bin/bash#Purpose:Create and config oracle install.#Usage:Log on as the superuser('root') #1.creat ...
-
Linux 平台安装Oracle Database 12c
1)下载Oracle Database 12cRelease 1安装介质 官方的下载地址: 1:http://www.oracle.com/technetwork/database/enterpris ...
-
Install Oracle Database client in silent mode
下面通过在工作中的使用,总结出不同版本Oracle client的静默(silent)安装方法. Oracle Database client 12.2.0.1 1. reponse file con ...
-
Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7)
Install Oracle 11G Release 2 (11.2) on Oracle Linux 7 (OEL7) This article presents how to install Or ...
-
Quick and Easy Installation of Oracle Database 12c on Oracle Linux in Oracle VM VirtualBox
发贴人 Sergio-Oracle 于2018-4-18 23:10:15在Oracle Linux Introduction How Does This Work? Requirements Bef ...
-
使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务
使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务 作者:Nikolay Manchev 分步构建一个跨这些平台的 ...
-
(转)oracle linux 7 安装oracle 12c
原文:https://blog.csdn.net/jiuyun1986/article/details/53589446 https://blog.csdn.net/admin_root1/artic ...
-
Oracle Database 11G R2 标准版 企业版 下载地址(转)
转自:http://blog.itpub.net/628922/viewspace-759245/ 不需要注册,直接复制到迅雷或其他下载软件中即可下载. oracle 11.2.0.3 下载地址: L ...
-
Oracle Database 11g Release 2 Standard Edition and Enterprise Edition Software Downloads
Oracle Database 11g Release 2 Standard Edition and Enterprise Edition Software DownloadsOracle 数据库 1 ...
随机推荐
-
触发bfd 的条件
满足下列条件之一就可触发BFC [1]根元素,即HTML元素 [2]float的值不为none [3]overflow的值不为visible [4]display的值为inline-block.tab ...
-
css实现翻页效果
如图,鼠标移动到图上,实现右上角翻页的效果,本例主要border边框的设置. 一.基本概念 <html> <head> <style> #demo{ width:0 ...
-
Javascript BOM对象
BOM是browser object model的缩写,简称浏览器对象模型. window对象(BOM的核心对象) 表示浏览器的一个实例,在浏览器中,window对象有着双重角色,它既是通过Javas ...
-
java设计模式(二)---工厂方法模式
2普通工厂方法模式 就是建立一个工厂类,对实现了同一接口的一些类进行实例的创建. 2.1创建接口 /** * 发送接口 * Created by mrf on 2016/2/25. */ public ...
-
Zend studio 12.5.1破解过程
开始学习php了 今天又安装了一下Zend 之前找了很久的教程终于成了 , 今天换了一台电脑需要重新安装一下 又点忘记了. 就讲这个过程写下来 1.安装zend studio 12.5.1.这个过程 ...
-
SPRING IN ACTION 第4版笔记-第二章-004-Bean是否单例
spring的bean默认是单例,加载容器是会被化,spring会拦截其他再次请求bean的操作,返回spring已经创建好的bean. It appears that the CompactDisc ...
-
hdu 3555 Bomb(不要49,数位DP)
Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submi ...
-
AtCoder Grand Contest 031 (AGC031) D - A Sequence of Permutations 其他
原文链接https://www.cnblogs.com/zhouzhendong/p/AGC031D.html 前言 比赛的时候看到这题之后在草稿纸上写下的第一个式子就是 $$f(p,q) = pq^ ...
-
[转] Vmware vs Virtualbox vs KVM vs XEN: virtual machines performance comparison
http://www.ilsistemista.net/index.php/virtualization/1-virtual-machines-performance-comparison.html? ...
-
c#Dapper 批量插入Mysql
<connectionStrings> <add name="sqlconnectionString" connectionString="server ...