Oracle 10g + Redhat5,安裝使用一切正常,安裝用戶oracle。
今天用oracle用戶啟動sqlplus正常
[abc@rhel4 admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 23 12:11:25 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
但是,啟動listener的時候,報錯了:
[abc@rhel4 admin]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 23-APR-2009 12:13:06
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/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/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
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
通過日志錯誤信息可知,應該跟權限有關,最後發現了一個隱藏的信息,
/var/tmp/.oracle這個目錄比較特殊,如果oracle沒有對此目錄的操作權限的話,oracle用戶就無法進入/var/tmp/.oracle文件夾.
方法很簡單,執行:chmod 777 /var/tmp/.oracle
之後就ok了.