建立用户和目录
[iyunv@localhost /]# vi user.sh
groupadd dba
groupadd oinstall
useradd -g oinstall -g dba -m oracle
passwd oracle
[iyunv@localhost /]#chmod 700 user.sh
[iyunv@localhost /]# ./user.sh
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
手工启动和关闭数据库 [oracle@localhost ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 25 15:00:48 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 422670336 bytes
Fixed Size 1336960 bytes
Variable Size 281020800 bytes
Database Buffers 134217728 bytes
Redo Buffers 6094848 bytes
????????
????????(这里字符集有点问题)这个可以按照盖总的笔记操作解决这个问题
http://blog.csdn.net/yujin2010good/article/details/7235895(下面也有解决方法)
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL>
监听查看
[iyunv@localhost ~]# su - oracle
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUN-2012 15:07:11
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[oracle@localhost ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUN-2012 15:07:19
Copyright (c) 1991, 2009, Oracle. All rights reserved.
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is //u01/oracle/app/oracle/product/11.2/db/network/admin/listener.ora
Log messages written to /u01/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-JUN-2012 15:07:19
Uptime 0 days 0 hr. 0 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File //u01/oracle/app/oracle/product/11.2/db/network/admin/listener.ora
Listener Log File /u01/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUN-2012 15:07:57
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-JUN-2012 15:07:19
Uptime 0 days 0 hr. 0 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File //u01/oracle/app/oracle/product/11.2/db/network/admin/listener.ora
Listener Log File /u01/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost ~]$