oracle-11.2.0.4静默安装----RedHat7.5
1.配置/etc/hosts文件和关闭seliux和firewall防火墙
编辑/etc/hosts文件
[root@henry ~]# vim /etc/hosts
[root@henry ~]# cat /etc/hosts
192.168.10.50 henry 禁用selinux
[root@henry ~]# vim /etc/selinux/config
[root@henry ~]# cat /etc/selinux/config
SELINUX=disabled 关闭防火墙
[root@henry ~]# systemctl stop firewalld
[root@henry ~]# systemctl disable firewalld
2. 检查安装数据库所需要的包
[root@henry ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgomp libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel numactl-devel perl-Env elfutils-libelf-devel | grep "not installed" package compat-libstdc++-33 is not installed
package ksh is not installed
package libaio-devel is not installed
package sysstat is not installed
package unixODBC is not installed
package unixODBC-devel is not installed
package numactl-devel is not installed
package perl-Env is not installed
package elfutils-libelf-devel is not installed [root@henry ~]# yum install -y ksh libaio-devel sysstat unixODBC unixODBC-devel numactl-devel perl-Env elfutils-libelf-devel 其中compat-libstdc++-33需手动下载上传安装
root@henry ~]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
3.创建用户和组
[root@henry ~]# groupadd oinstall
[root@henry ~]# groupadd dba
[root@henry ~]# useradd -g oinstall -G dba oracle
[root@henry ~]# passwd oracle
4. 系统参数配置
编辑/etc/sysctl.conf
[root@henry ~]# vim /etc/sysctl.conf
[root@henry ~]# cat /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 4294967295
kernel.shmall = 268435456
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
[root@henry ~]# sysctl -p
编辑/etc/security/limits.conf
[root@henry ~]# cat /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
编辑/etc/pam.d/login,新加一行
[root@henry ~]# cat /etc/pam.d/login
#ORACLE SETTING
session required pam_limits.so
5.配置oracle用户环境变量
[root@henry ~]# cat /home/oracle/.bash_profile
umask 022
export ORACLE_SID=PROD1
export ORACLE_BASE=/data/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TMP=/tmp
export TMPDIR=$TMP
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export EDITOR=vim
export TNS_ADMIN=$ORACLE_HOME/network/admin
export SQLPATH=$ORACLE_HOME/sqlplus/admin
export NLS_LANG="AMERICAN_CHINA.ZHS16GBK"
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias asmcmd='rlwrap asmcmd'
6. 创建安装目录
u01是oracle安装目录
[root@henry ~]# mkdir /data/u01
soft是存放数据库软件的目录
[root@henry ~]# mkdir /data/soft
[root@henry ~]# chown -R oracle:oinstall /data/u01/
[root@henry ~]# chown -R oracle:oinstall /data/soft/
7. 重启系统,切换oracle用户安装软件
将数据库软件上传到/data/soft/目录下,解压安装包
[oracle@henry ~]$ cd /data/soft/
[oracle@henry soft]$ unzip p13390677_112040_Linux-x86-64_1of7.zip && unzip p13390677_112040_Linux-x86-64_2of7.zip
[oracle@henry soft]$ ls
database p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
8. 编辑静默安装的应答文件db_install.rsp,此文件位于/data/soft/database/response/目录下
把应答文件模版db_install.rsp 复制到oracle用户家目录下
[oracle@henry soft]$ cd database/
[oracle@henry database]$ ls
install readme.html response rpm runInstaller sshsetup stage welcome.html
[oracle@henry database]$ cd response/
[oracle@henry response]$ ls
dbca.rsp db_install.rsp netca.rsp
[oracle@henry response]$ cp db_install.rsp /home/oracle 编辑应答文件
[oracle@henry database]$ vim /home/oracle/db_install.rsp
#设置以下内容
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=henry
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/u01/app/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/data/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true
9. 执行静默安装
[oracle@henry database]$ ./runInstaller -silent -responseFile /home/oracle/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 14307 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-10-28_02-28-55PM. Please wait ...[oracle@henry database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
You can find the log of this install session at:
/data/u01/app/oracle/inventory/logs/installActions2019-10-28_02-28-55PM.log
The installation of Oracle Database 11g was successful.
Please check '/data/u01/app/oracle/inventory/logs/silentInstall2019-10-28_02-28-55PM.log' for more details. As a root user, execute the following script(s):
1. /data/u01/app/oracle/inventory/orainstRoot.sh
2. /data/u01/app/oracle/product/11.2.0/dbhome_1/root.sh Successfully Setup software.
另开个终端,使用root账户按顺序执行上面的两个脚本
[root@henry ~]# /data/u01/app/oracle/inventory/orainstRoot.sh
Changing permissions of /data/u01/app/oracle/inventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world. Changing groupname of /data/u01/app/oracle/inventory to oinstall.
The execution of the script is complete.
[root@henry ~]# /data/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /data/u01/app/oracle/product/11.2.0/dbhome_1/install/root_henry_2019-10-28_14-36-30.log for the output of root script
10. 编辑静默建库应答文件dbca.rsp
复制建库应答文件dbca.rsp到oracle家目录下
[oracle@henry database]$ cp response/dbca.rsp /home/oracle/ [oracle@henry database]$ vim /home/oracle/dbca.rsp
GDBNAME = "PROD1"
SID = "PROD1"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
DATAFILEDESTINATION =/data/u01/app/oracle/oradata
RECOVERYAREADESTINATION=/data/u01/app/oracle/fast_recovery_area
CHARACTERSET = "AL32UTF8"
DATABASETYPE = "OLTP"
TOTALMEMORY = "2048"
11.执行静默建库
[oracle@henry ~]$ dbca -silent -responseFile /home/oracle/dbca.rsp
Copying database files
1% complete
3% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/data/u01/app/oracle/cfgtoollogs/dbca/PROD1/PROD1.log" for further details.
11. 上传并安装rlwrap包,root用户安装
安装readline-devel包
[root@henry ~]# yum install -y readline* 解压并安装rlwrap
[root@henry ~]# tar -zxvf 12-rlwrap-0.37.tar.gz
[root@henry ~]# cd rlwrap-0.37/
[root@henry rlwrap-0.37]# ls
aclocal.m4 AUTHORS BUGS ChangeLog completions config.h.in configure configure.ac COPYING doc filters INSTALL Makefile.am Makefile.in NEWS PLEA README src test TODO tools
[root@henry rlwrap-0.37]# ./configure
[root@henry rlwrap-0.37]# make&&make install
12. 配置监听,将配置监听的应答文件netca.rsp复制oracle用户的家目录下,不用做修改
[oracle@henry response]$ pwd
/data/soft/database/response
[oracle@henry response]$ cp netca.rsp /home/oracle/
[oracle@henry response]$ netca -silent -responseFile /home/oracle/netca.rsp Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/data/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
在/data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/目录下会新增listener.ora 和sqlnet.ora两个文件
[oracle@henry response]$ cd /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
[oracle@henry admin]$ ls
listener.ora samples shrept.lst sqlnet.ora [oracle@henry admin]$ cat listener.ora
# listener.ora Network Configuration File: /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools. LISTENER = ====>这个字符串就是监听名
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = henry)(PORT = 1521))
)
) ADR_BASE_LISTENER = /data/u01/app/oracle
这是个动态监听,监听创建后就已启动。启动,停止,查看监听状态。
查看监听状态 (lsnrctl status listen_name),因监听名是默认的LISTENER,所以可省略,若有多个监听,则需要指定监听名查看指定的监听状态
[oracle@henry ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 09:57:37 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 29-OCT-2019 09:29:29
Uptime 0 days 0 hr. 28 min. 8 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))
Services Summary...
Service "PROD1" has 1 instance(s).
Instance "PROD1", status READY, has 1 handler(s) for this service...
Service "PROD1XDB" has 1 instance(s).
Instance "PROD1", status READY, has 1 handler(s) for this service...
The command completed successfully 停止监听(lsnrctl stop listen_name)
[oracle@henry ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 10:00:10 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully 启动监听(lsnrctl start listen_name)
[oracle@henry ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 10:00:46 Copyright (c) 1991, 2013, Oracle. All rights reserved. Starting /data/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 29-OCT-2019 10:00:46
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))
The listener supports no services
The command completed successfully
13. 登入数据库
[oracle@henry ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Tue Oct 29 10:13:50 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> conn / as sysdba
Connected.
SQL> show user;
USER is "SYS" SQL> show parameter db_name; NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
db_name string PROD1 SQL> select status from v$instance; STATUS
------------------------
OPEN
oracle-11.2.0.4静默安装----RedHat7.5的更多相关文章
- oracle 11.2.0.4静默安装
oracle 11.2.0.4静默安装 1.安装包 1.1.上传安装包 xshell可用rz命令,选择安装包. mobaxterm可用左侧栏上传功能. 2.安装准备 2.1.关闭防火墙.SELinux ...
- Oracle 11.2.0.4 RAC安装最新PSU补丁
环境:两节点RAC(RHEL 6.4 + GI 11.2.0.4 + Oracle 11.2.0.4) 需求:安装最新PSU补丁11.2.0.4.7 1.下载补丁和最新OPatch 2.检查数据库当前 ...
- centos6.8 oracle 11.2.0.4 11g安装
配置Linux系统参数 配置阿里云yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup ...
- ORACLE 11.2.0.4 RAC安装在rhel6上
. 关闭ipv4防火墙(两个节点): [root@RAC01 ~]# service iptables stop [root@RAC01 ~]# service iptables status ipt ...
- centos6.8 静默安装 oracle 11.2.0.4
安装环境及系统要求 (下文具体参数值与路径根据自己的环境调整)操作系统:Red Hat Enterprise Linux 6 (x86) 或者CentOS 6 (x64) 数据库:Oracle ...
- 【原】Oracle 11.2.0.1 64bit for RHEL6.0 Server x86_64 静默安装
作者:david_zhang@sh [转载时请以超链接形式标明文章] 链接:http://www.cnblogs.com/david-zhang-index/p/4182469.html 本文适用Or ...
- Oracle 11.2.0.4.0 Dataguard部署和日常维护(1)-数据库安装篇
本次测试环境 系统版本 CentOS release 6.8 主机名 ec2t-userdata-01 ec2t-userdata-01 IP地址 10.189.102.118 10.189.100. ...
- ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档
ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报 分类: Oracle RA ...
- centos6.5 x86_64安装oracle 11.2.0.3grid
centos6.5 x86_64安装oracle 11.2.0.3grid 1.安装前的准备 工作 1.1.配置node1 1.1.1.配置虚拟机并安装centos 安装node1----- 1 ...
- CentOS 7 安装 Oracle 11.2.0.4
一.安装环境 CentOS Linux release 7.2.1511 (Core) Oracle Database 11g Release 2 (11.2.0.4) 二.安装前准备 2.1 修改主 ...
随机推荐
- Python - Numpy 学习笔记
#python - Numpy learning import numpy as np #---Numpy学习笔记---(第四章)--- #切片,浅拷贝 a = np.arange(10) print ...
- Comparison Theorem in Riemannian geometry
Given $p\in M$, locally, there exists a diffemorphism of $T_M$ and $B_r(p)\subset$, this is the most ...
- GSLB工作原理
参考文档: http://chongit.github.io/2015/04/15/GSLB%E6%A6%82%E8%A6%81%E5%92%8C%E5%AE%9E%E7%8E%B0%E5%8E%9F ...
- android studio的一些辅助工具
目录配置 https://blog.csdn.net/Kideers/article/details/128233984 https://blog.csdn.net/hnjcxy/article/de ...
- 高德地图poi关键字搜索-vue+ant-design
最近有个需求,需要输入上车点,下车点,然后输入上车点的时候还要在下方显示地图附近的车辆.百度了一波之后,完全莫得头绪,很多代码也都用不了,即便改了之后也不怎么生效.我用的是jeecg-boot.最后静 ...
- java 实现读取本地日志文件列表并在浏览器上显示
import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; import ...
- 更换CentOS的下载源为阿里云
阿里Linux镜像地址:http://mirrors.aliyun.com/ 1.备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cen ...
- Jmeter(三十九) - 从入门到精通进阶篇 - Jmeter配置文件的刨根问底 - 上篇(详解教程)
------------------------------------------------------------------- 转载自:北京-宏哥 https://www.cnblogs.co ...
- PHP 中的类-什么叫类
在阐述类的概念之前我们来先说说面向对象编程的概念:面向对象的程序设计(Object-Oriented Programming,简记为OOP)立意于创建软件重用代码,具备更好地模拟现实世界环境的能力,这 ...
- div+css CSS基本
• css 高度(height) • css 宽度(width) · • css 边框(border) · • css 背景(background) · • css 浮动(floa ...