(This document is a blatent rip-off of a more comprehensive version, by Jesus M. Salvo Jr., jmsalvo@ihug.com.au)
ln -s /apps/oracle/jre116_v5 /usr/local/jre chmod 777 /apps/oracle/jre116_v5
ORACLE_BASE=/apps/oracle ORACLE_HOME=$ORACLE_BASE/product/8.1.5 ORACLE_SID=ora815 ORACLE_PATH=$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$PATH:$ORACLE_PATH export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_PATH LD_LIBRARY_PATH
Run install/linux/runIns.sh on the RedHat CD in Gnome.
The following headings correspond to the page headings in the Oracle Universal Installer.
If the Oracle Universal Installer suddenly dies, the problem is probably too small a memory. Try doing the following:
If you happen to have applied the original 8.1.5.0.1 patch and noticed that sqlplus or svrmgrl still reports 8.1.5.0.0, that is because the relink failed due to missing library files. In my initial installations, I deselected all the Oracle options that are available for me to deselect. After applying the patch, a look at the error log (if you did made one) will show:
/usr/bin/ld: Cannot open -lordsdo8: No such file or directory
ORA-12545 Connect failed because target host or object does not exist.
JNLS Exception:oracle.ntp.jnls.JNLSException Unable to find anyNational Character Sets. Please check your Oracle installation.
When you run the first script, named SIDrun.sh, it would have started the instance and created the SYSTEM datafile and tablespace, the control files, and the redo log files. Run the other scripts, named SIDrun1.sh and SIDrun2.sh. My machine took 55mins with no errors. DONT WORRY ABOUT THINGS NOT EXISTING WHIZZING UP THE SCREEN - IT'S DROPPING THINGS BEFORE IT CREATES THEM.
So you need to update your init.ora file located in $ORACLE_BASE/admin/pfile and uncomment the line # rollback_segments = ...
ORCL:/home/oracle/app/oracle/product/8.1.5:Y
#!/bin/sh # Set ORA_HOME to be equivalent to the ORACLE_HOME # from which you wish to execute dbstart and # dbshut # set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME ORA_HOME=/home/oracle/app/oracle/product/8.1.5 ORA_OWNER=oracle case "$1" in start) # Start the Oracle databases: # The following command assumes that the oracle login will not prompt the # user for any values echo -n "Starting Oracle8i: " su - $ORA_OWNER -c $ORA_HOME/bin/dbstart touch /var/lock/subsys/oracle8i echo ;; stop) # Stop the Oracle databases: # The following command assumes that the oracle login will not prompt the # user for any values echo -n "Shutting down Oracle8i: " su - $ORA_OWNER -c $ORA_HOME/bin/dbshut rm -f /var/lock/subsys/oracle8i echo ;; restart) # Restart the Oracle databases: echo -n "Retarting Oracle8i: " $0 stop $0 start echo ;; *) echo "Usage: oracle8i { start | stop | restart }" exit 1 esac exit 0
chmod u+x oracle8i ./oracle8i stop ./oracle8i start ./oracle8i restart ./oracle8i invalid-parameter
ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc0.d/K10oracle8i ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc6.d/K10oracle8i
ln -s /etc/rc.d/init.d/oracle8i /etc/rc.d/rc3.d/S99oracle8i
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = linuxbox)(PORT = 1521)) (PROTOCOL_STACK = (PRESENTATION = TTC) (SESSION = NS) ) )
Time to test that the listener starts. Startup the listener by typing:
lsnrctl start
LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 05-JAN-00 18:13:35 (c) Copyright 1998 Oracle Corporation. All rights reserved. Starting /apps/oracle/product/8.1.5/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 8.1.5.0.0 - Production System parameter file is /apps/oracle/product/8.1.5/network/admin/listener.ora Log messages written to /apps/oracle/product/8.1.5/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxbox)(PORT=1521))(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linuxbox)(PORT=1521))(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.1.5.0.0 - Production Start Date 05-JAN-00 18:13:35 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /apps/oracle/product/8.1.5/network/admin/listener.ora Listener Log File /apps/oracle/product/8.1.5/network/log/listener.log The listener supports no services The command completed successfully
You will notice that the listener is configured to listen for the TCP protocol on port 1521.
ORCL.COMPANY.COM.AU = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = orcl.company.com.au) ) )
NAMES.PREFERRED_SERVERS = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dbhost)(PORT = 1575)) ) NAMES.DEFAULT_DOMAIN = company.com.au SQLNET.EXPIRE_TIME = 0 NAMES.DIRECTORY_PATH= (TNSNAMES) SQLNET.CRYPTO_SEED = 4fhfguweotcadsfdsafjkdsfqp5f201p45mxskdlfdasf
Purpose: Specifies the characters used when generating cryptographic keys. The more random the characters are, the stronger the keys are. This is required whenever encryption or checksumming is turned on. The string should be 10-70 random characters.
Default: qwertyuiopasdfghjkl;zxcvbnm,.s1 Example: sqlnet.crypto_seed="qwertyuiopasdfghjkl;zxcvbnm,.s1"
LSNRCTL for Linux: Version 8.1.5.0.0 - Production on 06-JAN-00 11:04:45 (c) Copyright 1998 Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost.company.com.au)(PORT=1521))(PROTOCOL_STACK=(PRESENTATION=TTC)(SESSION=NS))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.1.5.0.0 - Production Start Date 06-JAN-00 11:03:45 Uptime 0 days 0 hr. 0 min. 59 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/8.1.5/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/product/8.1.5/network/log/listener.log Services Summary... ORCL has 1 service handler(s) The command completed successfully
ORCL has 1 service handler(s)
The listener supports no services
tnsping orcl tnsping orcl.company.com.au
TNS Ping Utility for Linux: Version 8.1.5.0.0 - Production on 06-JAN-00 11:20:26 (c) Copyright 1997 Oracle Corporation. All rights reserved. Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1521)) OK (10 msec)
Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1521))
tnsping orcl
tnsping orcl.
Keep in mind that because we have NAMES.DIRECTORY_PATH= (TNSNAMES) in sqlnet.ora, we are indeed testing Net8 using the local naming method. All clients that will connect to the database using local naming method needs a sqlnet.ora and tnsnames.ora file.
If you are content with using local naming method, then you may want to skip to "Configuring the Listener for IIOP Connections". If you are not interested in IIOP connections, then skip to "Automating Startup and Shutdown of Listener". If you are interested in setting Oracle Names Server (you paid for it), read on.
In here, I made use of a DNS server (BIND) to resolve the service name to an IP address. I assume that your DNS server must be already working. Here are the steps that I did to make this work:
DIRECTORY_PATH = (HOSTNAME)
orcl CNAME ns
/etc/rc.d/init.d/named restart
Server: localhost Address: 127.0.0.1 Name: ns.company.com.au Address: 192.168.0.1 Aliases: orcl.company.com.au
tnsping netservice tnsping netservice.company.com.au
Keep in mind that tnsping will only test the connection to the listener, not the database or instance itself. So we need to do an actual connection to the database using sqlplus. On the same machine where the listener and database is running, try each of the following:
This one works.
Replace netservice with your net service name. This one does not work for me. I get a:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor
16-FEB-00 12:13:49 * (CONNECT_DATA=(SID=*)(SERVICE_NAME=orcl.)(CID=(PROGRAM=)(HOST=dbhost.company.com.au)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.1)(PORT=4899)) * establish * orcl. * 12514 TNS-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor
Note that it appended a dot after the service name, instead of qualifying the service name with the domain name. This tells us that the above sqlplus did connect to the listener, but failed to 'find' the database whose service name is "orcl.".
Replace netservice with your net service name. This one works.
Try the above tests on a separate machine, making sure the separate machine knows where to find the DNS server. Both tnsping should work okay, but the results of sqlplus are different (at least in my case). On a separate machine, only the third sqlplus works.
I avoided this configuration and instead used Oracle Naming Method, as all three sqlplus works.
Try running tnsping from the same machine where Oracle Names Server is running, as we have already configured the configuration files. Then on another machine, to make sure you are using Oracle Names Server to resolve service names to network addresses, make sure you only have ONAMES in NAMES.DIRECTORY_PATH of your sqlnet.ora file.
Then do a tnsping orcl and sqlplus system/manager@orcl. Of course, replace orcl with the name that you have given to your net service name. To prove that it is actually using Oracle Names Server, try renaming tnsnames.ora on the client machine to something else, then run tnsping and sqlplus again. If you are satisfied, then you can delete tnsnames.ora from the client machine.
Keep in mind that once we are using only Oracle Names Server (as specified in the NAMES.DIRECTORY_PATH), then you need a Names Server up and running to be able to resolve net service names to network addresses and connect to the database from client machines. Of course, this excludes the BEQ protocol.
You can also use tcpdump and listen for network connections to port 1575.
#!/bin/sh # Start the oracle listener. export ORACLE_HOME=/home/oracle/app/oracle/product/8.1.5 export LD_LIBRARY_PATH=$ORACLE_HOME/lib $ORACLE_HOME/bin/lsnrctl <<EOF start EOF
Replace the value of $ORACLE_HOME with your own corresponding value. Then do a chmod +x startlsnr.
!/bin/sh # Stop the oracle listener export ORACLE_HOME=/home/oracle/app/oracle/product/8.1.5 export LD_LIBRARY_PATH=$ORACLE_HOME/lib $ORACLE_HOME/bin/lsnrctl <<EOF stop EOF
Replace the value of $ORACLE_HOME with your own corresponding value. Then do a chmod +x stoplsnr.
#!/bin/sh # # startup and shutdown the Oracle 8i listener ORA_OWNER=oracle ORA_HOME=/home/oracle/app/oracle/product/8.1.5 case "$1" in 'start') # Start the listener echo -n "Starting Listener for 8i: " su - $ORA_OWNER -c $ORA_HOME/bin/startlsnr touch /var/lock/subsys/listener8i echo ;; 'stop') # Stop the listener echo -n "Shutting down Listener for 8i: " su - $ORA_OWNER -c $ORA_HOME/bin/stoplsnr rm -f /var/lock/subsys/listener8i echo ;; 'restart') # Restart the Oracle databases: echo -n "Retarting Listener for 8i: " $0 stop $0 start echo ;; *) echo "Usage: listener8i { start | stop | restart }" exit 1 esac exit 0
ln -s /etc/rc.d/init.d/listener8i /etc/rc.d/rc0.d/K10listener8i ln -s /etc/rc.d/init.d/listener8i /etc/rc.d/rc6.d/K10listener8i
ln -s /etc/rc.d/init.d/listener8i /etc/rc.d/rc3.d/S99listener8i