安装Oracle之前的环境准备

本文详细介绍了安装Oracle环境的准备步骤,包括创建特定用户和组,调整系统内核参数,创建目录并设置权限,配置环境变量以及创建必要的文件夹。通过试验,确保在采用客户化方式安装Oracle数据库时,系统能够正确识别并使用所需的用户和组。

--安装oracle环境准备
创建组和用户
groupadd dba
groupadd oinstall

useradd -g oinstall -G dba oracle
passwd oracle

修改linux系统内核参数
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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 = 1048586

vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

 

创建目录
mkdir /u01/app
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
rwx: oracle用户
r-x: 和oracle用户同组的其他用户权限
r-x: 不同组的用户的权限

修改oracle用户的profile文件
su - oracle
vi .bash_profile

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=mysid
export PATH=$ORACLE_HOME/bin:$PATH
export EDITOR=vi

 

补充:

经过试验发现,如果安装oracle11.2.0.4,采用客户化方式安装数据库的时候,可能会要求 oper 组,

最好加入 groupadd oper

最后:useradd -g oinstall -G dba,oper oracle

或者:usermod -g oinstall -G dba,oper oracle

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值