分享更有价值
被信任是一种快乐

RedHat 7如何静默安装Oracle11g

文章页正文上

这篇文章主要介绍RedHat 7如何静默安装Oracle11g,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! 安装环境:主机:浪潮NF5270M4 CPU:2颗; MEM:128G操作系统Red Hat Enterprise Linux Server release 7.2 (Maipo)
安装介质:
p13390677_112040_LINUX_1of7.zip数据库基础包p13390677_112040_LINUX_2of7.zip数据库基础包IP分配:主机名主机IPcrm_db192.168.2.36安装目录:oracle软件/home/app/oracle/11.2.0/db_1修改/etc/hosts 文件:[root@crm_db home]# vi /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.2.36 crm_db
[root@crm_db home]# groupadd -g 1001 oinstall

[root@crm_db home]# groupadd -g 1100 dba

[root@crm_db home]# useradd -m -g oinstall -G dba -u 1200 oracle

[root@crm_db home]# passwd oracle

zh;92YjrC

创建目录:

[root@crm_db home]# mkdir -p /home/app/oracle/product/11.2.0/db_1

[root@crm_db home]# chown -R oracle:oinstall /app

#ORACLE SETTING

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft memlock -1

oracle hard memlock -1

#%PAM-1.0

auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so

auth include system-auth

account required pam_nologin.so

account include system-auth

password include system-auth

# pam_selinux.so close should be the first session rule

session required pam_selinux.so close

session required pam_loginuid.so

session optional pam_console.so

# pam_selinux.so open should only be followed by sessions to be executed in the user context

session required pam_selinux.so open

session required pam_namespace.so

session optional pam_keyinit.so force revoke

session include system-auth

-session optional pam_ck_connector.so

#ORACLE SETTING


#ORACLE SETTING


fs.aio-max-nr = 1048576


fs.file-max = 6815744


kernel.shmall = 33554432


kernel.shmmax = 89060441849


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


vm.nr_hugepages = 3876

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing – SELinux security policy is enforced.

# permissive – SELinux prints warnings instead of enforcing.

# disabled – No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

# targeted – Targeted processes are protected,

# mls – Multi Level Security protection.

SELINUXTYPE=targeted

关闭防火墙:

systemctl stop firewalld.service
systemctl disable firewalld

[root@crm_dbhome]#rpm -q binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

安装缺少的安装包:

mount /dev/cdrom /mnt

[root@oracleserver1 u01]# cd /mnt

[root@oracleserver1 mnt]# cd Packages/

rpm -ivh libaio-devel-0.3.107-10.el6.x86_64.rpm

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

ORACLE_SID=oracrm; export ORACLE_SID

ORACLE_BASE=/home/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

ORACLE_UNQNAME=oracleserver; export ORACLE_UNQNAME

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

NLS_DATE_FORMAT=”yyyy-mm-dd HH24:MI:SS”; export NLS_DATE_FORMAT

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

THREADS_FLAG=native; export THREADS_FLAG

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

if [ $USER = “oracle” ] || [ $USER = “grid” ]; then

if [ $SHELL = “/bin/ksh” ]; then

ulimit -p 16384

ulimit -n 65536

else 免费主机域名

ulimit -u 16384 -n 65536

fi

umask 022

fi

重启操作系统

shutdown -r now

安装数据库软件,不建库

1.编辑db_install.rsp文件,可以拷贝一份出来,把原来的清理掉,然后输入以下内容:

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=crm_db

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/home/app/oraInventory

SELECTED_LANGUAGES=en

ORACLE_HOME=/home/app/oracle/product/11.2.0/db_1

ORACLE_BASE=/home/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.EEOptionsSelection=false

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

oracle.install.db.config.starterdb.globalDBName=oracrm

oracle.install.db.config.starterdb.SID=oracrm

oracle.install.db.config.starterdb.characterSet=AL32UTF8

oracle.install.db.config.starterdb.memoryOption=true

oracle.install.db.config.starterdb.memoryLimit=40960

oracle.install.db.config.starterdb.password.ALL=oracle

oracle.installer.autoupdates.option=SKIP_UPDATES

#iSECURITY_UPDATES_VIA_MYORACLESUPPORT=false

DECLINE_SECURITY_UPDATES=true

2,看到让用root用户执行两个脚本的提示后,把脚本执行完,软件就安装完成了。

创建数据库:

编辑

dbca.rsp

脚本:

[GENERAL]

RESPONSEFILE_VERSION = “11.2.0”

OPERATION_TYPE = “createDatabase”

[CREATEDATABASE]

GDBNAME = “oracrm”

SID = “oracrm”

TEMPLATENAME = “General_Purpose.dbc”

CHARACTERSET = “AL32UTF8”

netca /silent /responseFile /home/oraclesoftware/netca.rsp

创建目录:
[root@crm_db home]# mkdir -p /home/app/oracle/product/11.2.0/db_1
[root@crm_db home]# chown -R oracle:oinstall /app
#ORACLE SETTING
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft memlock -1
oracle hard memlock -1
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
-session optional pam_ck_connector.so
#ORACLE SETTING

#ORACLE SETTING

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 33554432

kernel.shmmax = 89060441849

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

vm.nr_hugepages = 3876

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted – Targeted processes are protected,
# mls – Multi Level Security protection.
SELINUXTYPE=targeted
systemctl stop firewalld.service
systemctl disable firewalld
[root@crm_dbhome]#rpm -q binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgc免费主机域名c libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel安装缺少的安装包:
mount /dev/cdrom /mnt
[root@oracleserver1 u01]# cd /mnt
[root@oracleserver1 mnt]# cd Packages/
rpm -ivh libaio-devel-0.3.107-10.el6.x86_64.rpm
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
ORACLE_SID=oracrm; export ORACLE_SID
ORACLE_BASE=/home/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_UNQNAME=oracleserver; export ORACLE_UNQNAME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_DATE_FORMAT=”yyyy-mm-dd HH24:MI:SS”; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
THREADS_FLAG=native; export THREADS_FLAG
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
if [ $USER = “oracle” ] || [ $USER = “grid” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
重启操作系统
shutdown -r now
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=crm_db
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/home/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/home/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/home/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=oracrm
oracle.install.db.config.starterdb.SID=oracrm
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=40960
oracle.install.db.config.starterdb.password.ALL=oracle
oracle.installer.autoupdates.option=SKIP_UPDATES
#iSECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=truedbca.rsp
[GENERAL]
RESPONSEFILE_VERSION = “11.2.0”
OPERATION_TYPE = “createDatabase”
[CREATEDATABASE]
GDBNAME = “oracrm”
SID = “oracrm”
TEMPLATENAME = “General_Purpose.dbc”
CHARACTERSET = “AL32UTF8”
netca /silent /responseFile /home/oraclesoftware/netca.rsp以上是“RedHat 7如何静默安装Oracle11g”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注云技术行业资讯频道!

相关推荐: 怎么实现物理DataGuard客户端无缝切换

这篇文章主要讲解了“怎么实现物理DataGuard客户端无缝切换”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么实现物理DataGuard客户端无缝切换”吧!项目客户一直想实现DataGuard的主备切换的自…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册