Install Oracle on Solaris 8/9

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=4192000000
	set shmsys:shminfo_shmmin=128000000
	set shmsys:shminfo_shmmni=200
	set shmsys:shminfo_shmseg=20
	set semsys:seminfo_semmni=200
	set semsys:seminfo_semmsl=200
	set semsys:seminfo_semmns=200
	set semsys:seminfo_semopm=200
	set 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):
usernameoracle
Primary Groupdba
Secondary Groupsoinstall
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 DirMake sure It is checked
PasswordAt 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.7
	mkdir -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/oracle
	chown -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/admin
DISPLAY=localhost:0.0
LD_LIBRARY_PATH=/usr/lib:/usr/openwin/lib:/opt/oracle/product/8.1.7/lib:
LOCAL_HOME=/usr/local
MSGVERB=text:action
NOMSGLABEL=1
NOMSGSEVERITY=1
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/8.1.7
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 		#for English
#NLS_LANG=TURKISH_TURKEY.WE8ISO8859P9 		#for Turkish
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
ORACLE_SID=orcl 	#You may replace "orcl" with your own SID Name you wish to use

export ORACLE_BASE ORACLE_HOME ORACLE_SID ADMIN_HOME LOCAL_HOME
export 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 - Production
System parameter file is /opt/oracle/product/8.1.7/network/admin/listener.ora
Log messages written to /opt/oracle/product/8.1.7/network/log/listener.log
Listening 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 LISTENER
Version TNSLSNR for Intel SVR4 UNIX: Version 8.1.7.0.0 - Production
Start Date 23-JUN-2002 04:02:47
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/oracle/product/8.1.7/network/admin/listener.ora
Listener Log File /opt/oracle/product/8.1.7/network/log/listener.log
Services 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 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
SVRMGR> Connected.
SVRMGR> ORACLE instance started.
Total System Global Area 	247464096 bytes
Fixed Size 			73888 bytes
Variable Size 			17596416 bytes
Database Buffers 		229621760 bytes
Redo Buffers 			172032 bytes
Database 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/sh

ORAHOME=/opt/oracle/product/8.1.7
ORAOWNER=oracle

if [ ! -f $ORAHOME/bin/dbstart ] ;
then
	echo "ERROR: Cannot start Oracle Database Server"
fi

case "$1" in
	start)
		echo "Starting Oracle Database... /c"
		su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl start" > /dev/null
		su - $ORAOWNER -c $ORAHOME/bin/dbstart > /dev/null
		echo "Done."
	;;

	stop)
		echo "Stopping Oracle Database... /c"
		su - $ORAOWNER -c $ORAHOME/bin/dbshut > /dev/null
		su - $ORAOWNER -c "$ORAHOME/bin/lsnrctl stop" > /dev/null
		echo "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"
	;;

esac

exit

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/dbora
	chown root:sys /etc/init.d/dbora
	ln /etc/init.d/dbora /etc/rc0.d/K10dbora
	ln /etc/init.d/dbora /etc/rc1.d/K10dbora
	ln /etc/init.d/dbora /etc/rc2.d/S90dbora
	ln /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.

 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值