Install oracle in linux environment record

问题1 xhostunable to open display

Solution:

In the open terminal linux native virtual machine, execute

[root@bogon ~]# DISPLAY=:0.0;export DISPLAY

[root@bogon ~]# echo %$DISPLAY

[root@bogon ~]# xhost +

Use as few commands can be solved.

Issue 2 ORACLE installation interface dbca interface netca interface Chinese characters can not be displayed 

solution:

In the current interface directly execute the command "export LANG = en_US"

The following operations or steps:

(1) to see if there is installed the JDK , use the command: the Java -version

[root@localhost ~]# java -version

java version "1.7.0_51"

OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)

OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

(2) installed jdk , find jdk installation path

[root@localhost ~]# which java

/usr/bin/java

[root@localhost ~]#  ls -lrt /usr/bin/java

lrwxrwxrwx. 1 root root 22 Jul  3 17:38 /usr/bin/java -> /etc/alternatives/java

[root@localhost ~]#  ls -lrt /etc/alternatives/java

lrwxrwxrwx. 1 root root 72 Jul  3 17:38 /etc/alternatives/java -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java

( 3 ) Configuration JDK runtime environment

With root , on the console input account login: vi / etc / Profile , content in the final input file the following

JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64

JRE=JAVA_HOME/jre

PATH=$JAVA_HOME/bin:$PATH

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME JRE CLASSPATH PATH

Edited successfully saved, type in console : Source / etc / Profile , making parameter file to take effect, the configuration is successful

In the console input: the Java -version , the output of the latest JAVA version

( 4 ) Set DBCA startup parameters

Change directory: CD / SYN / Oracle / Product / 12c / bin

Edit dbca file: vi dbca

Found in the file JRE_DIR = / syn / oracle / product / 12c / jdk / jre

Read:

#JRE_DIR=/opt/oracle/product/10.2.0/Db_1/jdk/jre

JRE_DIR=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre

In the console input DBCA , start interface installed database has been successfully changed to show the Chinese

( 5 ) disposed netca startup parameters

Change directory: CD / SYN / Oracle / Product / 12c / bin

Edit netca file: vi netca

Found in the file JRE_DIR = / the SYN / the Oracle / Product / 12c / the JDK / jre , read:

JRE_DIR=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64/jre

In the console input netca , start interface installed database has been successfully changed to show the Chinese

Problem 3 ORA-01081 --- starting a database error ORA-01081

SQL>shutdown immediate    关闭

SQL>startup                重新开启就可以了

问题4 ORA-01078-启动数据库报错ORA-01078

SQL>startup

ORA-01078failure in processing system parameters

