![](/img/trans.png)
[英]Oracle XE ( 11.2.0 ) Database Configuration failed on Ubunto 14 and 16
[英]Oracle XE Database Configuration failed
我想在我的vps中創建一個oracle xe數據庫。
VPS OS:Cent OS。
當試圖運行
/etc/init.d/oracle-xe configure
它會引發錯誤數據庫容錯失敗並檢查日志但日志只顯示ORA-01034:ORACLE不可用
以下是歷史......
[root@vmcx-43 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing... ########################################### [100%]
/var/tmp/rpm-tmp.51363: line 186: bc: command not found
1:oracle-xe /var/tmp/rpm-tmp.51363: line 186: bc: command not fo und########################################### [100%]
Executing post-install steps...
/var/tmp/rpm-tmp.97984: line 76: bc: command not found
/var/tmp/rpm-tmp.97984: line 77: bc: command not found
/var/tmp/rpm-tmp.97984: line 78: [: -gt: unary operator expected
/var/tmp/rpm-tmp.97984: line 82: bc: command not found
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
[root@vmcx-43 Disk1]# /etc/init.d/oracle-xe configure
Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press <Enter> to accept the defaults.
Ctrl-C will abort.
Specify the HTTP port that will be used for Oracle Application Express [8080]:
Specify a port that will be used for the database listener [1521]:
Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Password can't be null. Enter password:
Password can't be null. Enter password:
Confirm the password:
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: n
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
[root@vmcx-43 Disk1]# cd /u01/app/oracle/product/11.2.0/xe/config/log
[root@vmcx-43 log]# ls
CloneRmanRestore.log cloneDBCreation.log postDBCreation.log postScripts.log
[root@vmcx-43 log]# tail postScripts.log
commit
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
[root@vmcx-43 log]# tail CloneRmanRestore.log
select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
將服務器名稱和IP添加到/ etc / hosts文件中
yum install bc
然后再試一次。
我有同樣的問題。
我卸載了oracle-xe。 請參見如何在Linux上重新配置Oracle 10g xe
然后跟着
yum install bc
rpm -i oracle-xe.rpm
/etc/init.d/oracle-xe configure
一切都很順利。
好的解決方案可能聽起來很奇怪,但今天我在centos上安裝Oracle Xe時遇到了完全相同的錯誤。 我努力尋找答案但最終問題是我安裝rpm的方式。
我初次使用了這個命令
$rpm -ivh oracle-xe.rpm
並且它以某種方式給出了你得到的同樣的錯誤。
之后我試過了
$rpm -i oracle-xe.rpm
它對我有用。 不太確定為什么“h”標志,即哈希標志會引起問題,但它對我有用。
我也在Linux Mint 17.3上面臨類似的問題。 幸運的是,我很快找到了解決方案。 問題只是你的共享內存文件不是Oracle期望它的位置,即/ dev / shm,但是你可以在/ run / shm中將它與/ dev / shm鏈接到它。
因此,要在配置數據庫之前解決此問題,必須按順序執行以下步驟
$ sudo rm -rf /dev/shm
$ sudo mkdir /dev/shm
$ sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
我測試過,效果很好。
對於debian ... 如何從rpm安裝oracle-XE
配置數據庫...數據庫配置失敗。 查看/u01/app/oracle/product/11.2.0/xe/config/log以獲取詳細信息
nano /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora
評論# memory_target=100663296
/etc/init.d/oracle-xe configure // will work
谷歌搜索“oracle糟透了”因為安裝缺少日志而感到沮喪,我設法解決了導致配置在運行Hortonworks HDP 2.6 Sandbox的docker容器上失敗的問題:
根據https://blogs.oracle.com/oraclewebcentersuite/implement-oracle-database-xe-as-docker-containers,Oracle XE需要1 Gb的共享內存,否則會失敗(我沒有嘗試512 MB)。
vi /etc/fstab
更改/添加行:
tmpfs /dev/shm tmpfs defaults,size=1024m 0 0
然后重新加載配置:
mount -a
請記住,如果您稍后重新啟動docker容器,則可能必須再次執行'mount -a',因為它以容器上的默認設置~65 mb開始。
通常,失敗的配置將成功創建一個偵聽器,您必須在重新運行配置之前將其終止。
ps -aux | grep tnslsnr
kill {process identified in the step above}
因為這個頁面上的其他答案都沒有為我工作(Ubuntu),所以對這一個人來說已經沒有一整天了。
適當的說明在這里
其他教程缺少的主要技巧是執行
sed -i 's,/var/lock/subsys,/var/lock,' /etc/init.d/oracle-xe
之前
/etc/init.d/oracle-xe configure
檢查以下權限: /u01/
在我的情況下,這些設置為root:root
我將其更改為oracle:dba
,它對我oracle:dba
。
但在此之前我嘗試了以下內容:
/etc/hosts
設置IP/hostname
這兩個步驟對我沒有用,但是我卸載並重新安裝了oracle-xe,更改了權限,然后運行了configure命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.