这篇文章主要介绍oracle 12c如何静默安装,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
12c静默安装
==================
--检查系统包
rpm -q binutils compat-libcap compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh
rpm -q libgcc libstdc++ libstdc++-devel libaio libaio-devel libXext libXtst libX11 libXau libxcb libXi make sysstat
--调整内核参数并生效
cat >>/etc/sysctl.conf <<EOF
#add for oracle install
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
EOF
sysctl -p
--调整系统限制
cat >>/etc/security/limits.conf <<EOF
#add for oracle install
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
--关闭selinux(需重启生效)
vi /etc/selinux/config
SELINUX=disabled
getenforce
--创建用户、组、安装目录
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
mkdir -p /data/oracle2/
chown -R oracle:dba /data/oracle2/
chown -R oracle:dba /data/
--设置环境变量
su - oracle
# For Oracle
export TMP=/tmp;
export TMPDIR=$TMP;
export ORACLE_BASE=/data/oracle2;
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1;
export ORACLE_SID=db12c2;
export ORACLE_TERM=xterm;
export PATH=/usr/sbin:$PATH;
export PATH=$ORACLE_HOME/bin:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
#export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/dbs:$JAVA_HOME/bin
export NLS_LANG=AMERICAN_CHINA.ZHS16GBK
export PS1="\\u@\\h \\w\\$"
df -h
--编写静默安装软件响应文件
db2.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=ZTE-TEST.localdomain
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/oraInventory
SELECTED_LANGUAGES=zh_CN,en
ORACLE_HOME=/data/oracle2/product/12.2.0/db_1
ORACLE_BASE=/data/oracle2
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
oracle.install.db.OSRACDBA_GROUP=dba
--安装软件,root执行脚本
/data/ora_media/database/runInstaller -silent -noconfig -responseFile /home/oracle/db2.rsp
--创建数据库
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname db12c2.oracle.com -sid db12c2 -responseFile NO_VALUE -characterSet ZHS16GBK -memoryPercentage 30 -emConfiguration LOCAL
--启动监听并注册
lsnrctl start
sqlplus / as sysdba <<EOF
alter system register;
exit
EOF
以上是“oracle 12c如何静默安装”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!