Installing Oracle 10g Release 1 (10.2) On Solaris 10 (VM Ware)
Installing Oracle 10g Release 1 (10.2) On Solaris 10 (VM Ware)
Installing Oracle 10g Release 1 (10.2) On Solaris 10 (VM Ware)
Colestock),
Sun Documentation
Step 1 - Verify OS
Step 3
At least 1 GB of RAM
Step 4 - relationship between installed RAM and the configured swap space
requirement
--> /usr/sbin/swap -s
The following examples shows how to create a 24 Mbyte swap file called
/files/swapfiles.
# mkdir /files
# mkfile 24m /files/swapfile (***wait - time delay***)
# swap -a /files/swapfile
# vi /etc/vfstab
(An entry is added for the swap file):
/files/swapfile - - swap - no -
# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t2d0s1 32,17 8 205624 192704
/files/swapfile - 8 40952 40952
The following examples shows how to delete the /files/swapfile swap file.
# swap -d /files/swapfile
# (Remove the deleted swap entry from the /etc/vfstab file)
# rm /files/swapfile
# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t2d0s1 32,17 8 205624 192720
To determine the amount of disk space available in the /tmp directory, enter the
following command:
On Solaris 10:
# df -h /tmp
Other Solaris operating systems:
# df -k /tmp
The following table shows the approximate disk space requirements for software files
for each installation type:
Between 1.5 GB and 2 GB of disk space is required for preconfigured database that
uses file system storage (optional)
Steps Involved
format
disk
Disk 0
Disk 1
Disk 2
create partition --> p (run fdisk first) (be extra careful - with regard cylinders !!!)
(configuration below, not best pratice)
Disk 1
Disk 2
quit
# newfs /dev/dsk/cod1s0
- Create a mount point (, if it does not already exist) (need be called /u0X - X=1,2,3..)
/oracle
# uname -r
5.10
Item Requirement
Packages The following packages (or
later versions) must be
installed:
SUNWarc
SUNWbtool
SUNWhea
SUNWlibC
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt
SUNWsprox
Note: The SUNWsprox
package is not supported
on Solaris 10.
You may also require
additional font packages
for Java, depending on
your locale. Refer to the
following Web site for more
information:
http://java.sun.com/j2se/1.
4.2/font-requirements.html
To determine whether the required packages are installed, enter commands similar to
the following:
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot \
SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
If a package is not installed, then install it. (All packages are on Solaris CD which you
can buy £20+)
Step 9A
gcc 3.4.2 (Solaris package name is SUNWgcc)
Sun ONE Studio 8 (C and C++ 5.5)
gcc already installed, part of Solaris 10 !!! (learnt hard way(dont ask....))
appears in directory
--> /usr/sfw/bin
Thus, need to add to $PATH (add it..)
-------------------------------------------------------------------------------
--> And don't create temporary directories in locations that belong to the OS, like /usr.
--> Use /tmp, /var/tmp, your home directory or top level non standard directories (eg: /software) for your temporary
files.
After that I installed the libiconv package first, since that is a requirement.
pkgadd -d /(location)/libiconv-1.9.2-sol10-sparc-local
if it asks to overwrite any files - n (y most times), then continue
To remove the installed package SMCgcc from a system, run this command as root:
pkgrm SMCgcc
Need to update $PATH
I do "echo $PATH" and get the following:
/usr/sbin:/usr/bin:/usrdt/bin:/usr/opwnwin/bin/usr/ucb
There's an existing file /etc/.profile on my Solaris 10 system, so I
added the following to that file:
(ref : http://www.mydatabasesupport.com/forums/solaris/360271-how-revise-path-when-
logged-root-solaris-10-a.html)
PATH=$PATH:/usr/local/bin:/usr/ccs/bin/:/usr/local/bin/gcc; export PATH
Save and restart
(terminal) gcc - version (cannot execute)
------------------------------------------------------------------------------
using gcc from os (plus set $PATH to executable) --> gcc : no input file
ignore
------------------------------------------------------------------------------
Step 9B
restart
Orginial Requirements
118682-01
Patch Site
/oracle/downloads/patches/
terminal
cd /oracle/downloads/patches/patch_number
unzip patch_number.zip
reload
rm patch_number.zip
patchadd patch_number
patchadd -p
Laptop
Name gwwpcSOLARIS
IP Address 10.10.10.20
192.168.0.20
The following command should yield an entry for ‘files’:
# cat /etc/nsswitch.conf | grep hosts
# "hosts:" and "services:" in this file are used only if the
hosts: files
Oracle recommends that the following command return a fully-qualified hostname,
however, mine does
not:
# hostname
gwwpcSOLARIS
Oracle recommends that the following command return nothing:
# domainname
Here is the contents of my /etc/hosts file:
# more /etc/hosts
#
# Internet host table
#
192.168.1.20 gwwpcSOLARIS
127.0.0.1 localhost
-----------------------------------------------------------------------
Future Reference
Virtual Network
IP Address of Host
Virtual Network - Summary
Vmnet1
Vmnet8
-----------------------------------------------------------------------
Step 12 - Creating Required Operating System Groups and Users
Check if exists
#more /var/opt/oracle/oraInst.loc
groupadd oinstall
--Create Directory
Check if exists
id -a oracle
--Create Oracle software owner user
id -a oracle
id -a nobody
if not, create
useradd -g nobody
10g
Note:
When you use the prctl command (Resource
Control) to change system parameters, you do
not need to restart the system for these
parameter changes to take effect. However, the
changed parameters do not persist after a
system restart.
Resource Control
Temp
1. (assume ram 2g - half that)
Before
After
2.
Before
After
Perm
1.
Example
purgatorio# projadd -p 10000 -c 'test project' -U jqpublic test
purgatorio# grep ^test: /etc/project
test:10000:test project:jqpublic::
(Note that projadd and projmod won't let you change the resource-control field.)
This project is named "test" and has a project ID of "10000". Membership is restricted to
the user "jqpublic," and any project running in the test project will not be allowed to
create a file greater than 16MB (16MB = 16,777,216 bytes).
projadd -p 100 -c "Oracle default" -g dba
By default, Oracle instances are run as the oracle user of the dba group. A project
with the name group.dba is created to serve as the default project for the oracle user.
Run the command id to verify the default project for the oracle user:
su - oracle
id -p
or
su - oracle
id -p
prctl -n project.max-shm-memory -i process $$ (run command su - oracle)
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=256
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=100
The Oracle installer recognizes kernel parameters set using this method, but it is now
deprecated in favour of resource control projects, explained below.
- mount_point - Oracle
- oracle_sw_owner - Oracle
From Scrath
Check free disk space
# df -h /tmp or # df -k /tmp
# df -h /oracle
1.
# mkdir -p /mount_point/app/oracle_sw+owner
# mkdir -p /oracle/app/oracle
2.
# chown -R oracle:oinstall /mount_point/app/oracle_sw+owner
# chown -R oracle:oinstall /oracle/app/oracle
3.
# chmod -R 775 /mount_point/app/oracle_sw_owner
# chmod -R 775 /oracle/app/oracle
Existing
Identify Oracle Inventory Directory
# more /var/opt/oracle/oraInst.loc
# more /var/opt/oracle/oratab
4.
Database File &
# mkdir -p /mount_point/app/oracle_sw_owner/oradata
# mkdir -p /oracle/app/oracle/oradata
5.
# chown -R oracle:oinstall /mount_point/app/oracle_sw_owner/oradata
# chown -R oracle:oinstall /oracle/app/oracle/oradata
6.
# cdmod -R 775 /mount_point/app/oracle_sw_owner/oradata
# chmod -R 775 /oracle/app/oracle/oradata
7.
Recovery File Directory
# mkdir -p /mount_point/flash_recovery_area
# mkdir -p /oracle/app/oracle/flash_recovery_area
8.
# chown -R oracle:oinstall /mount_point/flash_recovery_area
# chown -R oracle:oinstall /oracle/app/oracle/flash_recovery_area
9.
# chmod -R 775 /mount_point/flash_recovery_area
# chmod -R 775 /oracle/app/oracle/flash_recovery_area
Set default file mode creation mask (unmask) to 022 in shell startup file.
$ vi .bash_profile
unmask 022
# df -h /tmp or df -k /tmp
(optional)
$ exit
next,
$ TMP=/mount_point/tmp
$ TMPDIR=/mount_point/tmp
next,
$ ORACLE_BASE=/Oracle/app/oracle
$ ORACLE_SID=VWS01
next,
$ unset ORACLE_HOME
$ unset TNS_ADMIN
verify
$ umask
$ env | more
DISPLAY=192.168.0.20:0.0
export DISPLAY
xhost +192.168.0.20
Result
su - oracle
cd ..
. /runInstaller
Custom
No database created
Need to run root.sh script as root. Install installs cluster services daemon.
If 64 bit, sparc.
The root.sh script that you ran as root during the installation process started a cluster
services daemon that runs as the root user. We will need to stop this daemon before we
can apply the Oracle patch set. Oracle only needs the cluster services daemon on database
servers that use Oracle’s Automatic Storage Management (ASM) or Real Application
Clusters (RAC). Since we will not be using either of these facilities, there will be no need
to have this daemon run at all. We cannot simply kill the daemon, because the root.sh
script added a “respawn” entry to the inittab. (If we kill the daemon, the operating system
will restart it.)
To stop the cluster services daemon and prevent it from restarting immediately or when
the server is rebooted in the future, we will need to restore the inittab to is previous state.
Luckily, the root.sh script preserved a backup copy before editing the inittab. First,
doublecheck that the backup copy of inittab is identical to the real inittab except for the
one entry added by the root.sh script:
$ diff /etc/inittab.orig /etc/inittab
Next, run the following commands very carefully as root:
$ mv /etc/inittab.orig /etc/inittab
$ /etc/init.d/init.cssd stop
$ mv /etc/rc3.d/S96init.cssd /etc/rc3.d/_S96init.cssd
$ mv /etc/rc3.d/K96init.cssd /etc/rc3.d/_K96init.cssd
But, 32 bit
Generates cannot execute - 64bit, not 32 bit.
ORACLE_BASE=/Oracle/app/oracle
ORACLE_HOME=/Oracle/app/oracle/product/10.2.0/db_1
Where are oraenv and coraenv found and how do they get created on various
Unix platforms?
These scripts are used to allow the DBA to set a common environment
for all users and make it easier for users to move between databases.
Both oraenv and coraenv are created during install and copied to
your "/usr/local/bin" when "root.sh" is run during post installation
steps.
Use oraenv when you are using the Bourne and Korne Shells.
Use coraenv when you are using the C shell.
These scripts perform the same functions, but are designed
for the different shells.
Step 18 - Create Database
root
DISPLAY=192.168.0.20:0.0
export DISPLAY
xhost +192.168.0.20
su - oracle
check variables
cd $ORACLE_HOME/bin
./dbca
create database....
ORACLE_SID
ORAENV_ASK=NO
export ORAENV_ASK
e.g
/u01/app/oracle/product/10.1.0/db_1:Y
Step 18 - Startup and shutdown
To make the database and listeners start up automatically when the server reboots and
shut down automatically when the server shuts down, you’ll need to create a dbora file in
/etc/init.d and link it to /etc/rc2.d and /etc/rc0.d.
You’ll need to do this as the root user.
First create a file called dbora in /etc/init.d as follows:
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.1.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start') # Start the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start
dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
;;
'stop') # Stop the Oracle databases and listeners
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop
dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
esac
rc2.d means the directory which contains scripts which will be executed in run-level 2
and so on.
S99dbora means S-start script 99-unique number
K10dbora means K-kill (stop) script 10-unique number
After creating the dbora file, you need to link it to /etc/rc2.d and /etc/rc0.d:
ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
l -- l (next 2 k)
Command Meaning
Starting vi
Cursor Commands
h Move left one character
j Move down one line
k Move up one line
l Move right one character
w Move right one word
W Move right one word (past punctuation)
b Move left one word
B Move left one word (past punctuation)
e Move to end of current word
Return Move down one line
Back Space Move left one character
Space Bar Move right one character
H Move to top of screen
M Move to middle of screen
L Move to bottom of screen
Ctrl-F Page forward one screen
Ctrl-D Scroll forward one-half screen
Ctrl-B Page backward one screen
Ctrl-U Scroll backward one-half screen
Inserting Characters and
Lines
a Insert characters to right of cursor
A Insert characters at end of line
i Insert characters to left of cursor
I Insert characters at beginning of line
o Insert line below cursor
O Insert line above cursor
Changing Text
cw Change word (or part of word) to right of cursor
cc Change line
C Change from cursor to end of line
s Substitute string for character(s) from cursor forward
r Replace character at cursor with one other character
r Return Break line
J Join current line and line below
xp Transpose character at cursor and character to right
~ Change case of letter (upper or lower)
u Undo previous command
U Undo all changes to current line
:u Undo previous last-line command
Deleting Text
x Delete character at the cursor
X Delete character to the left of the cursor
dw Delete word (or part of word to right of cursor)
dd Delete line containing the cursor
D Delete part of line to right of cursor
dG Delete to end of file
d1G Delete from beginning of file to cursor
:5,10 d Delete lines 5-10
Copying and Moving Text
yy Yank or copy line
Y Yank or copy line
p Put yanked or deleted line below current line
P Put yanked or deleted line above current line
:1,2 co 3 Copy lines 1-2 and put after line 3
:4,5 m 6 Move lines 4-5 and put after line 6
Setting Line Numbers
:set nu Show line numbers
:set nonu Hide line numbers
Setting Case-sensitivity
:set ic Searches should ignore case
:set noic Searches should be case-sensitive
Finding a Line
G Go to last line of file
1G Go to first line of file
21G Go to line 21
Searching and Replacing
/string Search for string
?string Search backward for string
n Find next occurrence of string in search direction
N Find previous occurrence of string in search direction
:g/search/s//replace/g Search and replace
Clearing the Screen
Ctrl-L Clear (refresh) scrambled screen
Inserting a File into a File
:r filename Insert (read) file after cursor
Appendix - 2 Commands
1.Copy file
cp /location/orig_file /location/new_file
3.
. --> means hidden
4.
# --> root
5.
$ --> user
http://www.experts-exchange.com/Database/Oracle/Q_20156385.html
http://www.iselfschooling.com/FREE_Oracle_Training/04_Advanced/03_Articles/lesson
29.html
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+12209
56472554+28353475&threadId=32769