linux OS install oracle database

#!/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

时间: 2024-10-09 03:54:41

linux OS install oracle database的相关文章

Oracle Linux 下安装 Oracle database 12c

安装检查清单 硬件检查清单 略,后续更新. 操作系统检查清单 操作系统版本支持 支持的发行版本.内核等(distribution, release, kernels and packages) 对x86-64系统Linux 6 最低操作系统要求 OpenSSh 安装 Oracle Linux 6 Supported distributions: Oracle Linux 6 with the Unbreakable Enterprise kernel: 2.6.39-200.24.1.el6ue

在linux 上安装oracle database 对 32bit rpm 和64bit rpm的要求

摘自: Requirements for Installing Oracle 11gR2 RDBMS on RHEL (and OEL) 5 on AMD64/EM64T (文档 ID 880989.1) NOTE: Starting with Oracle Database 11g Release 2 (11.2.0.2), all the 32-bit packages, except for gcc-32bit-4.3, listed in the following sections a

Install Oracle Database client in silent mode

We can save time by using silent mode provided by many software. We can do some other things with saved time. Hope this can help you. Oracle Database client 12.2.0.1 1. reponse file content. below content should be saved as oracle_client_install_1220

linux平台下Oracle database的安装与/etc/redhat-release

linux平台下,在安装oracle10.2.0.1的时候,不要修改/etc/redhat-release的内容. 而是要用runInstaller的一个参数去解决:-ignoreSysPreReqs.因为emc的多路径软件在安装时会读取该文件的内容,错误的内容会导致emc多路径软件安装失败.这也算是一个最佳实践吧. 版权声明:本文为博主原创文章,未经博主允许不得转载.

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 Oracle 11G on Oracle Enterprise Linux 7 (OEL7). Read following article how to install Oracle Enterprise Linux 7: Install Oracle Linux 7 (OEL7) (for comf

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 Before You Get Started Steps Clone the vagrant-boxes repository from GitHub Download Oracle Database Installation Files Place the downloaded Database ins

使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务

使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务 作者:Nikolay Manchev 分步构建一个跨这些平台的简单事务复制示例. 2011 年 8 月发布 大多数关注数据复制的 Oracle 技术专家都熟悉 Oracle Streams.在 2009 年之前,Streams 一直是推荐使用的最流行的 Oracle 数据分发技术. 2009 年 7 月,Oracle 收购了 GoldenGate 这一数据库复

Linux OS Service 'ntpd' (文档 ID 551704.1)

Linux OS Service 'ntpd' (文档 ID 551704.1) APPLIES TO: Linux OS - Version Oracle Linux 4.4 to Oracle Linux 6.5 with Unbreakable Enterprise Kernel [3.8.13] [Release OL4U4 to OL6U5]Linux x86Linux x86-64Linux Kernel - Version: 4.4 to 6.5***Checked for rel

(转)oracle linux 7 安装oracle 12c

原文:https://blog.csdn.net/jiuyun1986/article/details/53589446 1.安装准备 oracle linux 7.3 其它7版本也可以,安装后升级到最新 oracle database 12c oracle virtualBox xftp 5 xmanager 5 putty or  CRT 2.安装虚拟机及linux环境 a.新建虚拟机 内存根据自己实机情况来给 配置CPU及其它参数(把  指点设备 改成USB 这样在虚拟机与实机中切换鼠标方