Now change the oracle account password# groupadd dba # useradd -g dba -m oracle
You will be prompted for the New Password and Confirmation of that password.# passwd oracle
export ORACLE_BASE=/apps/oracle export ORACLE_HOME=$ORACLE_BASE/product/8.1.6 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export ORACLE_SID=ora816 export ORACLE_TERM=vt100 export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data umask 022
If you're installing on a machine with small disks that are likely to be upgraded, you can a symbolic link to access the database directory which will facilitate easy hardware changes or addition of new drives. For example:
As root, create the actual directory where the database will be stored:Now create the directory where Oracle "thinks" the database is:# mkdir -p /data/oradata/MyDatabase # chown -R oracle:dba /data # chmod -R 770 /data
Now you have a symbolic link, /MyDatabase/oradata which you will use to write to the database. If you need to change the location of the database later, you may copy the files to the new location, and change the symbolic link to point to the new location.# mkdir /MyDatabase # chown oracle:dba /MyDatabase # chmod 770 /MyDatabase # ln -s /data/oradata/MyDatabase /MyDatabase/oradata
Either double click on the runInstaller icon in your file manager (in /mnt/cdrom) or in a terminal in X Window, type /mnt/cdrom/runInstaller. The following headings correspond to the page headings in the Oracle Universal Installer.mount /dev/cdrom startx
Type dba
Click Next
Return to the pop-up window and click Retry.$ su # /apps/oracle/product/8.1.6/orainstRoot.sh
The script asks for the pathname of the local bin directory. You can accept the default of /usr/bin by just pressing [ENTER].cd $ORACLE_HOME su ./root.sh
The Net8 Configuration Assistant will close, and you'll be back to the Oracle Universal Installer.
| Tablespace Name | Size (Mb) |
|---|---|
| System | 200 |
| Index | 200 |
| Temporary | 150 |
| Rollback | 516 |
| Intermedia | 150 |
Also change the line the setting for open_cursors:nls_date_format = "YYYY-MM-DD"
open_cursors = 500
sqlora816.sh sets two environment variables before running the scripts, but these are already set in our profile, so we're safe to call the other scripts individually.
Edit sqlora816.sh and comment out the first script:
Now run this script manually from the prompt:#./ora816run.sh
If you can't hear the hard disk, you might think that svrmgr has crashed. You'll see a line with./ora816run.sh
2> 3> 4>...etc. and the cursor at the end. Get used to this lack of feedback :) All it will tell you is "Statement processed." and any errors.
It takes about a minute for this script to finish. Hopefully you'll get no error messages, in which case you can run the rest of the scripts with
Don't worry about the "does not exist" messages. It's just dropping objects before it creates them../sqlora816.sh
My machine took 1hr 22mins.
$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.6/bin/dbstart $ chmod 755 /ora8/m01/app/oracle/product/8.1.6/bin/dbstart
ora8:/ora8/m01/app/oracle/product/8.1.6:N
By the way, if you changed the service name or have multiple databases, the format of this file is
service_name:$ORACLE_HOME:Y || N (for
autoload)
ora8:/ora8/m01/app/oracle/product/8.1.6:Y
$ su - # cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i # chown root.root /etc/rc.d/init.d/oracle8i # chmod 700 /etc/rc.d/init.d/oracle8i
# /etc/rc.d/init.d/oracle8i stop Oracle 8i auto start/stop Shutting Oracle8i: Oracle Server Manager Release 3.1.6.0.0 - Production Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved. Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production With the Partitioning option JServer Release 8.1.6.0.0 - Production SVRMGR> Connected. SVRMGR> Database closed. Database dismounted. ORACLE instance shut down. SVRMGR> Server Manager complete. Database "ora8" shut down. # /etc/rc.d/init.d/oracle8i start Oracle 8i auto start/stop Starting Oracle8i: SQL*Plus: Release 8.1.6.0.0 - Production on Sat Jun 10 17:56:02 2000 (c) Copyright 1999 Oracle Corporation. All rights reserved. SQL> Connected to an idle instance. SQL> ORACLE instance started. Total System Global Area 85004272 bytes Fixed Size 69616 bytes Variable Size 76374016 bytes Database Buffers 8388608 bytes Redo Buffers 172032 bytes Database mounted. Database opened. SQL> Disconnected Database "ora8" warm started.
# cd /etc/rc.d/init.d/ # chkconfig --add oracle8i # chkconfig --list oracle8i ; You should see: oracle8i 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Download these three scripts into /tmp
Now issue the following commands (still as root).
# su - oracle # cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.6/bin/startlsnr $ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.6/bin/stoplsnr $ chmod 700 /ora8/m01/app/oracle/product/8.1.6/bin/startlsnr $ chmod 700 /ora8/m01/app/oracle/product/8.1.6/bin/stoplsnr $ exit ; You should now be back as root. # cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i # cd /etc/rc.d/init.d # chmod 700 listener8i
Test the listener automation by running the following commands and checking the output.
# ./listener8i stop Oracle 8i listener start/stop Shutting down Listener for 8i: LSNRCTL for Linux: Version 8.1.6.0.0 - Production on 10-JUN-2000 18:28:49 (c) Copyright 1998, 1999, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) The command completed successfully # ./listener8i start Oracle 8i listener start/stop Starting the Listener for 8i: LSNRCTL for Linux: Version 8.1.6.0.0 - Production on 10-JUN-2000 18:28:52 (c) Copyright 1998, 1999, Oracle Corporation. All rights reserved. Starting /ora8/m01/app/oracle/product/8.1.6/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 8.1.6.0.0 - Production System parameter file is /ora8/m01/app/oracle/product/8.1.6/network/admin/listener.ora Log messages written to /ora8/m01/app/oracle/product/8.1.6/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.1.6.0.0 - Production Start Date 10-JUN-2000 18:28:53 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /ora8/m01/app/oracle/product/8.1.6/network/admin/listener.ora Listener Log File /ora8/m01/app/oracle/product/8.1.6/network/log/listener.log Services Summary... PLSExtProc has 1 service handler(s) ora8 has 1 service handler(s) The command completed successfully
This test will verify that the listener is operating normally. Login into the database using the listener naming convention.
sqlplus username/password@SID
# su - oracle $ sqlplus system/alexisahunk@ora8 SQL> select sysdate from dual; SYSDATE ---------- 2000-06-10 SQL> exit $ exit #
Now run chkconfig on the listener8i script.
# cd /etc/rc.d/init.d/ # chkconfig --add listener8i # chkconfig --list listener8i listener8i 0:off 1:off 2:off 3:on 4:on 5:on 6:off
As a final test, reboot your computer and make sure Oracle comes up. You can do this by typing
Log back in and ensure that Oracle started automatically.# /sbin/shutdown -r -t 0 now
$ su - oracle $ sqlplus system/alexisahunk@ora8 SQL> exit