redhat6.4简易安装oracle 12C
admin
2023-05-13 11:22:11
0

这里只是把安装用到的三个脚本贴出来,详细安装文档请下载附件

service_close.sh

 说明:安装好系统后关闭不必须的服务

#!/bin/bash
#description :the script is used to close some unnecessary services
#by lineqi
#2014-06-28
chkconfig --level 2345 NetworkManager off
service NetworkManager stop

chkconfig --level 2345 cups off
service cups stop

chkconfig --level 2345 ip6tables off
service ip6tables stop

chkconfig --level 345 netfs off
service netfs stop

chkconfig --level 345 nfslock off
service nfslock stop

chkconfig --level 2345 postfix off
service postfix stop

chkconfig --level 2345 iptables off
service iptables stop

 

set_userinfo.sh

说明:设置oracle用户信息及安装目录

#!/bin/bash
#description:this script used to create a oracle groups user user environment settings the installation directory
#by lineqi
#2014-07-26

#Add oracle groups
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper

#Add oracle user and Seting a oracle user password
useradd -u 502 -g oinstall -G dba,oper oracle;echo "oracle"|passwd --stdin oracle

#Seting a oracle user password
#passwd oracle<#oracle
#oracle
#EOF

#mkdir the oracle installation directory
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
chmod -R 777 /u01/app
chown -R oracle:oinstall /u01/app/

#Add the following content to /home/oracle/.bash_profile
cat>>/home/oracle/.bash_profile<export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=\$ORACLE_HOME/bin:.:\$PATH
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORACLE_UNQNAME=orcl
EOF
su - oracle -c ". .bash_profile"

 

set_para.sh

说明:设置安装oracle时所需要的参数

#!/bin/bash
#description:this script is used to set the oracle installation environment parameters
#by lineqi
#2014-07-26

#Add the following contents to /etc/security/limits.conf

cat>>/etc/security/limits.conf<#for oracle
oracle           soft    nproc           2047
oracle           hard    nproc           16384
oracle           soft    nofile          1024
oracle           hard    nofile          65536
oracle           soft    stack           10240
oracle           hard    stack           10240
EOF
sleep 2

#Add the following contents to /etc/pam.d/login

cat>>/etc/pam.d/login<# for oracle
session    required     pam_limits.so
EOF

sleep 1

#Add the following contents to /etc/sysctl.conf

cat>>/etc/sysctl.conf<# for oracle
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744
EOF
sysctl -p >>/dev/null 2>&1

#Add the following contents to /etc/profile

cat>>/etc/profile<# for oracle
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF

#Replace the following contents to /etc/selinux/config
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" `grep SELINUX=enforcing -rl /etc/selinux/config`

 

附件:http://down.51cto.com/data/2364856

相关内容

热门资讯

以军士兵集体丢掉武器抗命,大喊... 据凤凰卫视报道,以色列国防军一军事基地7月30日发生士兵抗命事件,约120名士兵抗议指挥官做法,将武...
蒋成华任商务部副部长 国务院任免国家工作人员。任命蒋成华为商务部副部长。免去蒋成华的商务部国际贸易谈判副代表职务。
伊朗驻华大使:在军事威胁下,不... 新华社北京7月31日电(记者刁慧琳) 伊朗驻华大使法兹里7月28日表示,伊美回到谈判桌的前提是美国必...
伊朗革命卫队在霍尔木兹海峡击中... 当地时间31日,伊朗伊斯兰革命卫队发布声明称,革命卫队海军当天在霍尔木兹海峡击中并扣留了两艘违反禁令...
美媒:特朗普,遇到了一个更强硬... 据《纽约时报》7月29日报道,就在特朗普总统看似放弃战事升级计划几天后,美国再次与伊朗交火。上周末,...
女子做气管镜时不幸身亡,丈夫称... 7月29日,西安刘先生反映妻子在当地医院做支气管镜检查时死亡,看监控时发现医生疑有违规操作。刘先生表...
全网“帮卖西瓜”,然后呢? 近日,河南部分地区西瓜滞销的消息在网上热度很高。很多地方也伸出援手:有景区收购千斤西瓜、免费赠予游客...
美媒:乌克兰袭击伊朗船只,险引... 据《纽约时报》7月28日报道,据伊朗和西方官员称,伊朗曾考虑攻击乌克兰的一个港口,以报复乌克兰对一艘...
20年里,他只画美女,用东方风... 迈进KIM在上海的工作室,迎面是一整墙的美女们。她们像是刚从一场时髦的沙龙里退场,或倚或立,眉宇间是...
Google在港推出AI代理G... 观点网讯:7月29日,Google在香港推出AI代理Gemini Spark,该代理可全天候在后台运...