Install Oracle on Solaris 8/9

来源:互联网 发布:淘宝运营kpi考核指标 编辑:程序博客网 时间:2024/05/22 09:48

This information is for Oracle 8.1.7 on a Solaris 8 OE. But It works for the other versions of Oracle and Sparc Architecture of Solaris including 64-Bit Editions.

So, Let's move to finish the job.

Meanwhile, go to kitchen and have a cola. If you have not got Aspirin with you, find at least one tablet from elsewhere or call your doctor now.

You will possibly need after sometimes... :)))

PRE-INSTALLATION TASKS

TASKS TO PERFORM BY ROOT

1-) Open "/etc/system" file by using a preferrable text editor utility for yourself.

2-) Insert the following rows at the bottom of "/etc/system" file:

CAUTION : These values are for a computer with 512 MB. RAM. You need to change these values according to your computer's physical RAM. While you create a database select 5 as "maximum concurrent connection". Otherwise you will recevive an "Oracle not available" or "not connected to Oracle" error. You will need a good luck... :)))

set shmsys:shminfo_shmmax=4192000000set shmsys:shminfo_shmmin=128000000set shmsys:shminfo_shmmni=200set shmsys:shminfo_shmseg=20set semsys:seminfo_semmni=200set semsys:seminfo_semmsl=200set semsys:seminfo_semmns=200set semsys:seminfo_semopm=200set semsys:seminfo_semvmx=32768

Click here for a sample of "/etc/system" file.

These settings are for your Operating Environment's Kernel. Oracle Database needs you to make these modifications to run properly. You may need to edit these values according to your computer's RAM. Please refer to your "System Manufacturer's Assistance" and documentation.

3-) Reboot your system to activate the new kernel parameters. When your computer is restarted, you can check the amount of "Maximum Shared Memory" and "Minimum Shared Memory" by the command;

sysdef

This will give the important values about your system. You can see the "Shared Memory Area" section at the bottom of the listing.

4-) Open a terminal window as root. Type

admintool

and press ENTER to run administration tool.

You need at least one user and two groups to install and run Oracle Database. First let's create the UNIX groups, then let's create a UNIX user account by using admintool. Make following step by step:

  • Create a group named "oinstall"
  • Create a group named "dba"
  • Create a UNIX user and use these settings (This user will called Oracle User in this document and used "oracle" as a sample):
username oracle Primary Group dba Secondary Groups oinstall Login Shell /usr/bin/sh
(In this document, Bourne Shell will be used as shell. If you choose another, you have to make modification to environment according to your shell) Home Directory /export/home/oracle Create Home Dir Make sure It is checked Password At least 8 Characters length

If you want to use command line type the following:

#groupadd dba#groupadd oinstall#useradd -g dba -G oinstall -d /export/home/oracle -m -s /bin/sh oracle#passwd oracle

5-) Create a directory named "/opt/oracle" in the root directory (or where you want) to become the base and others for Oracle Database as follows

mkdir -p /opt/oracle/product/8.1.7mkdir -p /opt/oracle/oraInventory

Now you need to grant this directory for user "oracle" to install and manage Oracle database. Make the user "oracle" owner of this directory as follows;

chown -R oracle:dba /opt/oracle

"Oracle Universal Installer" will make other sub-directories automatically in this base directory except where the database files ("oradata" directory) would reside. Installer will ask you this diectory's location.

Now create another "oracle" directory in the "/var/opt" for your database's startup options file (called "oratab") and make the user "oracle" of this directory, too, as follows:

mkdir /var/opt/oraclechown -R oracle:dba /var/opt/oracle

6-) You need to login as "Oracle User" to the system. So, logout and login as user "oracle" to system again.

TASKS TO PERFORM BY "ORACLE USER"

1-) You, logged as Oracle User named "oracle", need to make some modifications to your environment variables to run "Oracle Universal Installer" for installing and managing Oracle Database.

If you choose "/export/home/oracle" directory as home and Bourne Shell as login shell while creating user "oracle", you have a hidden file named ".profile" in "/export/home/oracle" directory. Open this file and replace the PATH string by following:

PATH=/bin:/usr/bin:/usr/openwin/bin:/usr/sbin:/usr/ccs/bin:/sbin:/opt/oracle/product/8.1.7/bin:PATH=$PATH:/usr/local/bin:/opt/oracle/admin/bin:.

Go to the bottom of the "export PATH" string and insert these rows below:

ADMIN_HOME=/opt/oracle/adminDISPLAY=localhost:0.0LD_LIBRARY_PATH=/usr/lib:/usr/openwin/lib:/opt/oracle/product/8.1.7/lib:LOCAL_HOME=/usr/localMSGVERB=text:actionNOMSGLABEL=1NOMSGSEVERITY=1ORACLE_BASE=/opt/oracleORACLE_HOME=/opt/oracle/product/8.1.7NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 #for English#NLS_LANG=TURKISH_TURKEY.WE8ISO8859P9 #for TurkishORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataORACLE_SID=orcl #You may replace "orcl" with your own SID Name you wish to useexport ORACLE_BASE ORACLE_HOME ORACLE_SID ADMIN_HOME LOCAL_HOMEexport MSGVERB NOMSGLABEL NOMSGSEVERITY NLS_LANG ORA_NLS33 DISPLAY LD_LIBRARY_PATH

Click here for a sample ".profile" file.

2-) After modification of this file, save it and relogin as the user "oracle".

PERFORM INSTALLATION

Make sure that your environment variables set correctly by entering following command:

set

Now, your system is ready to install Oracle 8.1.7. To install Oracle change default directory to where your oracle files reside. For example, if your installation files are at "/export/home/oracle/ora817", type the following command:

