1.磁盘空间不够-[INS-32021]
[oracle@o3 database]$ ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 4935 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-01-01_08-38-42AM. Please wait ...[FATAL] [INS-32025] The chosen installation conflicts with software already installed in the given Oracle home.
CAUSE: The chosen installation conflicted with software already installed in the given Oracle home.
ACTION: Install into a different Oracle home.
[FATAL] [INS-32021] Insufficient disk space on this volume for the selected Oracle home.
CAUSE: The selected Oracle home was on a volume without enough disk space.
ACTION: Choose a location for Oracle home that has enough space (minimum of 4,812MB) or free up space on the existing volume.
[oracle@o3 database]$ [FATAL] [INS-32025] The chosen installation conflicts with software already installed in the given Oracle home.
CAUSE: The chosen installation conflicted with software already installed in the given Oracle home.
ACTION: Install into a different Oracle home.
#谷歌翻译:
#[INS-32025]所选的安装与给定Oracle主页中已经安装的软件冲突。
# 原因:所选安装与给定Oracle主目录中已安装的软件冲突。
# 操作:安装到另一个Oracle主目录中。
#[FATAL] [INS-32021]该卷上没有足够的磁盘空间用于所选Oracle主目录。
# 原因:所选的Oracle主目录位于没有足够磁盘空间的卷上。
# 操作:为Oracle主目录选择一个具有足够空间(至少4,812MB)的空间,或者释放现有卷上的空间。
#[oracle @ o3数据库] $ [致命] [INS-32025]所选的安装与给定Oracle主页中已经安装的软件冲突。
# 原因:所选安装与给定Oracle主目录中已安装的软件冲突。
# 操作:安装到另一个Oracle主目录中。
#根分区扩容
[oracle@o3 database]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─centos-root 253:0 0 17G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
[oracle@o3 database]$ df -Th /work/oracle/
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos-root xfs 17G 12G 5.1G 71% /
#加磁盘,重启机器,刷新分区表,重新分区
[root@o3 ~]# partprobe
[root@o3 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─centos-root 253:0 0 17G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sr0 11:0 1 1024M 0 rom
[root@o3 ~]# fdisk -l
..
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
#一路默认,改系统类型
[root@o3 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x34696258.
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-20971519, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-20971519, default 20971519):
Using default value 20971519
Partition 1 of type Linux and of size 10 GiB is set
Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
Command (m for help): p
Device Boot Start End Blocks Id System
/dev/sdb1 2048 20971519 10484736 8e Linux LVM
Command (m for help): w
#lvm扩容,刷新文件系统
[root@o3 ~]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created.
[root@o3 ~]# vgextend centos /dev/sdb1
Volume group "centos" successfully extended
[root@o3 ~]# vgdisplay centos
...
Free PE / Size 2559 / <10.00 GiB
...
[root@o3 ~]# lvextend -l +2559 /dev/centos/root
Size of logical volume centos/root changed from <17.00 GiB (4351 extents) to 26.99 GiB (6910 extents).
Logical volume centos/root successfully resized.
[root@o3 ~]# xfs_growfs /dev/centos/root
...
data blocks changed from 4455424 to 7075840
[root@o3 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─centos-root 253:0 0 27G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
└─sdb1 8:17 0 10G 0 part
└─centos-root 253:0 0 27G 0 lvm /
sr0 11:0 1 1024M 0 rom
[root@o3 ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 12M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root xfs 27G 12G 16G 45% /
/dev/sda1 xfs 1014M 186M 829M 19% /boot
tmpfs tmpfs 378M 0 378M 0% /run/user/0
2.数据库目录冲突-[INS-32025]
[oracle@o3 database]$ ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
[oracle@o3 database]$ [FATAL] [INS-32025] The chosen installation conflicts with software already installed in the given Oracle home.
CAUSE: The chosen installation conflicted with software already installed in the given Oracle home.
ACTION: Install into a different Oracle home.
#谷歌翻译:
#[致命] [INS-32025]所选的安装与给定Oracle主页中已经安装的软件冲突。
#原因:所选安装与给定Oracle主目录中已安装的软件冲突。
#操作:安装到另一个Oracle主目录中。
#找到ContentsXML/inventory.xml文件,修改
[root@o3 ~]# find / -type f -name "inventory.xml"
...
/work/oracle/inventory/ContentsXML/inventory.xml
[root@o3 ~]# su - oracle
Last login: Wed Jan 1 09:37:54 EST 2020 on pts/0
[oracle@o3 ~]$
[oracle@o3 ~]$ vi /work/oracle/inventory/ContentsXML/inventory.xml
#删除掉第11行
11 <HOME NAME="OraDb11g_home1" LOC="/work/oracle/product/11.2.0" TYPE="O" IDX="1" />
#再来一遍
[oracle@o3 database]$ sh $ORACLE_HOME/oui/bin/runInstaller.sh
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 2047 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Continue? (y/n) [n] y
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-01-01_10-07-15AM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% <full path to xclock.. see below>
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for xclock: /usr/X11R6/bin/xclock
#谷歌翻译:
#检查交换空间:必须大于500 MB。实际通过了2047 MB
#检查监视器:必须配置为至少显示256色
# >>>无法使用命令/ usr / bin / xdpyinfo执行显示颜色的自动检查。检查是否设置了DISPLAY变量。失败<<<<
#某些需求检查失败。您必须先满足这些要求
#继续安装,
#继续? (y / n)[n] y
#>>>忽略必需的先决条件失败。继续...
#准备从/ tmp / OraInstall2020-01-01_10-07-15AM启动Oracle Universal Installer。请耐心等待 ...
#未设置显示。请设置显示,然后重试。
#根据Unix Shell,可以使用以下命令之一作为示例来设置DISPLAY环境变量:
#-对于csh:%setenv DISPLAY 192.168.1.128:0.0
#-对于sh,ksh和bash:$ DISPLAY = 192.168.1.128:0.0;汇出DISPLAY
#使用以下命令查看正在使用的shell:
#回声$ SHELL
#使用以下命令查看当前的DISPLAY环境变量设置:
#回声$ DISPLAY
#-确保客户端用户有权连接到X Server。
#要使客户端用户能够访问X Server,请以启动会话的用户身份打开xterm,dtterm或xconsole,然后键入以下命令:
#%xhost +
#要测试是否正确设置了DISPLAY环境变量,请运行本机操作系统随附的基于X11的程序,例#如“ xclock”:
#%<xclock的完整路径。请参见下文>
#如果无法成功运行xclock,请咨询您的PC-X Server或OS供应商以获取进一步的帮助。
#xclock的典型路径:/ usr / X11R6 / bin / xclock
[oracle@o3 database]$
参考:
【文档1】:https://www.cnblogs.com/jefflu2012/archive/2012/09/05/2671189.html
3.数据库启动失败-ORA-01078
思路与过程:
#找到init.ora文件
#将pfile目录下的init.ora文件改名,copy一份到报错的目录下
#启动数据库
#关闭数据库
#进入安装目录下的dbs,删除lk开头的文件
#杀死进程:ora_lgwr_ORCL01(SID名)
#启动数据库
[oracle@o1 dbs]$ sqlplus / as sysdba
..
Connected to an idle instance.
#谷歌翻译:连接到空闲实例。
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/work/oracle/product/11.2.0/dbs/initORCL03.ora'
SQL> Disconnected
#找到init.ora文件
[oracle@o1 dbs]$ cd $ORACLE_BASE/admin/orcl/pfile
[oracle@o1 pfile]$ ll
total 4
-rw-r-----. 1 oracle oinstall 2031 Jan 2 01:00 init.ora.022020151
#将pfile目录下的init.ora文件改名,copy一份到报错的目录下('/work/oracle/product/11.2.0/dbs/initORCL03.ora')
[oracle@o1 pfile]$ cp ./init.ora.022020151 $ORACLE_HOME/dbs/initORCL03.ora
[oracle@o1 pfile]$ sqlplus / as sysdba
..
Connected to an idle instance.
#谷歌翻译:连接到空闲实例。
#启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 1286066176 bytes
Fixed Size 2252904 bytes
Variable Size 402657176 bytes
Database Buffers 872415232 bytes
Redo Buffers 8740864 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
#谷歌翻译:ORA-01102:无法以独占模式挂载数据库
#查询数据库状态
SQL> select * from v$instanc;
select * from v$instanc
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
#谷歌翻译:ORA-01219:数据库未打开:仅允许在固定表/视图上进行查询
SQL> quit
[oracle@o1 11.2.0]$ sqlplus / as sysdba
..
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0
..
#查询数据库状态
SQL> select * from v$instanc;
select * from v$instanc
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
#谷歌翻译:ORA-01219:数据库未打开:仅允许在固定表/视图上进行查询
#关闭数据库
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> quit
#进入安装目录下的dbs,删除lk开头的文件
[oracle@o1 dbs]$ cd $ORACLE_HOME/dbs
[oracle@o1 dbs]$ ll
..
-rw-r-----. 1 oracle oinstall 24 Jan 2 01:02 lkORCL
[oracle@o1 dbs]$ rm -rf lkORCL
#杀死进程:ora_lgwr_ORCL01(SID名)
[root@o1 ~]# ps -ef | grep ora_ | grep -v grep|grep ora_lgwr_ORCL01
oracle 7393 1 0 01:05 ? 00:00:00 ora_lgwr_ORCL01
[root@o1 ~]# kill -9 7393
#进程跟着全部被杀死
[root@o1 ~]# ps -ef | grep ora_
[root@o1 ~]# su - oracle
[oracle@o1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 2 01:40:51 2020
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1286066176 bytes
Fixed Size 2252904 bytes
Variable Size 402657176 bytes
Database Buffers 872415232 bytes
Redo Buffers 8740864 bytes
Database mounted.
Database opened.
SQL>
SQL>
参考:
【文档1】:https://bbs.csdn.net/topics/320238077
【文档2】:http://blog.itpub.net/12272958/viewspace-716020
4.数据库安装报错-[INS-30501] [INS-10008] [INS-32035] [INS-32055] [INS-32016]
# 安装数据库,报 [INS-30501],因为很多时候有些报错也是正常,重复试了几遍还是如此
[oracle@orcl response]$ cd /work/oracle/database/
[oracle@orcl database]$ ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 31346 MB Passed
Checking swap space: must be greater than 150 MB. Actual 11839 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-02-29_10-44-41AM. Please wait ...[oracle@orcl 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.
[FATAL] [INS-30501] Automatic Storage Management software is not configured on this system.
CAUSE: Prior to configuring a database to use Automatic Storage Management (ASM), you must install and configure Grid Infrastructure, which includes ASM software.
ACTION: Grid Infrastructure can be installed from the separate installation media included in your media pack. Alternatively, it can be downloaded separately from Electronic Product Delivery (EPD) or the Oracle Technology Network (OTN). This is typically installed as a separate operating system user than the Oracle database and may have been installed by your system administrator. See the installation guide for more details.
A log of this session is currently saved as: /tmp/OraInstall2020-02-29_10-40-52AM/installActions2020-02-29_10-40-52AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
# 多加了项配置,原本是空,大概的意思是先装软件,后装数据库
# oracle.install.option=INSTALL_DB_SWONLY
# 再次安装,还是 [INS-30501]
[oracle@orcl database]$ ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 31346 MB Passed
Checking swap space: must be greater than 150 MB. Actual 11839 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-02-29_10-45-37AM. Please wait ...[oracle@orcl 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.
[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.
[oracle@orcl database]$ ./runInstaller -silent -responseFile /home/oracle/response/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 31132 MB Passed
Checking swap space: must be greater than 150 MB. Actual 11839 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-02-29_10-51-33AM. Please wait ...[oracle@orcl database]$ You can find the log of this install session at:
/work/oracle/inventory/logs/installActions2020-02-29_10-44-41AM.log
SEVERE:OUI-10021:The target area /work/oracle/inventory is being written to by another session. A read lock cannot be obtained.
[FATAL] [INS-10008] Session initialization failed
CAUSE: An unexpected error occured while initializing the session.
ACTION: Contact Oracle Support Services or refer logs
SUMMARY:
-
A log of this session is currently saved as: /tmp/OraInstall2020-02-29_10-45-37AM/installActions2020-02-29_10-45-37AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
The installation of Oracle Database 11g was successful.
Please check '/work/oracle/inventory/logs/silentInstall2020-02-29_10-44-41AM.log' for more details.
As a root user, execute the following script(s):
1. /work/oracle/inventory/orainstRoot.sh
2. /work/oracle/product/11.2.0/root.sh
Successfully Setup Software.
[WARNING] [INS-32016] The selected Oracle home contains directories or files.
CAUSE: The selected Oracle home contained directories or files.
ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
[FATAL] [INS-32035] Unable to create a new central inventory directory : /work/oracle/inventory.
CAUSE: The central inventory location provided is not empty.
ACTION: Please provide another location for the inventory, or clean up the current location.
[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.
A log of this session is currently saved as: /tmp/OraInstall2020-02-29_10-51-33AM/installActions2020-02-29_10-51-33AM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
# 可以看到,后面脚本路径出来了就算成功了,但警告还是在继续输出,当是送的吧
# [INS-10008] [INS-32035] [INS-32055] [INS-32016]
# 因报错合计,卡住一个钟
#最后,送上参考配置: ~/response/db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
# 主机名 hostname
ORACLE_HOSTNAME=ORCL
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/work/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/work/oracle/product/11.2.0
ORACLE_BASE=/work/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.globalDBName=oracle.mydb
# SID 数据库编号
oracle.install.db.config.starterdb.SID=ORCL01
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=512
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=password
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
未完待续…
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