LRM-00109: could not open parameter file ‘/syn/oracle/product/12c/dbs/***.ora’

 解决方案

(1)查看dbs目录下是否有00109所描述的ora文件:

切换目录:cd  /syn/oracle/product/12c/dbs

ls查看目录下的文件,发现在 /syn/oracle/product/12c/dbs/下找不到initepps.ora文件

(2)于是去/syn/oracle/admin/syntong/pfile下,找到文件init.ora.6420171482,然后将文件拷贝到/syn/oracle/product/12c/dbs/目录下,并重命名为***.ora后,重启数据库,问题解决

问题5 ORA-01102 报错解决方法

SQL> startup

ORACLE instance started.

Total System Global Area  599785472 bytes

Fixed Size              2022600 bytes

Variable Size           171967288 bytes

Database Buffers        419430400 bytes

Redo Buffers           6365184 bytes

ORA-01102: cannot mount database in EXCLUSIVE mode

这个错误主要是lk<SID>文件造成的,该文件位于ORALCE_HOME下的dbs目录下

这个lk<SID>的主要作用是说明DATABASE MOUNT上了不用在MOUNT。DATABASE UNMOUNT 后会删除掉如果DATABASE确实没有MOUNT这个文件在,即已MOUNT只有手工删除所以一定要小心

 解决方案:

具体解决ORA-01102问题的步骤

# /sbin/fuser -u lkSYNTONG

lkSYNTONG: 4918(oracle) 20726(oracle) 20728(oracle) 20730(oracle) 20732(oracle) 20734(oracle)

该文件没释放,用fuser命令kill掉:

# /sbin/fuser -k lkSYNTONG

lkSYNTONG: 6666 6668 6670 6672 6674 6676 6678 6680 6690 6692 6694 6696 6737 6830

# /sbin/fuser -u lkSYNTONG

然后:

SQL> startup

ORACLE instance started.

Total System Global Area  599785472 bytes

Fixed Size                2022600 bytes

Variable Size            171967288 bytes

Database Buffers         419430400 bytes

Redo Buffers              6365184 bytes

Database mounted.

Database opened.

SQL>

数据库成功OPEN.

问题6 连接数据库报错ORA-0103427101

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist

 解决方案

查看ORACLE_SID:echo $ORACLE_SID;

执行命令:export ORACLE_SID=syntong

然后启动数据库,再尝试连接,问题就解决了

问题7 ORA-12170 TNS--远程连接数据库报ORA-12170 TNS:连接超时

错误检查:检查服务器配置正常,监听正常,服务正常,远程可以ping通服务器。

这里主要是防火墙问题,解决办法:

关闭防火墙;

Linux7关闭防火墙的命令是:

临时关闭防火墙,服务器重启后防火墙会自动启动:systemctl stop firewalld

永久关闭防火墙,服务器重启后防火墙不会启动:systemctl disable firewalld

查看防火墙状态的命令:systemctl status firewalld

问题8 出现找不到命令的提示

 解决方案:

先执行source .bash_profile命令,再操作。

问题9安装oracle,执行./runInstaller,提示INS-06101

安装Oracle 11gR2,报错:[INS-06101] IP address of localhost could not be determined

[INS-06101] 无法确定本地主机的 IP 地址

出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了。 

查看主机名和和ip 地址关系:

查看/etc/sysconfig/network ,如下图所示,bogon即为主机名。

 

查看/etc/hosts,如下图所示,为修改后的文件内容。

注:如上/etc/sysconfig/network/etc/hosts 两个文件中的bogon为主机名。查看主机名的命令是:hostname,如下图所示。

 

问题10 Oracle启动监听提示:The listener supports no services

1)解决办法:

终端root执行xhost +加载图形界面。Oracle用户执行netmgr进行Oracle Net Manager配置

[oracle@bogon ~]$ netmgr

Oracle Net Manager修改配置,Listeners->Database Services中配置要监听的SIDORACLE_HOME,退出保存。

(本次配置信息为:

Global Database Name: SYNTONG

Oracle Home Directory:/syn/oracle/product/11.2.0

SID:SYNTONG

2)若使用上述(1)的办法后,问题仍存在,则按照第9个问题的步骤检查查看主机名和和ip 地址关系。配置正确后再启动监听。

问题11启动数据库提示ORA-00119、ORA-00132

SQL> startup;

ORA-00119: invalid specification for system parameter LOCAL_LISTENER

ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'

解决办法:

1、执行如下命令

SQL> create pfile from spfile='/syn/oracle/product/11.2.0/dbs/spfilesyntong.ora';

说明:/syn/oracle/product/11.2.0/dbs这个路径是Oracle安装路径里的,改成自己的路径。

第一步之后在/syn/oracle/product/11.2.0/dbs路径里找到init<你的数据库name>.ora文件,我的数据库namesyntong,所以我的文件名是initsyntong.ora,打开修改找到local_listener这行,修改为

*.local_listener='SYNTONG'

(LISTENER_SYNTONG改为了SYNTONG)

2、执行如下命令

SQL> create spfile from pfile='/syn/oracle/product/11.2.0/dbs/initsyntong.ora';

说明:/syn/oracle/product/11.2.0/dbs这个路径是Oracle安装路径里的,改成自己的路径

3启动数据库,可成功启动

Guess you like

Origin www.cnblogs.com/Noul/p/11307994.html