Oracle学习笔记:CentOS 7 Oracle12c静默安装



1、环境准备(CentOS7.5已安装Development Tools)

创建用户和组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

配置内核参数
touch /etc/sysctl.d/97-oracledatabase-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 = 1048576
sysctl --system

配置资源限制
/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 3145728
oracle hard stack 3145728

创建目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
chmod -R 775 /u01

修改/etc/hosts 文件
在文件最后添加如下设置:根据实际情况设置
192.168.230.100 fanxin fanxin

关闭 selinux
/etc/selinux/config
SELINUX=disabled

关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service

关闭透明大页
cat /sys/kernel/mm/transparent_hugepage/enabled
[always]代表启用
[never]代表禁用
vi /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet
transparent_hugepage=never"
grub2-mkconfig -o /boot/grub2/grub.cfg

重启系统

2、安装oracle(以oracle用户登录)

创建安装文件目录,并上传oracle安装文件
mkdir /home/oracle/install_oracle/12.1.0.2 -p

解压oracle安装文件
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip

创建/etc/oraInst.loc文件,内容如下
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

配置应答文件:
cd /home/oracle/oracle_install/12.1.0.2/database
grep -Ev "^$|#" response/db_install.rsp > inst.rsp 配置应答文件需修改的内容如下:
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.1.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracle.cyf.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/home/oracle/oracle_install/12.1.0.2/database/stage/products.xml
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.BACKUPDBA_GROUP=dba
oracle.install.db.DGDBA_GROUP=dba
oracle.install.db.KMDBA_GROUP=dba
DECLINE_SECURITY_UPDATES=true

运行安装程序
./runInstaller -ignoreSysPrereqs -force -silent -responseFile /tools/database/inst.rsp.rsp

安装程序执行后根据提示root用户运行root.sh脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值