- 论坛徽章:
- 0
|
Logon as root and append the following settings to /etc/system file. Ensure the following parameters are set to at least the following values. The SHM kernel parameters affect shared memory, while SEM kernel parameters deal with semaphores. Using the settings above will allow you to install DB2 and/or PM on this machine in the future, without additional adjustments. Our test machines have 1024 MB of installed memory per CPU, so it doesn't matter if we exceed Oracle's recommendations.
Please Note: It is very tidious and difficult to type in the following with out any errors. You may want to copy it to your computer's clipboard and paste this using Exceed Paste from Cli
set shmsys:shminfo_shmmax=536870912
* (DB2 and PM require 536870912, Oracle requires 4294967295)
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=256
* (DB2 requires 300, PM requires 256, Oracle requires 100)
set shmsys:shminfo_shmseg=16
* (DB2 requires 50, PM requires 16, Oracle requires 10)
set semsys:seminfo_semmni=300
* (DB2 requires 1024, PM requires 300, Oracle requires 100)
set semsys:seminfo_semmsl=256
* (Oracle recommends MAX(PROCESSES) + 10)
set semsys:seminfo_semmns=2048
* (DB2 and PM require 2048, Oracle requires 250)
set semsys:seminfo_semopm=200
* (PM requires 200, Oracle requires 100)
set semsys:seminfo_semvmx=32767
* The following parameters are required by DB2 and/or PM
set msgsys:msginfo_msgmax=65535
set msgsys:msginfo_msgmnb=65535
set msgsys:msginfo_msgmap=258
set msgsys:msginfo_msgmni=256
set msgsys:msginfo_msgssz=16
set msgsys:msginfo_msgtql=1024
set msgsys:msginfo_msgseg=32767
* (this is the max value of this parameter according to DB2 documentation)
set semsys:seminfo_semmap=1026
set semsys:seminfo_semmnu=2048
set semsys:seminfo_semume=200
* (DB2 recommends 50, but PM requires 200)
[CHECK]
Be VERY CAREFUL that there are no typos or stray characters - otherwise your system may not start up after reboot! You can safely cut and paste the lines above. Reboot the system for the changes to take effect.
/usr/sbin/shutdown -i6 -g0 -y
As root, use the Solaris admintool to create the groups oinstall and dba. Create a user named oracle and make its primary group oinstall and secondary group dba. Set the default shell to /bin/ksh. Set the password to Normal password, and set the password to oracle. Set the home directory to be /export/home/oracle
As root, export your display variable to your workstation. Make sure you have Exceed running, and that the Oracle machine is listed in your xhost Access Control List.
From a command line, enter the following:
DISPLAY=myworkstation:0.0
export DISPLAY
Start the admintool utility: /bin/admintool
In the Admintool window, click Browse >; Groups. The Admintool:Groups window opens.
In the Admintool:Groups window, click Edit >; Add. The Admintool:Add Group window opens.
In the Admintool:Add Group window, in the Group Name field, enter dba and click OK.
In the Admintool:Groups window, click Edit >; Add. The Admintool:Add Group window opens.
In the Admintool:Add Group window, in the Group Name field, enter oinstall and click OK.
In the Admintool:Groups window, click Browse >; Users. The Admintool:Users window opens.
In the Admintool:Users window, click Edit >; Add. The Admintool:Add User window opens.
In the Admintool:Add User window, do the following:
In the User Name field, enter oracle
In the Primary Group field, enter oinstall
In the Secondary Groups field, enter dba
Select the desired user login shell by clicking the button beside the Login Shell field, and then clicking the desired shell Korn.
Click the selection box beside Password and select Normal Password, setting it to oracle
Ensure that the radio button beside the Create Home Dir field is selected.
In the Path field, enter the home directory for the user oracle: /export/home/oracle
Accept the default values for the other fields and click OK.
Exit from the admintool utility.
Login as user oracle:
su - oracle
and add the following lines to the end of .profile, which is a file under ORACLE_HOME:
umask 022
export ORACLE_BASE=/opt/oracle/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.0
export ORACLE_SID=o920
export PATH=$PATH ORACLE_HOME/bin:/usr/ccs/bin:/usr/openwin/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH ORACLE_HOME/lib
export CLASSPATH=$CLASSPATH ORACLE_HOME/jdbc/lib/classes12.zip
export NLS_LANG=AMERICAN_AMERICA.UTF8
Note, you may install Oracle wherever there is enough disk space. This normally would be under /opt. If you choose a different location, then change the paths accordingly, and also in the instructions which follow.
The linking utilities in /usr/ccs/bin are required during the install, which is why they must be added to the PATH.
The NLS_LANG setting is of the form language_territory.character-set, where language and territory are in this list (), and WCBE uses the UTF8 character set. Set appropriately for your locale.
You may also wish to add the following optional lines (or your preferred variations) for your own convenience:
set -o vi
alias 'dir=ls -Fal'
export PS1=`hostname`' LOGNAME PWD>; '
As root, create the following directories:
mkdir /opt/oracle
cd /opt/oracle
mkdir u01 u02 u03 u04
Change the ownership of these directories by typing:
chown -R oracle:dba /opt/oracle
Put the Oracle 9iR2 CD #1 into the drive. The OS usually mounts the CD-ROM for you to /cdrom. Otherwise, you will have to mount the CD manually.
Logon as oracle: su - oracle
Export your display variable to your workstation. Make sure you have Exceed running, and that the Oracle machine is listed in your xhost Access Control List.
DISPLAY=myworkstation:0.0
export DISPLAY
cd to the root directory - cd /
Type /cdrom/cdrom0/runInstaller from the root directory.
an installer window should appear on your desktop
click Next
At Inventory location, accept the default directory (/opt/oracle/u01/app/oracle/oraInventory) and click OK.
at UNIX Group name:
enter oinstall
click Next
When prompted, use another terminal window (logged on as root) to execute the /tmp/orainstRoot.sh.
After you have run the script, return to the installer window and click on Continue to proceed further.
At File locations:
ensure that the destination is the ORACLE_HOME that you specified earlier (e.g. /opt/oracle/u01/app/oracle/product/9.2.0.1.0)
click Next.
At Available Products screen:
select Oracle 9i Database 9.2.0.1.0 to install
click Next
At Installation Types screen:
select Custom for installation type
click Next
At Available Product Components (NOTE: the order in which the components are deselected is important),
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Oracle Advanced Security 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Oracle Partitioning 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Oracle Spatial 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Legato Networker Single Server
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Oracle OLAP 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Enterprise Edition Options 9.2.0.1.0 >;>; Oracle Data Mining 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Oracle Enterprise Manager Products 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Oracle 9i Development Kit 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Oracle9i for UNIX Documentation 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Oracle HTTP Server 9.2.0.1.0
Deselect Oracle9i Database 9.2.0.1.0 >;>; Oracle Transparent Gateways 9.2.0.1.0
Select Oracle9i Database 9.2.0.1.0 >;>; Oracle JDBC/OCI Interfaces 9.2.0.1.0 (note that this is a must "select" or instance creation will fail at massloader step)
Click Next
at the Component locations screen
click Next
at the Privileged Operating System Groups screen
click Next to accept the default (dba)
at the Create Database screen
select Yes
click Next
at the Summary screen:
click Install
the installation will take about 30 minutes
If prompted to insert CD#2:
umount /cdrom
eject cdrom (for Sun machines with cover panels or in racks with closed doors, make sure the way is clear first!)
remove CD#1 and insert CD#2 - it will be auto-mounted in a slightly different location (e.g. /cdrom/orcl901_2)
enter the new mount point in the Path field, and click OK to continue
Setup Privileges
in another window, run the /opt/oracle/u01/app/oracle/product/9.2.0.1.0/root.sh as root
When prompted for "full pathname of the local bin directory", specify /usr/bin and press Enter
click OK on the Setup Privileges screen to continue.
Oracle Net Configuration Assistant
Just select Perform typical configuration and press Next.
After completion, the installer automatically starts Database Configuration Assistant window shown below.
Oracle Database Configuration Assistant
Click Next.
At Step 1 of 8, ensure that Create a Database is selected and click Next.
At Step 2 of 8, ensure that New Database is selected and click Next.
At Step 3 of 8, Database Identification
Global Database Name: a common practice for companies is to type in SID.machine_name.domain_name so as to guarantee a unique Global Database Name and to make it easier to keep track of what database you are working with. E.g., o920.finch.torolab.ibm.com
For SID, o920 (default SID value for UNIX) (FYI: default SID for windows NT/2000 is orcl).
Click Next.
At Step 4 of 8, deselect Example Schemas (confirm Yes to delete the TableSpaces). Deselect Oracle OLAP Services(confirm Yes to delete tablespace). Deselect Oracle Ultra Search. Click Next.
At Step 5 of 8, select Dedicated Server Mode and click Next.
At Step 6 of 8,
on the Memory tab, set Shared Pool to 200 MBytes.
select Character Sets tab, and set the Database Character Set (by selecting the Choose from the list of character sets radio button and selecting from the drop-down menu) and National Character Set to UTF8.
select the DB Sizing tab and make sure the Block Size is 8 Kbytes.
Click Next.
At Step 7 of 8, click Next. (Unless you want to change the tablespace sizes or make other configuration changes)
At Step 8 of 8, ensure that Create Database is selected and click Finish.
A Summary window will display, click OK.
The database creation might take anywhere from 30 minutes to 70 minutes.
Database creation in progress...
A Window will display stating that the database creation is complete and will give user details for sys and system. Enter sys for SYS, and system for SYSTEM. Click Exit.
Exit out of the Oracle Universal Installer.
Extra Paramaters
in $ORACLE_BASE/admin/o920/pfile/init.ora file, set:
open_cursors=1000
also add a line cursor_sharing = force
Stop and restart the Oracle Listener and instance as documented below under "Useful tips while working with Oracle 9i"
Change user system's password
su - oracle
sqlplus /nolog
connect / as sysdba
alter user system identified by manager;
exit
Now, you should be able to connect to o920 using system/manager.
sqlplus system/manager@o920
Listed below are some useful tips for working with Oracle 9i.
Checking whether the users and table spaces were created correctly
Log in as oracle. Connect to the Database with the Database user ID with dba permissions. Check whether all the users you created are listed when you try and display all the users.
# su - oracle
$ sqlplus system/manager@o902
>; select * from all_users;
For starting your instance on the Oracle 9i database:
The listener needs to be started up first. This can be achieved by issuing the following commands:
# su - oracle
$ lsnrctl
$ start
$ quit
Now that the listener has already been started, the instance can be started up
$ sqlplus /nolog
SQL>; connect / as sysdba
SQL>; startup
SQL>; quit
This should start your Oracle instance.
For stopping your instance on the Oracle 9i database:
# su - oracle
$ sqlplus /nolog
SQL>; connect / as sysdba
SQL>; shutdown OR shutdown immediate
SQL>; quit |
|