博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oracle-安装-init.sh
阅读量:5044 次
发布时间:2019-06-12

本文共 2977 字,大约阅读时间需要 9 分钟。

!#/bin/bash
groupadd -g 1001 oinstall
groupadd -g 1002 dba
groupadd -g 1003 oper
groupadd -g 1004 asmadmin
groupadd -g 1006 asmdba
groupadd -g 1007 asmoper
useradd -u 1001 -g oinstall -G dba,asmadmin,asmdba,asmoper grid
useradd -u 1002 -g oinstall -G dba,asmdba,oper oracle
echo 'oracle' | passwd --stdin grid
echo 'oracle' | passwd --stdin oracle
echo '192.168.62.102 asm'>>/etc/hosts
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 = 1048576'>>/etc/sysctl.conf
/sbin/sysctl -p
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
echo 'session required pam_limits.so'>>/etc/pam.d/login
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 'umask 022 '>>/etc/profile
echo 'fi '>>/etc/profile
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir /u01/app/11.2.0/grid -p
chown grid:oinstall /u01/app/11.2.0/grid
chmod -R 775 /u01/app/11.2.0/grid
echo 'export ORACLE_SID=+ASM' >> /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 PATH=$ORACLE_HOME/bin:$PATH' >> /home/grid/.bash_profile
echo 'export ORACLE_SID=orcl' >> /home/oracle/.bash_profile
echo 'export ORACLE_UNQNAME=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/db_1' >> /home/oracle/.bash_profile
echo 'export PATH=$ORACLE_HOME/bin:$PATH' >> /home/oracle/.bash_profile

转载于:https://www.cnblogs.com/niaocaizhou/p/10461474.html

你可能感兴趣的文章
多余的判断
查看>>
Android开发之监听或获取手机短信内容 分类: Android 消...
查看>>
foreach---集合已修改;可能无法执行枚举操作。
查看>>
BZOJ-3505-数三角形-CQOI2014
查看>>
CentOS 安装 debuginfo-install
查看>>
CSS布局:让页底内容永远固定在底部
查看>>
RichEdit
查看>>
路由器和交换机的区别
查看>>
Coursera台大机器学习课程笔记14 -- Validation
查看>>
易之 - 我是个算命先生(2014年3月23日)
查看>>
C# :面向对象
查看>>
JavaScript中的正则表达式
查看>>
【公众号系列】SAP HANA 平台的优势
查看>>
VMware+Fedora20+secureCRT7.0配置心得
查看>>
20172328《程序设计与数据结构》第五周学习总结
查看>>
memcached完全剖析–1. memcached的基础(转)
查看>>
Eigen vs Numpy时间对比
查看>>
Java学习笔记(七)——获取类中方法的信息,java的LinkedList
查看>>
js修改伪类元素样式
查看>>
SQL常用语句
查看>>