This article refers to the different versions of the information on the web, and then their own in the cent0s6.3 x86 and x64 two virtual environments are completed, the installation is the corresponding system of Oracle 11gx86 and x64 two versions, basic to meet the Oracle service start-up requirements.
But there are a few small problems, limited capacity:
1. Start or close the service newspaper has this prompt, but does not affect the service startup, the port can open normally, Oracle remote also can connect.
[ROOT@ORCL ~]# service Oracle Restart Shutdown oracle:environment variable oracle_unqname not defined.
Please set Oracle_unqname to database unique name. Processing Database instance "ORCL": Log file/home/oracle/app/oracle/product/11.2.0/dbhome_1/shutdown.log Lsnrctl For Linux:version 11.2.0.1.0-production on 12-jan-2013 08:51:27 Copyright (c) 1991, 2009, Oracle.
All rights reserved. Connecting to (description= address= (protocol=tcp) (host=orcl.com) (port=1521)) Tns-12541:tns:no Listener: Tns:protocol Adapter Error Tns-00511:no listener Linux Error:111:connection refused OK starting oracle:proces Sing Database instance "ORCL": Log file/home/oracle/app/oracle/product/11.2.0/dbhome_1/startup.log Lsnrctl for Lin Ux:version 11.2.0.1.0-production on 12-jan-2013 08:51:34 Copyright (c) 1991, 2009, Oracle.
All rights reserved. Tns-01106:listener using Listener name Listener has already been started EnvironmENT variable oracle_unqname not defined.
Please set Oracle_unqname to database unique name. OK
The problem has been solved, as detailed in http://showerlee.blog.51cto.com/2047005/1125849
2. When you switch to Oracle and restart Oracle service, you will be prompted to enter a password to confirm that you have entered the root password to start normally.
[ROOT@ORCL rc5.d]# su Oracle
[oracle@orcl rc5.d]$/etc/init.d/oracle Restart Shutdown
Oracle: Password:
Look at the answer, I am a beginner Linux, I hope that a master can help guide.
--------------Gorgeous split Line-------------------
Note: First you need to modify the Oracle and root environment variables
VI ~/.bash_profle
Add the following:
Umask 022
Export Oracle_base=/home/oracle/app
Export Oracle_home= $ORACLE _base/oracle/product/11.2.0/dbhome_1
Export ORACLE_SID=ORCL
Export Oracle_unqname= $ORACLE _sid
Export path= $PATH: $HOME/bin: $ORACLE _home/bin
Export Ld_library_path= $ORACLE _home/lib:/usr/lib
First, use the root user to modify the/etc/oratab file:
$ vi/etc/oratab
Orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:n
To
Orcl:/home/oracle/app/oracle/product/11.2.0/dbhome_1:y
Which is to change the last N to Y.
Ii. modify $oracle_home/bin/dbstart files using ORACLE users:
# su-oracle
$ cd $ORACLE _home/bin
$ VI Dbstart
Find oracle_home_listner= ... This line, modified into
oracle_home_listner= $ORACLE _home
Similarly modify Dbshut
VI Dbshut
oracle_home_listner= $ORACLE _home
Note: Modify, not increase, but use VI search function to find:
Oracle_home_listner, then make modifications, save after modification
Third, test run Dbshut, Dbstart see whether can start Oracle Service and Listener service:
Shut down, or you may get an error at startup, prompting Dbstart or Dbshut permissions.
1. Modify the permissions of the Dbstart and Dbshut log files:
$su-root
#cd $ORACLE _home
#chown Oracle:oinstall $ORACLE _home/startup.log
#chown Oracle:oinstall $ORACLE _home/shutdown.log
#chown Oracle:oinstall $ORACLE _home/listener.log
2. Execute the corresponding script to test (optional)
#su-oracle
$CD $ORACLE _home/bin
$./dbstart (./dbshut)
$ PS-EFW | grep Ora_
$ LSNRCTL Status
$ PS-EFW | grep LISTEN | Grep-v grep
Four: Create a service
$su-root
# cd/etc/rc.d/init.d/
# VI Oracle
-----Script-----
#!/bin/bash
# chkconfig:345 99 10
# Description:startup Script for Oracle Databases
#/etc/rc.d/init.d/oracle
Export Oracle_base=/home/oracle/app
Export Oracle_home= $ORACLE _base/oracle/product/11.2.0/dbhome_1
Export ORACLE_SID=ORCL
Export Oracle_unqname= $ORACLE _sid
Export path= $PATH: $HOME/bin: $ORACLE _home/bin
Ora_ownr= "Oracle"
# If the executables does not exist--display error
if [!-F $ORACLE _home/bin/dbstart-o!-D $ORACLE _home]
Then
echo "Oracle startup:cannot start"
Exit 1
Fi
# depending on parameter--startup, shutdown, restart
# of the instance and listener or usage display
Case "$" in
Start
# Oracle Listener and instance startup
Echo-n "Starting Oracle:"
su-$ORA _ownr-c "$ORACLE _home/bin/dbstart"
su-$ORA _ownr-c "$ORACLE _home/bin/lsnrctl start"
Touch/var/lock/oracle
su-$ORA _ownr-c "$ORACLE _home/bin/emctl start Dbconsole"
#su-$ORA _ownr-c "$ORACLE _home/bin/isqlplusctrl start"
echo "OK"
;;
Stop
# Oracle Listener and instance shutdown
Echo-n "Shutdown Oracle:"
su-$ORA _ownr-c "$ORACLE _home/bin/emctl stop Dbconsole"
#su-$ORA _ownr-c "$ORACLE _home/bin/isqlplusctrl Stop"
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/