oracle 11g install linux

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

时间: 2024-12-28 02:07:18

oracle 11g install linux的相关文章

Oracle 11g在Linux上的安装

Oracle 11g在Linux上的安装 创建所需用户和组 vim mk_user.sh groupadd -g 501 oinstallgroupadd -g 502 dbagroupadd -g 503 operuseradd -u 501 -g oinstall -G dba,oper oracle sh mk_user.sh 创建所需的目录vim mk_dir.sh mkdir -p /u01/app/oraInventorychmod -R 775 /u01/app/oraInvent

ORACLE 11G在Linux下的标准安装方法(下)

一.相关文件夹 ORACLE_BASE是oracle的根目录,ORACLE_HOME是oracle产品的目录.ORACLE_BASE下是admin和product. ORACLE_HOME下则是ORACLE的命令.连接库.安装助手.l监听等等一系列的东西.ORACLE_HOME比ORACLE_BASE目录要更深一些.也就是说:ORACLE_HOME=$ORACLE_BASE/product/oracle_version. RACLE_SID这个环境变量全称"Oracle System Ident

ORACLE 11g在linux上建立第二个实例

linux服务器主机不够,而测试人员需要新的一台oracle环境做测试,,所以准备在已经有的oracle的linux主机上上面建立第二个实例.这台oracle服务器的资源足够用,所以就直接在上面搭建多实例来满足测试人员的需求. 1,使用vnc 远程工具进去,dbca报错如下: [[email protected] ~]$ dbca No protocol specified [[email protected] ~]$ exit 2,需要设置display窗口: [[email protecte

ORACLE 11G在Linux下的标准安装方法

一.简介 Oracle数据库在系统运维中的重要性不言而喻,通过熟悉Oracle的安装来加深对操作系统和数据库知识的了解.本次安装测试的环境如下: 操作系统:CentOS 6.5 X64 数据库:OracleDatabase 11g Release 2 (11.2.0.1.0) for Linux x86-64 二.更新系统 先通过重新设定系统的更新源来加快后续软件的安装进度,常用的升级源可按以下命令指定.通过以下方式加入东软的源,经过测试该网站的源比163等大公司的更稳定(也有可以是163的资源

oracle 11g在linux的安装

安装软件包 rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers kernel-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make

oracle 11g install on suse 12 sp3

oracle 11.2.0.4的官方文档认证了suse 12 sp1,但sp3并未做认证如要在sp3上安装,除了常规的linux上安装外,其他不同点参考如下步骤:1 服务管理/usr/sbin/rc*systemctl list-unit-files|grep -i firewall#修改主机名hostnamectl set-hostname suse12#禁用一些服务systemctl disable bluetooth.servicesystemctl disable dbus-org.op

Linux静默安装oracle 11g

之前在oracle安装过程中碰到了很多问题,浪费了不少问题,后来有哥同事给了以下安装文档,解决了很多多问题,也提到了很多在安装过程中碰到的问题! 所以记录一下 本文档是Oracle Database 11.2.0.1 for RHEL5 Server(包括x86和x86_64平台)的静默安装指南. 所有操作无需使用图形界面. 静默安装能减少安装出错的可能性, 也能大大加快安装速度. # 后跟命令表示以操作系统下root用户操作; $ 后跟命令表示以操作系统下oracle用户操作; 1.1 上传软

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:                No OS Version:     Red Hat Enterprise Linux Server release 5.9 x86_64 OGG Version:   Oracle GoldenGate V11.2.1.0.6 for Oracle 10g on Linux x8

CentOS 6.5 安装Oracle 11g R2

CentOS 安装Oracle 11g R2 实验环境: Linux服务器操作系统:CentOS 5.5 32位(注意:系统安装时请单独分区/data用来安装oracle数据库) Linux服务器IP地址:192.168.32.130 Oracle数据库版本:linux_11gR2_database Windows客户端系统:Windows Xp 具体操作: 一.安装 X window yum groupinstall "X Window System" vim /etc/initta