How to install Oracle 10g in OpenSolaris x86 (SunOS 5.11)
26/08/2009 | кат: OpenSolaris, Oracle 10g | Комментировать [3]
Oracle 10g installation over ssh to remote server Opensolaris x86 64.
Checking Requirement:
Check RAM Size
# /usr/sbin/prtconf | grep "Memory size" Memory size: 8192 Megabytes
Check Swap size
# /usr/sbin/swap -lh swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 182,1 4K 12G 12G
Check tmp size [(>400mb)]
# df -k /tmp
Check 64 bit
# isainfo -kv 64-bit amd64 kernel modules
Check solaris version
# uname -a SunOS xxxxx 5.11 snv_111b i86pc i386 i86pc Solaris
Resize the swap volume on an active system
If swap is to small (swap < RAM)
# swap -lh
If the swap area is not is use, remove the swap area.
# swap -d /dev/zvol/dsk/rpool/swap
Confirm that the swap area is removed:
# swap -lh
Resize the swap volume
# zfs set volsize=8G rpool/swap
Activate the swap area
# swap -a /dev/zvol/dsk/rpool/swap # swap -lh
The swap -a attempt might fail if the swap area is already listed in /etc/vfstab. In this case, use the swapadd feature instead.
#/sbin/swapadd # swap -lh
If you need to add swap space but removing an existing swap device is difficult on a busy system, add another swap volume.
# zfs create -V 4G rpool/swap1 # swap -a /dev/zvol/dsk/rpool/swap1 # swap -lh
References:
Solaris Internals – Resizing ZFS Swap and Dump Devices
Create user Oracle:
Create group name «dba», oracle inventory group «oinstall» and «oracle» user
# /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba
Create oracle user
# useradd -d /export/home/oracle -g oinstall -G dba -m -s /bin/bash oracle # chmod -R 750 /export/home/oracle -> /home/oracle
Create $ORACLE_BASE directory
# mkdir -p /opt/oracle # chown -R oracle:oinstall /opt/oracle
Set password
# passwd -r files oracle
Edit file /export/home/oracle/.profile
alias sqlplus="rlwrap sqlplus" alias rman="rlwrap rman" alias lsnrctl="rlwrap lsnrctl" umask 022 ulimit -Sn 16384 TMP=/tmp TMPDIR=$TMP export TMP TMPDIR ORACLE_BASE=/opt/oracle/product/10.2.0 ORACLE_HOME=/opt/oracle/product/10.2.0/db_1 NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' NLS_LANG=AMERICAN_AMERICA.UTF8 ORACLE_SID=orcl PATH=$PATCH:$ORACLE_HOME/bin:$PATH:/usr/bin:/usr/ucb:/etc:/usr/local/bin:. export ORACLE_BASE ORACLE_HOME ORACLE_SID NLS_DATE_FORMAT NLS_LANG PATH
Create ZFS pools and FS
It is recommended to set the ZFS recordsize for a datafile filesystem to match the Oracle instance’s db_block_size (default 8Kb).
# su - # format # zpool create tank c7t1d0 # zpool status # zfs create -o recordsize=8k tank/oradata (or # zfs set recordsize=8k tank/oradata - apply only to new files in the FS) # zfs set mountpoint=/opt/oracle/product/10.2.0/oradata tank/oradata # zpool create tank2 c7t2d0 # zpool status # zfs create tank2/oraredo # zfs set mountpoint=/opt/oracle/oraredo tank2/oraredo # zpool create tank3 c7t3d0 # zpool status # zfs create tank3/flash # zfs set mountpoint=/opt/oracle/product/10.2.0/flash_recovery_area tank3/flash # chown -R oracle:oinstall /opt/oracle
References:
Neelakanth Nadgir’s blog
Solaris Internals – ZFS for Databases
Configure OpenSolaris
Install packages:
SUNWarc
SUNWctpls
SUNWhea
SUNWmfrun
SUNWswmt (required for showrev.ksh)
SUNWscp (Install /usr/ucb/ps)
# pkg install SUNWarc SUNWctpls SUNWhea SUNWmfrun SUNWscp SUNWswmt
Install package from Solaris 5.10 CD ( download package)
SUNWdtcor
Unpack packages to the directory and:
# pkgadd -d .
copy file /usr/openwin/lib/libdps.so.5 from server with Solaris 5.10 to /usr/X11/lib
# cd /usr/X11/lib # ln -s libdps.so.5 libdps.so # chown root:bin /usr/X11/lib/libdps.so # chmod 644 /usr/X11/lib/libdps.so
Download showrev.ksh script and copy it to /usr/bin/
# cd /usr/bin # ln -s showrev.ksh showrev # chown root:bin showrev.ksh # chmod 755 showrev.ksh
Add to /etc/nsswitch.conf
hosts: files dns ipnodes: files dns
Confugure ssh
If you don’t understand what you’re doing, don’t do it.
Only allow ssh login with public key authentication (password is prohibited).
Edit /etc/ssh/sshd_config
AllowTcpForwarding yes PasswordAuthentication no PAMAuthenticationViaKBDInt no
Restart sshd
# svcadm restart svc:/network/ssh:default
Configure VNC
# svcadm enable xvnc-inetd # svcs xvnc-inetd
Edit /etc/X11/gdm/custom.conf
[security] DisallowTCP=false [xdmcp] Enable=true
Alter services setting
# svccfg -s xvnc-inetd # svc:/application/x11/xvnc-inetd> editprop
edit and uncomment lines
1. set geometry to 120×1024
2. set VNC session to persist (unsecure option!)
setprop inetd_start/exec = astring: "/usr/X11/bin/Xvnc -inetd -query localhost -once securitytypes=none -geometry 1280x1024" setprop inetd/wait = boolean: true
Restart service
# svcadm refresh xvnc-inetd gdm
Configure Kernel Parameter
add to /etc/system
* ORACLE set noexec_user_stack=1 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmni=100 set semsys:seminfo_semmsl=512 set semsys:seminfo_semvmx=65534 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmseg=128 set shmsys:shminfo_shmmni=512 set semsys:seminfo_semopm=256 *************************
- semsys:seminfo_semmni will reset from project.max-sem-ids (256)
- shmsys:shminfo_shmmax will reset from project.max-shm-memory (6Gb)
Create a new «resource project»
# projadd oracle
edit the /etc/user_attr:
adm::::profiles=Log Management lp::::profiles=Printer Management root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no oracle::::project=oracle
to set permanently, run this (as root):
# projmod -s -K "project.max-shm-memory=(priv,6gb,deny)" oracle # projmod -s -K "project.max-sem-ids=(priv,256,deny)" oracle
Restart OpenSolaris
# shutdown -y -g0 -i6
Run ORACLE Installer
Perhaps you could use DTrace to intercept uname(2) and make it report version 5.10:
pfexec dtrace -w -n 'syscall::uname:entry {self->p=arg0;}
syscall::uname:return {copyoutstr("5.10", self->p+257*2, 5);}'
Login to remote VNC session as oracle user and run:
# ./runInstaller
…
Automating Database Startup
edit file /var/opt/oracle/oratab script to find lines with «Y» at their ends
ln -s /var/opt/oracle/oratab /etc/oratab
Create startup file
# touch /etc/init.d/dbora
Edit /etc/init.d/dbora
#! /sbin/sh
. /export/home/oracle/.profile
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
export ORACLE=oracle;
case $1 in
'start')
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/emctl start dbconsole"
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/isqlplusctl start"
;;
'stop')
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/emctl stop dbconsole"
/bin/su - $ORACLE -c "$ORACLE_HOME/bin/isqlplusctl stop"
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
# chown root:sys /etc/init.d/dbora # chmod 775 /etc/init.d/dbora
To integrate dbora file to standart Solaris startup and shutdown process:
ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora ln -s /etc/init.d/dbora /etc/rc1.d/K01dbora ln -s /etc/init.d/dbora /etc/rc2.d/K01dbora ln -s /etc/init.d/dbora /etc/rcS.d/K01dbora ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
Rlwrap
The rlwrap (readline wrapper) utility provides a command history and editing of keyboard input for any other command. This is a really handy addition to SQL*Plus and RMAN on Unix/Linux. Download packages rlwrap+readline for Solaris/OpenSolaris.
# gunzip readline-5.1-solaris-x86.gz # gunzip rlwrap-solaris-x86.gz # pkgadd -d readline-5.1-solaris-x86 # pkgadd -d rlwrap-solaris-x86 # crle -u -l /usr/local/lib
add /usr/local/bin to PATH
add to /export/home/.profile:
alias sqlplus="rlwrap sqlplus" alias rman="rlwrap rman" alias lsnrctl="rlwrap lsnrctl"
Configure ORACLE:
Add to oracle new control file:
sql> startup nomount; sql> ALTER SYSTEM SET control_files='/opt/oracle/oraredo/ORCL/controlfile/o1_mf_582nbl7v_.ctl', '/opt/oracle/oradata/ORCL/controlfile/o1_mf_582nbl7v2_.ctl' SCOPE=SPFILE; sql> shutdown immediate;
copy exist control_file to new location and run:
sql> startup;
Configure NTP:
edit /etc/inet/ntp.conf
restrict default noquery nomodify restrict 127.0.0.1 server 127.127.1.0 fudge 127.127.1.0 stratum 10 server pool.ntp.org server europe.pool.ntp.org restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
Enable ntp
# svcadm enable svc:/network/ntp:default
Restart ntp
# svcadm restart svc:/network/ntp:default
Test ntp (waiting 5 min)
# xntpdc xntpdc> sysinfo system peer: pool.ntp.org system peer mode: client leap indicator: 00 stratum: 3 precision: -18 root distance: 0.06123 s <...>
requires package
Comments
3 Responses to “How to install Oracle 10g in OpenSolaris x86 (SunOS 5.11)”
Leave a Reply
Thx alot for this tutorial.
it’s very help
OpenSolaris (SunOs5.11) what release is?
I’m using a OpenSolaris 2009.6. This would work?
It helped me a lot. Thanks for sharing