|Previous: Installing Red Hat Linux 6.2|
Installing Oracle 8.1.6
|Next: Installing AOLServer 3.0|
Oracle is the RDBMS utilized by the ArsDigita Community System. If you have trouble installing it, please refer to Oracle's documentation.
You can obtain the software through a variety of methods.
Note that the Oracle tarball that you will download is huge (> 250Mb).
$ cd /directory/where/oracle/is $ tar -xzvf oracle8161_tar.gz
Throughout these instructions, we will refer to a number of configurable settings. We will advise certain defaults. With the exception of passwords, we advise you to follow these defaults unless you know what you are doing. Subsequent documents will expect that you used the defaults, so a change made here will necessitate further changes later. For a guide to the defaults, please see Appendix 3.
Though Oracle 8.1.6 has an automated installer, we still need to
perform several manual, administrative tasks before we can launch
it. You must perform all of these steps as the root user.
We recommend entering the X window system as a user other than
root and then doing a
su -. This command gives
you full root access.
$ su - ; Enter the root password when prompted. #
We need to create a user oracle, which is used to install the product, as well as starting and stopping the database.
# groupadd dba # groupadd oinstall # groupadd oracle # useradd -g dba -G oinstall,oracle -m oracleNow change the oracle account password
# passwd oracleYou will be prompted for the New Password and Confirmation of that password.
While Oracle can reside in a variety of places in the file system, ArsDigita has adopted '/ora8' as the base directory.
Note: the oracle install needs about 1 Gb free on '/ora8' to install successfully.
# mkdir /ora8 # cd /ora8 # mkdir -p m01 m02 m03/oradata/ora8 # chown -R oracle.dba /ora8 # exit ; Logs out.
In the same terminal window, type the following.
$ su - oracle ; Enter oracle's password
$ emacs ~oracle/.bash_profileYou may get this error:
Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server emacs: Cannot connect to X server :0. Check the DISPLAY environment variable or use `-d'. Also use the `xhost' program to verify that it is set to permit connections from your machine.If so, do the following.
Open a new terminal window. $ xhost +localhost Now, back in the oracle terminal $ export DISPLAY=localhost:0 $ emacs ~oracle/.bash_profileTry this procedure anytime you get an Xlib connection refused error.
export ORACLE_BASE=/ora8/m01/app/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=ora8 export ORACLE_TERM=vt100 export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data umask 022Save the file by typing
CTRL-X CTRL-Sand then exit by typing
CTRL-X CTRL-C. Alternatively, use the menus.
# NLS_LANG=american # export NLS_LANGThese lines will change the Oracle date settings and will break the ArsDigita Community System (ACS) because ACS depends on the ANSI date format, YYYY-MM-DD dates.
$ su - oracle $ env | grep ORACLEIf it worked, you should see:
ORACLE_SID=ora8 ORACLE_BASE=/ora8/m01/app/oracle ORACLE_TERM=vt100 ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.6If not, try adding the files to
~oracle/.bashrc. Then logout and log back in again. Also, be certain you are doing
su -and not just
.bash_profilewill be evaluated.
Make sure that /bin, /usr/bin, and /usr/local/bin are in your path by typing:
$ echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.6/binIf they are not, then add them to the .bash_profile by changing the PATH statement above to PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin).
Start a new terminal $ xhost +localhost $ su - oracle Enter oracle password $ export DISPLAY=localhost:0.0
$ su - root # mount -t iso9660 /dev/cdrom /mnt/cdrom # exit $ cd /mnt/cdrom
$ cd /where/oracle/archive/is/Oracle8iR2
$ ls doc index.htm install runInstaller stage starterdbIf you don't see
runInstalleryou are in the wrong directory.
If the destination is not correct it is because your
environment variables are not set properly. Make
sure you logged on as oracle using
oracle. If so, edit the
~oracle/.bash_profile as you did in the pre-installation
$ su # cd /ora8/m01/app/oracle/product/8.1.6 # ./orainstRoot.sh ; You should see: Creating Oracle Inventory pointer file (/etc/oraInst.loc) Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall. # exit $ exit
$ su - Enter root password # /ora8/m01/app/oracle/product/8.1.6/root.sh ; You should see the following. Creating Oracle Inventory pointer file (/etc/oraInst.loc) Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall. # /ora8/m01/app/oracle/product/8.1.6/root.sh Running Oracle8 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /ora8/m01/app/oracle/product/8.1.6 ORACLE_SID= ora8 Enter the full pathname of the local bin directory: [/usr/local/bin]: Press ENTER here to accept default of /usr/local/bin Creating /etc/oratab file... Entry will be added to the /etc/oratab file by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. IMPORTANT NOTE: Please delete any log and trace files previously created by the Oracle Enterprise Manager Intelligent Agent. These files may be found in the directories you use for storing other Net8 log and trace files. If such files exist, the OEM IA may not restart.
# exit $ exit
$ xhost +localhost $ su - oracle ; Enter oracle password $ export DISPLAY=localhost:0 $ dbassist
$ORACLE_HOME/dbsand the name of the script is usually
initSID.orawhere SID is the SID of your database. Assuming your $ORACLE_HOME matches our default of
/ora8/m01/app/oracle/product/8.1.6, the following will open the file for editing.
$ emacs /ora8/m01/app/oracle/product/8.1.6/dbs/initora8.ora
nls_date_format = "YYYY-MM-DD"
open_cursorsline in the file. If you're using
emacsscroll up to the top of the buffer and do
open_cursorsto find the line. The default is 100. Change it to 500.
open_cursors = 500
CTRL-X CTRL-Sto save followed by
CTRL-X CTRL-Cto exit or use the menu.
CRTL-ALT-BACKSPACE, but make sure you have saved any files you were editing. You should now be returned to a text shell prompt. If you get sent to a graphical login screen instead, switch to a virtual console by doing
CRTL-ALT-F1. Then login as oracle.
$ cd /ora8/m01/app/oracle/product/8.1.6/assistants/dbca/jlib $ ./sqlora8.sh
Eventually, you'll be returned to your shell prompt. In the meantime, relax, you've earned it.
$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
$ sqlplus system/managerSQL*Plus should startup. If you get an
ORA-01034: Oracle not Availableerror, it is because your Oracle instance is not running. You can manually start it as the
$ svrmgrl SVRMGR> connect internal SVRMGR> startup
SQL> alter user system identified by alexisahunk; SQL> alter user sys identified by alexisahunk; SQL> alter user ctxsys identified by alexisahunk;
SQL> select sysdate from dual;If you don't see a date that fits the format
YYYY-MM-DD, please read this section..
SQL> @ /tmp/acceptance.sql ; A bunch of lines will scroll by. You'll know if the test worked if ; you see this at the end: SYSDATE ---------- 2000-06-10 SQL>If there were no errors, then consider yourself fortunate. Your Oracle installation is working.
$ 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
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)
$ 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 126.96.36.199.0 - Production Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved. Oracle8i Enterprise Edition Release 188.8.131.52.0 - Production With the Partitioning option JServer Release 184.108.40.206.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 220.127.116.11.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 18.104.22.168.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 22.214.171.124.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 126.96.36.199.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 188.8.131.52.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.
# su - oracle $ sqlplus system/alexisahunk@ora8 SQL> select sysdate from dual; SYSDATE ---------- 2000-06-10 SQL> exit $ exit #
chkconfig on the
# 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
# /sbin/shutdown -r -t 0 nowLog b ack in and ensure that Oracle started automatically.
$ su - oracle $ sqlplus system/alexisahunk@ora8 SQL> exit
Oracle has an internal representation for storing the data based on the number of seconds elapsed since some date. However, for the purposes of inputing dates into Oracle and getting them back out, Oracle needs to be told to use a specific date format. By default, it uses an Oracle-specific format which isn't copacetic. You want Oracle to use the ANSI-compliant date format which is of form 'YYYY-MM-DD'.
To fix this, you should include the following line in
$ORACLE_HOME/dbs/initSID.ora or for the default
nls_date_format = "YYYY-MM-DD"You test whether this solved the problem by firing up sqlplus and typing
SQL> select sysdate from dual;You should see back a date like
2000-06-02. If some of the date is chopped off, i.e. like
2000-06-0, everything is still fine. The problem here is that sqlplus is simply truncating the output. You can fix this by typing
SQL> column sysdate format a15 SQL> select sysdate from dual;If the date does not conform to this format, double-check that you included the necessary line in the init scripts. If it still isn't working make sure that you have restarted the database since adding the line if you didn't do it prior to database creation.
If you're sure that you have restarted the database since adding the line, check your initialization scripts. Make sure that the following line is not included
export nls_lang = americanSetting this environment variable will override the date setting. Either delete this line and login again or add the following entry to your login scripts after the
export nls_date_format = 'YYYY-MM-DD'Log back in again. If adding the
nls_date_formatline doesn't help, then let me know about it. TOP
$ sqlplus system/changeme
SQL> drop user oracle_user_name cascade;
SQL> drop tablespace table_space_name including contents cascade constraints;
|ORACLE_HOME||/ora8/m01/app/oracle/product/8.1.6||This is the default Oracle installation directory.|
|ORACLE_SERVICE||ora8||The service name is a domain-qualified identifier for your Oracle server.|
|ORACLE_SID||ora8||This is an identifier for your Oracle server.|
|ORACLE_OWNER||oracle||The user who owns all of the oracle files.|
|ORACLE_GROUP||dba||The special oracle group. Users in the
dba group are authorized to do a |
|Previous: Installing Red Hat Linux 6.2||Installing Oracle 8.1.6
part of the ACS Installation Guide
|Next: Installing AOLServer 3.0|