cd /export/home/oracle/ora817

and run Installer program by the command:

runInstaller

Then, "Oracle Universal Installer" will begin. Follow instructions in your screen and complete installation of Oracle 8.1.7 software.

When the Oracle Software installation completed, "Oracle Universal Installer" will attempt to run "Net8 Configuration Assistant" and "Database Configuration Assistant". Specify your options for database which you want to create in "Database Configuration Assistant". If you receive an error like "not connected to Oracle" or "Oracle not available", have an aspirin tablet. :))) At this time, you need to take a look at the kernel parameters you entered in the "/etc/system" file. Increase the "shmmax - shmmin and shmmni" values. (Refer to "Sunsolve Web Site" and make a search by the words "Shared Memory". to see What these parameters are and make your changes according to this reference.) Restart your computer and try again creating a database .

When you completed database creation, close "Oracle Universal Installer" program and in a terminal window, to start Oracle LISTENER, type

lsnrctl start

If listener started, You will see a message similar this:

LSNRCTL for Intel SVR4 UNIX: Version 8.1.7.0.0 - Production on 23-JUN-2002 04:02:46(c) Copyright 1998 Oracle Corporation. All rights reserved.Starting /opt/oracle/product/8.1.7/bin/tnslsnr: please wait...TNSLSNR for Intel SVR4 UNIX: Version 8.1.7.0.0 - ProductionSystem parameter file is /opt/oracle/product/8.1.7/network/admin/listener.oraLog messages written to /opt/oracle/product/8.1.7/network/log/listener.logListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gokmen.selcuk.edu.tr)(PORT=1521)))Listening on:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gokmen.selcuk.edu.tr)(PORT=2481))                                                     (PROTOCOL_STACK=(PRESENTATION=GIOP)(SESSION=RAW)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Intel SVR4 UNIX: Version 8.1.7.0.0 - ProductionStart Date 23-JUN-2002 04:02:47Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity OFFSNMP OFFListener Parameter File /opt/oracle/product/8.1.7/network/admin/listener.oraListener Log File /opt/oracle/product/8.1.7/network/log/listener.logServices Summary...PLSExtProc has 1 service handler(s)orcl has 1 service handler(s)The command completed successfully

If you see something like following, the listener already started:

LSNRCTL for Intel SVR4 UNIX: Version 8.1.7.0.0 - Production on 24-JUN-2002 05:02:46(c) Copyright 1998 Oracle Corporation. All rights reserved.TNS-01106: Listener using listener name LISTENER has already been started

If everything is OK, you may start the database by the command;

dbstart

This command's result must be similar this;

Oracle Server Manager Release 3.1.7.0.0 - ProductionCopyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.Oracle8i Enterprise Edition Release 8.1.7.0.0 - ProductionWith the Partitioning optionJServer Release 8.1.7.0.0 - ProductionSVRMGR> Connected.SVRMGR> ORACLE instance started.Total System Global Area 247464096 bytesFixed Size 73888 bytesVariable Size 17596416 bytesDatabase Buffers 229621760 bytesRedo Buffers 172032 bytesDatabase mounted.Database opened.SVRMGR>Server Manager complete.Database "orcl" warm started.

Ok. Database creation is complete. Let's make our database to start automatically by the system, now.

POST-INSTALLATION

Before you start the database, you need to edit "oratab" file by using your preferred text editor. You will see the following row at the bottom of the page:

orcl:/opt/oracle/product/8.1.7:N

To start Oracle Database by using "dbstart", you must change this row as

orcl:/opt/oracle/product/8.1.7:Y

Click here for a sample "oratab" file.

When you made this change, you also have to edit the two files. These are "dbstart" and "dbshut" files in the "$ORACLE_HOME/bin" directory. In this tutorial, $ORACLE_HOME refers to "/opt/oracle/product/8.1.7". Open these files by an editor and find the row at the top of pages

ORATAB=/etc/oratab

and change it as follows;

ORATAB=/var/opt/oracle/oratab

3-) In your text editor, open a new blank page and type the following rows:

#!/sbin/shORAHOME=/opt/oracle/product/8.1.7ORAOWNER=oracleif [ ! -f $ORAHOME/bin/dbstart ] ;thenecho "ERROR: Cannot start Oracle Database Server"ficase "$1" instart)echo "Starting Oracle Database... /c"su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl start" > /dev/nullsu - $ORAOWNER -c $ORAHOME/bin/dbstart > /dev/nullecho "Done.";;stop)echo "Stopping Oracle Database... /c"su - $ORAOWNER -c $ORAHOME/bin/dbshut > /dev/nullsu - $ORAOWNER -c "$ORAHOME/bin/lsnrctl stop" > /dev/nullecho "Done.";;*)echo "You must tell what you want me to do."echo "Usage : ./dbora [start | stop ]"echo "start    - Start Oracle Database immediately"echo "stop     - Stop Oracle Database immediately";;esacexit

Click here for a sample "dbora" file.

Save this file to "/etc/init.d" directory as "dbora". This file will be used to start up and shut down database automatically by the system. Now, type the following commands in a terminal window as root:

chmod 744 /etc/init.d/dborachown root:sys /etc/init.d/dboraln /etc/init.d/dbora /etc/rc0.d/K10dboraln /etc/init.d/dbora /etc/rc1.d/K10dboraln /etc/init.d/dbora /etc/rc2.d/S90dboraln /etc/init.d/dbora /etc/rcS.d/K10dbora

You can test your system by rebooting now. The database will be start automatically while rebooting process.

Excellent work. You have a running Oracle 8.1.7 Database Server now.