我在ubuntu 10.x上安装了oracle 10g,这是我第一次安装。 安装后我试着用下面的命令启动它。
tsegay@server-name:/u01/app/oracle/product/10.2.0/db_1/bin$ lsnrctl LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-DEC-2010 22:46:51 Copyright (c) 1991, 2005, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> start Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) TNS-12555: TNS:permission denied TNS-12560: TNS:protocol adapter error TNS-00525: Insufficient privilege for operation Linux Error: 1: Operation not permitted Listener failed to start. See the error message(s) above...
我的listener.ora文件看起来像这样:
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = acct-vmserver)(PORT = 1521)) ) )
我可以猜测问题是与权限问题,但我不知道我必须做什么权限的变化。
任何帮助表示赞赏…
编辑##
当我用sudo命令运行时,我得到了这个
tsegay@server-name:/u01/app/oracle/product/10.2.0/db_1$ sudo ./bin/lsnrctl start LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-DEC-2010 01:01:03 Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting ./bin/tnslsnr: please wait... ./bin/tnslsnr: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory TNS-12547: TNS:lost contact TNS-12560: TNS:protocol adapter error TNS-00517: Lost contact Linux Error: 32: Broken pipe
监听器必须使用与安装Oracle相同的帐户启动。 通常,这个帐户被命名为“oracle”。
使用sudo命令行应该是:
sudo -H -u oracle /u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start
(顺便说一下,我不认为使用Ubuntu来运行Oracle数据库是由Oracle支持的)
您的LD_LIBRARY_PATH是否设置为包含Oracle库目录?
你完成安装后是否运行了root.sh脚本?
在一个涉及许多makefile修复的Lubuntu 11.10 x86_64上安装Oracle DB 11.2.0.1 ,Linux x86-64,经过了一段痛苦的过程之后,
su - oracle export ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1" export LD_LIBRARY_PATH="${ORACLE_HOME}/lib" export PATH="${ORACLE_HOME}/bin:${PATH}" dbstart启动数据库,监听器应该自动启动 lsnrctl status来validation它确实在监听 最好将这3个输出永久保存在oracle的.bashrc文件中。
如果侦听器状态仍然不正常,请确保oracle用户是networking允许组的成员,如果是Lubuntu,则是netdev组。 您可以在系统工具>用户和组> oracle>高级设置>用户权限>连接到无线和以太网networking中进行设置 。 或者,也可以使用pipe理帐户发出sudo usermod -aG netdev oracle ,在你的情况下使用tsegay 。 记得为oracle用户启动一个新的shell(或注销+login)来查看更改。
PS:我的listener.ora是这样的:
LISTENER = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = localhost) (PORT = 1521) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = PLSExtProc) (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) ) )
你可以尝试sudo lsnrctl ,假设你有足够的权利。