Tuesday, June 9, 2009
How to Upgrade from OpenSolaris 2008.11 to OpenSolaris 2009.06
http://www.sun.com/events/communityonewest/media/demo.xml?intcmp=commonewest_upgrade_demo
Labels:
OpenSolaris
Friday, June 5, 2009
Solaris 10 Commad Line Guide – Networking Configuration
To bind an IP address to a Network Interface Card
#ifconfig –a >> to check the configuration
#ifconfig qfe0 plumb >> to enable the first Network Interface Card
#ifconfig qfe0 netmask up >>to bind IP address, subnet, and enable the configuration
Create a file on /etc directory – hostname.qfe0 with hostname entry
Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname
Example:
#ifconfig –a
hme0: flags=863 mtu 1500
inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255
ether 8:0:20:9f:51:fe
#ifconfig qfe0 plumb
#ifconfig qfe0 202.40.xxx.3 netmask 255.255.255.0 up
#ifconfig –a
hme0: flags=863 mtu 1500
inet 202.40.xxx.2 netmask ffffff00 broadcast 202.40.xxx.255
ether 8:0:20:9f:51:fe
qfe0: flags=863 mtu 1500
inet 202.40.xxx.3 netmask ffffff00 broadcast 202.40.xxx.255
To change IP Address
#ifconfig qfe0 down >>to disable the first Network Interface Card
To remove Network Interface Card
#ifconfig qfe0 unplumb >> to remove the first Network Interface Card
To bind a virtual IP address to Network Interface Card
#ifconfig qfe0:1 plumb >>in some cases this is not needed if qfe0 has been plumb
#ifconfig qfe0:1 202.40.xxx.x netmask 255.255.255.0 up
Create a file on /etc directory – hostname.qfe0:1 with hostname entry
Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname
NOTE:
If adding a quad port Network Interface Card, the naming convention will be qfe0, qfe1, qfe2, qfe3.
If adding a single port Network Interface Card, the naming convention will be hme1, hme2, hme3.
The onboard Network Interface Card is hme0
If adding a virtual IP address, the naming convention will be hme0:1, hme0:2, up to hme0:3 only for hme0, or qfe0:1, qfe0:2, up to qfe0:3 only for
qfe0, depending on the number of hme and qfe port used.
To hardcode the speed of the Network Interface Card
Example:
You want to hardcode 100Full Duplex for hme0
#ndd –set /dev/hme instance 0
#ndd –set /dev/hme adv_100fdx_cap 1
#ndd –set /dev/hme adv_100hdx_cap 0
#ndd –set /dev/hme adv_10fdx_cap 0
#ndd –set /dev/hme adv_10hdx_cap 0
#ndd –set /dev/hme adv_autoneg_cap 0
Create an input on the file /etc/system so that when your system rebooted it will run the NIC in 100Full Duplex automatically.
set hme:hme_adv_100fdx_cap=1
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=0
set hme:hme_adv_autoneg_cap=0
To check the status
#ndd /dev/hme \? >>displays all command options for ndd
#ndd /dev/hme link_status >>displays the hme0 link status
The above configurations should be followed in order.
1 = Capable/Enable
0 = Disable
hme1 = instance 1
hme2 = instance 2
hme3 = instance 3
The system on the other end of network cable should be hardcode to 100Full Duplex also. If the other end is a switch, check your vendor manuals on how to
do it.
To monitor packets traveling in your NIC ports
Example:
You want to monitor your hme0 port of packets coming from IP address 202.40.224.14
#snoop –d hme0 | grep 202.40.224.14
You want to monitor your qfe1 port of packets coming from host server1
#snoop –d qfe1 | grep server1
You want to monitor your hme1 ports of all packets
#snoop –d hme1
To add or remove a static route
Example:
You want to add a static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route add –net 192.168.16.0 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add –net 192.168.16.0 10.236.74.1
You want to add a static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route add 192.168.64.4 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add 192.168.64.4 10.236.74.1
You want to delete the static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route delete –net 192.168.16.0 10.236.74.1
You want to delete the static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route delete 192.168.64.4 10.236.74.1
#ifconfig –a >> to check the configuration
#ifconfig qfe0 plumb >> to enable the first Network Interface Card
#ifconfig qfe0
Create a file on /etc directory – hostname.qfe0 with hostname entry
Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname
Example:
#ifconfig –a
hme0: flags=863
inet 202.40.231.2 netmask ffffff00 broadcast 202.40.231.255
ether 8:0:20:9f:51:fe
#ifconfig qfe0 plumb
#ifconfig qfe0 202.40.xxx.3 netmask 255.255.255.0 up
#ifconfig –a
hme0: flags=863
inet 202.40.xxx.2 netmask ffffff00 broadcast 202.40.xxx.255
ether 8:0:20:9f:51:fe
qfe0: flags=863
inet 202.40.xxx.3 netmask ffffff00 broadcast 202.40.xxx.255
To change IP Address
#ifconfig qfe0 down >>to disable the first Network Interface Card
To remove Network Interface Card
#ifconfig qfe0 unplumb >> to remove the first Network Interface Card
To bind a virtual IP address to Network Interface Card
#ifconfig qfe0:1 plumb >>in some cases this is not needed if qfe0 has been plumb
#ifconfig qfe0:1 202.40.xxx.x netmask 255.255.255.0 up
Create a file on /etc directory – hostname.qfe0:1 with hostname entry
Add entry on /etc/netmasks if IP address is on different subnet
Add entry on /etc/inet/hosts file with IP address and hostname
NOTE:
If adding a quad port Network Interface Card, the naming convention will be qfe0, qfe1, qfe2, qfe3.
If adding a single port Network Interface Card, the naming convention will be hme1, hme2, hme3.
The onboard Network Interface Card is hme0
If adding a virtual IP address, the naming convention will be hme0:1, hme0:2, up to hme0:3 only for hme0, or qfe0:1, qfe0:2, up to qfe0:3 only for
qfe0, depending on the number of hme and qfe port used.
To hardcode the speed of the Network Interface Card
Example:
You want to hardcode 100Full Duplex for hme0
#ndd –set /dev/hme instance 0
#ndd –set /dev/hme adv_100fdx_cap 1
#ndd –set /dev/hme adv_100hdx_cap 0
#ndd –set /dev/hme adv_10fdx_cap 0
#ndd –set /dev/hme adv_10hdx_cap 0
#ndd –set /dev/hme adv_autoneg_cap 0
Create an input on the file /etc/system so that when your system rebooted it will run the NIC in 100Full Duplex automatically.
set hme:hme_adv_100fdx_cap=1
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_10fdx_cap=0
set hme:hme_adv_10hdx_cap=0
set hme:hme_adv_autoneg_cap=0
To check the status
#ndd /dev/hme \? >>displays all command options for ndd
#ndd /dev/hme link_status >>displays the hme0 link status
The above configurations should be followed in order.
1 = Capable/Enable
0 = Disable
hme1 = instance 1
hme2 = instance 2
hme3 = instance 3
The system on the other end of network cable should be hardcode to 100Full Duplex also. If the other end is a switch, check your vendor manuals on how to
do it.
To monitor packets traveling in your NIC ports
Example:
You want to monitor your hme0 port of packets coming from IP address 202.40.224.14
#snoop –d hme0 | grep 202.40.224.14
You want to monitor your qfe1 port of packets coming from host server1
#snoop –d qfe1 | grep server1
You want to monitor your hme1 ports of all packets
#snoop –d hme1
To add or remove a static route
Example:
You want to add a static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route add –net 192.168.16.0 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add –net 192.168.16.0 10.236.74.1
You want to add a static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route add 192.168.64.4 10.236.74.1
then create a script, so that when the system rebooted the route will automatically added
#cd /etc/rc2.d
#vi S168staticroute
Add the following line
route add 192.168.64.4 10.236.74.1
You want to delete the static route to network 192.168.16.0 to your default gateway of 10.236.74.1
#route delete –net 192.168.16.0 10.236.74.1
You want to delete the static route to host 192.168.64.4 to your default gateway of 10.236.74.1
#route delete 192.168.64.4 10.236.74.1
Labels:
Solaris
Solaris 10 Remote X11,X-Server or CDE Login Problem
Sometimes I got an error after finishing on Solaris 10 box installation. After make some configuration then suddenly I can’t access my Solaris XDMCP remote session on my laptop.. Usually, I use XManager Enterprise to get Solaris GUI remote session XDMCP. here the step-by-step to troubleshoot if you got the same problem:
{Make sure that svc:/application/graphical-login/cde-login is enabled and online.
root@solaris10 # svcs cde-login
STATE STIME FMRI
online Mar_02 svc:/application/graphical-login/cde-login:default
root@solaris10 #netservices limited
restarting syslogd
restarting sendmail
dtlogin needs to be restarted. Restart now? [Y] y
restarting dtlogin
{Check dtlogin process:
root@solaris10 # ps -ef | grep dtlogin
root 29384 1 0 Mar 02 ? 0:00 /usr/dt/bin/dtlogin -daemon -udpPort 0 [should be TCP, not UDP]
{Modify the x11-server service:
—–>Show properties:
#svcprop svc:/application/x11/x11-server
——>Turn on tcp listen:
#svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen=true
{Modify the dtlogin service:
—–>Show properties:
#svcprop svc:/application/graphical-login/cde-login:default
#svccfg -s svc:/application/graphical-login/cde-login setprop dtlogin/args=\”\”
—–>Then restart the X server:
#svcadm refresh svc:/application/graphical-login/cde-login:default;
#svcprop -p dtlogin svc:/application/graphical-login/cde-login:default
root@solaris10 #netservices open
restarting syslogd
restarting sendmail
root@solaris10# svcadm restart cde-login
root@solaris10# ps -ef |grep dtlogin
root 27722 1 0 15:08:37 ? 0:00 /usr/dt/bin/dtlogin -daemon
root 27724 26297 0 15:08:43 pts/3 0:00 grep dtlogin
{Make sure that svc:/application/graphical-login/cde-login is enabled and online.
root@solaris10 # svcs cde-login
STATE STIME FMRI
online Mar_02 svc:/application/graphical-login/cde-login:default
root@solaris10 #netservices limited
restarting syslogd
restarting sendmail
dtlogin needs to be restarted. Restart now? [Y] y
restarting dtlogin
{Check dtlogin process:
root@solaris10 # ps -ef | grep dtlogin
root 29384 1 0 Mar 02 ? 0:00 /usr/dt/bin/dtlogin -daemon -udpPort 0 [should be TCP, not UDP]
{Modify the x11-server service:
—–>Show properties:
#svcprop svc:/application/x11/x11-server
——>Turn on tcp listen:
#svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen=true
{Modify the dtlogin service:
—–>Show properties:
#svcprop svc:/application/graphical-login/cde-login:default
#svccfg -s svc:/application/graphical-login/cde-login setprop dtlogin/args=\”\”
—–>Then restart the X server:
#svcadm refresh svc:/application/graphical-login/cde-login:default;
#svcprop -p dtlogin svc:/application/graphical-login/cde-login:default
root@solaris10 #netservices open
restarting syslogd
restarting sendmail
root@solaris10# svcadm restart cde-login
root@solaris10# ps -ef |grep dtlogin
root 27722 1 0 15:08:37 ? 0:00 /usr/dt/bin/dtlogin -daemon
root 27724 26297 0 15:08:43 pts/3 0:00 grep dtlogin
Labels:
Solaris
Configuring IP Network Multipathing on Solaris
IPMP has the following features:
1. It eliminates a single network adapter as a single point of failure in these cases, ( a. Network adapter failure b. Network link failure)
2. It enables interfaces to fail over within approximately 10 seconds when using the default configuration.
3. It can be configured by adjusting the parameters in the ”/etc/default/mpathd” file.
4. It can be configured for use with both IPv4 and IPv6.
5. It enables interfaces to be configured as standby interfaces.
{IPMP failure detection:
Probe-based failure detection
-detects network error by sending ICMP ECHO_REQUEST messages
Link based failure detection
-detects network error by checking the IFF_RUNING
How to Configure IPMP on Solaris
*PROBE-BASED IPMP*
{Probe-Based IPMP Requirements:
* The Solaris 8 10/00 OS, as a minimum, must be installed.
* Unique MAC addresses must be configured on each network interface.
* Multiple network adapter interfaces must be connected on each subnet.
* An IPMP group name must be assigned to the group of interfaces.
* A test address is assigned to an interface.
* Additional hosts or devices must exist on the same subnet.
{Configuring Probe-Based IPMP:
1. # cat /etc/release
2. # eeprom ”local-mac-address?=true”
3. # ifconfig e1000g0 10.5.0.11 netmask + broadcast + up
4. # ifconfig e1000g0 group
5. # ifconfig e1000g0 addif 10.5.0.61 netmask + broadcast + failover deprecated up
6. # ifconfig e1000g1 10.5.0.21 netmask + broadcast + group up
7. # ifconfig e1000g1 addif 10.5.0.71 netmask + broadcast + failover deprecated up
8. # ifconfig -a
{Configuring Probe-Based IPMP using configuration files
1. # cat /etc/hostname.eri0
10.10.0.11 netmask + broadcast + group mptest1 up \
addif 10.5.0.61 netmask + broadcast + -failover \
deprecated up
2. # cat /etc/hostname.qfe2
10.10.0.21 netmask + broadcast + group mptest1 up \
addif 10.5.0.71 netmask + broadcast + -failover \
deprecated up
3. # init 6
*LINK-BASED IPMP*
{Link-Based IPMP Requirements:
* Solaris 9 12/02 OS, at a minimum, must be installed.
* Network interfaces must use any of the following drivers: hme, eri, ce, ge, bge, qfe, dmfe, e1000g, ixgb, nge, nxge, rge, xge
* Unique MAC addresses must be configured on each of the interfaces.
* An IPMP group name must be assigned to interfaces
{Configuring Link-Based IPMP
1. # cat /etc/release
2. # eeprom ”localmacaddress=true”
3. # ifconfig eri0 10.10.0.11 netmask + broadcast + group up
4. # ifconfig hme0 10.10.0.21 netmask + broadcast + group up
5. # ifconfig a
{Configuring Link-IPMP – Administration Guide – IP ServicesBased IPMP using configuration files
1. # cat /etc/hostname.eri0
10.10.0.11 netmask + broadcast + group up
2. # cat /etc/hostname.hme0
10.10.0.21 netmask + broadcast + group up
3. # init 6
Reference:
IPMP – Administration Guide – IP Services
man ifconfig
man in.mpathd
docs.sun.com
1. It eliminates a single network adapter as a single point of failure in these cases, ( a. Network adapter failure b. Network link failure)
2. It enables interfaces to fail over within approximately 10 seconds when using the default configuration.
3. It can be configured by adjusting the parameters in the ”/etc/default/mpathd” file.
4. It can be configured for use with both IPv4 and IPv6.
5. It enables interfaces to be configured as standby interfaces.
{IPMP failure detection:
Probe-based failure detection
-detects network error by sending ICMP ECHO_REQUEST messages
Link based failure detection
-detects network error by checking the IFF_RUNING
How to Configure IPMP on Solaris
*PROBE-BASED IPMP*
{Probe-Based IPMP Requirements:
* The Solaris 8 10/00 OS, as a minimum, must be installed.
* Unique MAC addresses must be configured on each network interface.
* Multiple network adapter interfaces must be connected on each subnet.
* An IPMP group name must be assigned to the group of interfaces.
* A test address is assigned to an interface.
* Additional hosts or devices must exist on the same subnet.
{Configuring Probe-Based IPMP:
1. # cat /etc/release
2. # eeprom ”local-mac-address?=true”
3. # ifconfig e1000g0 10.5.0.11 netmask + broadcast + up
4. # ifconfig e1000g0 group
5. # ifconfig e1000g0 addif 10.5.0.61 netmask + broadcast + failover deprecated up
6. # ifconfig e1000g1 10.5.0.21 netmask + broadcast + group
7. # ifconfig e1000g1 addif 10.5.0.71 netmask + broadcast + failover deprecated up
8. # ifconfig -a
{Configuring Probe-Based IPMP using configuration files
1. # cat /etc/hostname.eri0
10.10.0.11 netmask + broadcast + group mptest1 up \
addif 10.5.0.61 netmask + broadcast + -failover \
deprecated up
2. # cat /etc/hostname.qfe2
10.10.0.21 netmask + broadcast + group mptest1 up \
addif 10.5.0.71 netmask + broadcast + -failover \
deprecated up
3. # init 6
*LINK-BASED IPMP*
{Link-Based IPMP Requirements:
* Solaris 9 12/02 OS, at a minimum, must be installed.
* Network interfaces must use any of the following drivers: hme, eri, ce, ge, bge, qfe, dmfe, e1000g, ixgb, nge, nxge, rge, xge
* Unique MAC addresses must be configured on each of the interfaces.
* An IPMP group name must be assigned to interfaces
{Configuring Link-Based IPMP
1. # cat /etc/release
2. # eeprom ”localmacaddress=true”
3. # ifconfig eri0 10.10.0.11 netmask + broadcast + group
4. # ifconfig hme0 10.10.0.21 netmask + broadcast + group
5. # ifconfig a
{Configuring Link-IPMP – Administration Guide – IP ServicesBased IPMP using configuration files
1. # cat /etc/hostname.eri0
10.10.0.11 netmask + broadcast + group
2. # cat /etc/hostname.hme0
10.10.0.21 netmask + broadcast + group
3. # init 6
Reference:
IPMP – Administration Guide – IP Services
man ifconfig
man in.mpathd
docs.sun.com
Labels:
Solaris
Step Install Oracle 10g R2 on Solaris 10 x86 ( with /etc/project )
Checking Requirement:
—————————-
#/usr/sbin/prtconf | grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
# cat /etc/nsswitch.conf | grep hosts
# hostname
# domainname
RUN INSTALL:
—————-
A. create group name “dba”, oracle inventory group “oinstall” and “oracle” user
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
{Determine oracle user exist or not
# id -a oracle
{if exist, should be look like this=
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
{create oracle user=
# useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle
#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle
{set password=
# passwd -r files oracle
{to determine nobody user=
# id nobody
# /usr/sbin/useradd nobody >>run if does not exist
B. EDIT FILE /export/home/oracle/.profile
————————————–
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle [replace with ur Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [replace with ur Oracle home Directory]
ORACLE_SID=jktdb [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
C. Configure Kernel Parameter
—————————–
Note: Do not follow the official installation instruction, they contain misleading and out errors of fact!
#projadd oracle [This command will create a new 'resource project']
edit the /etc/user_attr file:
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 [add this line]
then:
#su – oracle
$ id -p
$ prctl -n project.max-shm-memory -i project oracle
The display look like this:
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 126MB – deny -
system 16.0EB max deny -
leaving the oracle user still connected in the original one Then, as root in the new terminal, you can issue this command:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [create max memory to 4GB]
As soon as you’ve issued that command, switch back to the oracle user’s session and re-issue the earlier command:
$ prctl -n project.max-shm-memory -i project oracle
Note:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [this setting will lost after reboot]
to set permanently, run this: #projmod -s -K “project.max-shm-memory=(priv,4gb,deny)” oracle
D. Performing the Oracle Installation
————————————-
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost + >>run this if you install from remote PC
$ cd /export/home/database/ [the source unzipped here]
./runInstaller
FOR SOLARIS SPARC:
====================
$ gunzip ship_rel10_sol64_db.cpio.gz
$ cpio -idm < ship_rel10_sol64_db.cpio
$./runInstaller
If you found unsufficient SWAP disk space on your disk, create folder under / then run this command:
—————————————————
$ TMP=/directory
$ TMPDIR=/directory
$ export TMP TMPDIR
Follow the screen>>NEXT>>NEXT
last, run this as root user:
—————————-
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
Create db:
———-
orc1
jktdb
E. 6.0 On-going Administration
——————————–
Finally, it’s time to get the web-based Enterprise Manager database administration tool up and running.
Since we’re using 10g Release 2, you should be able to launch a browser (Launch -> Web Browser) and simply navigate to : http://localhost:1158/em
If you do not know the correct port number to use, look for the following line in the $ORACLE_HOME/install/portlist.ini file.
in order to be able to log on as SYS with a password of whatever you supplied to the first screen of the Oracle installation wizard. In fact, getting a meaningful result at this point relies on three things having been performed successfully:
1. starting a listener (lsnrctl start)
2. opening the database (sqlplus / as sysdba then startup)
3. starting the Enterprise Manager agent (emctl start dbconsole)
F. Automating Database Startup
———————————————–
edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora”
——-
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo “Oracle startup: cannot start”
exit
fi
case “$1″ in
’start’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
;;
’stop’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
;;
esac
———
#chmod 777 /etc/init.d/dbora
#/etc/init.d/dbora stop
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/rc2.d/S99dbora
IF u found error this:
———————–
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
edit file “dbstart” & “dbshut”, find line $ORACLE_HOME_LISTNER=$1
and change to = $ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1
RECOMMENDED DIRECTORY STRUCTURE:
———————————————-
[Oracle Base Directory:]
/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle
[Oracle Inventory Directory:]
ORACLE_BASE/oraInventory
[Oracle Home Directory:]
ORACLE_BASE/product/10.2.0/db_1
[Identify an existing oracle base directory:]
#more /var/opt/oracle/oraInst.loc
[the output should be:]
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
# more /var/opt/oracle/oratab
*:/u03/app/oracle/product/10.2.0/db_1:N
*:/opt/orauser/infra_904:N
*:/oracle/9.2.0:N
COMMON INSTALLATION ERROR:
===========================
Unable to convert from “UTF-8″ to “646″ for NLS!
Solution: Install SUNWuiu8 package.
error adduser:
———————
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)
This is because the /etc/passwd and /etc/shadow files are out of synchronization on your machine. [CSCdi74894]
To fix this, run the pwconv command, and then rerun cwconfigure.
try to run:
wc -l /etc/passwd /etc/shadow
————–
ERROR Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for
display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before continuing with theinstallation, at which time they will be rechecked.
Solution(s):
1. Install SUNWxwplt package
2. Set DISPLAY variable
3. Execute xhost + on target (set in DISPLAY) computer
———————————————————-
Exception in thread “main” java.lang.UnsatisfiedLinkError:
… libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory
Solution: Install the SUNWmfrun package.
—————————————————————————————————-
Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module
Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at
/usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation
failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19.
Solution: Install the SUNWpool SUNWpoolr packages.
———————————————————————–
bash-3.00$ /u01/app/oracle/product/10.2.0/db_1/bin/./emctl start dbconsole
Exception in getting local host
java.net.UnknownHostException: -a: -a
at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4977)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3758)
Exception in getting local host
Solution : check server hostname and /etc/hosts
————————————————————————-
UNINSTALL ORACLE 10G:
———————
1. remove all database, by running $dbca
2. stop any oracle process running:
Database Control : $ORACLE_HOME/bin/emctl stop dbconsole
Oracle Net listener : $ORACLE_HOME/bin/lsnrctl stop
iSQL*Plus : $ORACLE_HOME/bin/isqlplusctl stop
Ultra Search : $ORACLE_HOME/bin/searchctl stop
3. Start Oracle Universal installer:
$ORACLE_HOME/oui/bin/runInstaller
4. In the Welcome window, click Deinstall Products.
5. In the Inventory screen, select the Oracle home and the products that you want to remove,
then click Remove.
—————————-
#/usr/sbin/prtconf | grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt
# cat /etc/nsswitch.conf | grep hosts
# hostname
# domainname
RUN INSTALL:
—————-
A. create group name “dba”, oracle inventory group “oinstall” and “oracle” user
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
{Determine oracle user exist or not
# id -a oracle
{if exist, should be look like this=
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
{create oracle user=
# useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle
#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle
{set password=
# passwd -r files oracle
{to determine nobody user=
# id nobody
# /usr/sbin/useradd nobody >>run if does not exist
B. EDIT FILE /export/home/oracle/.profile
————————————–
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle [replace with ur Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [replace with ur Oracle home Directory]
ORACLE_SID=jktdb [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
C. Configure Kernel Parameter
—————————–
Note: Do not follow the official installation instruction, they contain misleading and out errors of fact!
#projadd oracle [This command will create a new 'resource project']
edit the /etc/user_attr file:
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 [add this line]
then:
#su – oracle
$ id -p
$ prctl -n project.max-shm-memory -i project oracle
The display look like this:
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 126MB – deny -
system 16.0EB max deny -
leaving the oracle user still connected in the original one Then, as root in the new terminal, you can issue this command:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [create max memory to 4GB]
As soon as you’ve issued that command, switch back to the oracle user’s session and re-issue the earlier command:
$ prctl -n project.max-shm-memory -i project oracle
Note:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [this setting will lost after reboot]
to set permanently, run this: #projmod -s -K “project.max-shm-memory=(priv,4gb,deny)” oracle
D. Performing the Oracle Installation
————————————-
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost +
$ cd /export/home/database/ [the source unzipped here]
./runInstaller
FOR SOLARIS SPARC:
====================
$ gunzip ship_rel10_sol64_db.cpio.gz
$ cpio -idm < ship_rel10_sol64_db.cpio
$./runInstaller
If you found unsufficient SWAP disk space on your disk, create folder under / then run this command:
—————————————————
$ TMP=/directory
$ TMPDIR=/directory
$ export TMP TMPDIR
Follow the screen>>NEXT>>NEXT
last, run this as root user:
—————————-
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
Create db:
———-
orc1
jktdb
E. 6.0 On-going Administration
——————————–
Finally, it’s time to get the web-based Enterprise Manager database administration tool up and running.
Since we’re using 10g Release 2, you should be able to launch a browser (Launch -> Web Browser) and simply navigate to : http://localhost:1158/em
If you do not know the correct port number to use, look for the following line in the $ORACLE_HOME/install/portlist.ini file.
in order to be able to log on as SYS with a password of whatever you supplied to the first screen of the Oracle installation wizard. In fact, getting a meaningful result at this point relies on three things having been performed successfully:
1. starting a listener (lsnrctl start)
2. opening the database (sqlplus / as sysdba then startup)
3. starting the Enterprise Manager agent (emctl start dbconsole)
F. Automating Database Startup
———————————————–
edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora”
——-
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo “Oracle startup: cannot start”
exit
fi
case “$1″ in
’start’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
;;
’stop’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
;;
esac
———
#chmod 777 /etc/init.d/dbora
#/etc/init.d/dbora stop
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/rc2.d/S99dbora
IF u found error this:
———————–
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener
edit file “dbstart” & “dbshut”, find line $ORACLE_HOME_LISTNER=$1
and change to = $ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1
RECOMMENDED DIRECTORY STRUCTURE:
———————————————-
[Oracle Base Directory:]
/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle
[Oracle Inventory Directory:]
ORACLE_BASE/oraInventory
[Oracle Home Directory:]
ORACLE_BASE/product/10.2.0/db_1
[Identify an existing oracle base directory:]
#more /var/opt/oracle/oraInst.loc
[the output should be:]
inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall
# more /var/opt/oracle/oratab
*:/u03/app/oracle/product/10.2.0/db_1:N
*:/opt/orauser/infra_904:N
*:/oracle/9.2.0:N
COMMON INSTALLATION ERROR:
===========================
Unable to convert from “UTF-8″ to “646″ for NLS!
Solution: Install SUNWuiu8 package.
error adduser:
———————
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)
This is because the /etc/passwd and /etc/shadow files are out of synchronization on your machine. [CSCdi74894]
To fix this, run the pwconv command, and then rerun cwconfigure.
try to run:
wc -l /etc/passwd /etc/shadow
————–
ERROR Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for
display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before continuing with theinstallation, at which time they will be rechecked.
Solution(s):
1. Install SUNWxwplt package
2. Set DISPLAY variable
3. Execute xhost + on target (set in DISPLAY) computer
———————————————————-
Exception in thread “main” java.lang.UnsatisfiedLinkError:
… libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory
Solution: Install the SUNWmfrun package.
—————————————————————————————————-
Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module
Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at
/usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation
failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19.
Solution: Install the SUNWpool SUNWpoolr packages.
———————————————————————–
bash-3.00$ /u01/app/oracle/product/10.2.0/db_1/bin/./emctl start dbconsole
Exception in getting local host
java.net.UnknownHostException: -a: -a
at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4977)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3758)
Exception in getting local host
Solution : check server hostname and /etc/hosts
————————————————————————-
UNINSTALL ORACLE 10G:
———————
1. remove all database, by running $dbca
2. stop any oracle process running:
Database Control : $ORACLE_HOME/bin/emctl stop dbconsole
Oracle Net listener : $ORACLE_HOME/bin/lsnrctl stop
iSQL*Plus : $ORACLE_HOME/bin/isqlplusctl stop
Ultra Search : $ORACLE_HOME/bin/searchctl stop
3. Start Oracle Universal installer:
$ORACLE_HOME/oui/bin/runInstaller
4. In the Welcome window, click Deinstall Products.
5. In the Inventory screen, select the Oracle home and the products that you want to remove,
then click Remove.
Wednesday, June 3, 2009
Oracle 10g Installation on Solaris 10
Overview
For our installation, we used the following ORACLE_HOME and ORACLE_SID, please adjust these parameters for your own environment.
*
ORACLE_HOME = /opt/oracle/product/9.2.0
*
ORACLE_SID = QUO1
Check Hardware Requirements
Minimal Memory: 1024 MB
To determine the amount of RAM memory installed on your system, enter the following command.
$ /usr/sbin/prtconf
Minimal Swap Space:
To determine the amount of Swap Space installed on your system, enter the following command.
$ /usr/sbin/swap -s
*
Between 1024 MB and 2048 MB 1.5 times the size of RAM
*
Between 2049 MB and 8192 MB Equal to the size of RAM
*
More than 8192 MB 0.75 times the size of RAM
Minimal Disk Space in /tmp: 400 MB
To determine the amount of disk space available in the /tmp directory, enter the following command:
$ df -h /tmp
Operating System Software Requirements
Use the latest kernel patch from Sun Microsystems (http://sunsolve.sun.com)
- Download the Patch from: http://sunsolve.sun.com
- Read the README File included in the Patch
- Usually the only thing you have to do is:
$ cd
$ ./install_custer
$ cat /var/sadm/install_data/_log
$ showrev -p
- Reboot the system
To determine your current operating system information:
$ uname -a
To determine which operating system patches are installed:
$ showrev -p
To determine which operating system packages are installed:
$ pkginfo -i [package_name]
To determine if your X-windows system is working properly on your local system, but you can redirect the X-windows output to another system.
$ xclock
To determine if you are using the correct system executables:
$ /usr/bin/which make
$ /usr/bin/which ar
$ /usr/bin/which ld
$ /usr/bin/which nm
Each of the four commands above should point to the /usr/ccs/bin directory. If not, add /usr/ccs/bin to the beginning of the PATH environment variable in the current shell.
Java Runtime Environment (JRE)
The JRE shipped with Oracle10 is used by Oracle Java applications such as the Oracle Universal Installer is the only one supported. You should not modify this JRE, unless it is done through a patch provided by Oracle Support Services. The inventory can contain multiple versions of the JRE, each of which can be used by one or more products or releases. The Installer creates the oraInventory directory the first time it is run to keep an inventory of products that it installs on your system as well as other installation information. The location of oraInventory is defined in /var/opt/oracle/oraInst.loc. Products in an ORACLE_HOME access the JRE through a symbolic link in $ORACLE_HOME/JRE to the actual location of a JRE within the inventory. You should not modify the symbolic link.
Check Software Limits
Oracle10 includes native support for files greater than 2 GB. Check your shell to determine whether it will impose a limit.
To check current soft shell limits, enter the following command:
$ ulimit -Sa
To check maximum hard limits, enter the following command:
$ ulimit -Ha
The file (blocks) value should be multiplied by 512 to obtain the maximum file size imposed by the shell. A value of unlimited is the operating system default and is the maximum value of 1 TB.
Setup the Solaris Kernel
In Solaris 10, you are not required to make changes to the /etc/system file to implement the System V TPC. Solaris 10 uses the resource control facility for its implementation.
Parameter Resource Control Recommended Value
noexec_user_stack NA 1
semsys:seminfo_semmni project.max-sem-ids 100
semsys:seminfo_semmsl process.max-sem-nsems 256
shmsys:shminfo_shmmax project.max-shm-memory 4294967295
shmsys:shminfo_shmmni project.max-shm-ids 100
Many kernel parameters have been replaced by so called resource controls in Solaris 10. It is possible to change resource controls using the prctl command. All shared memory and semaphore settings are now handled via resource controls, so any entries regarding shared memory or semaphores (shm & sem) in /etc/system will be ignored.
Here is the procedure we followed to modify the kernel parameters on Solaris 10 / Oracle 10.2.0.3.
Unlike earlier releases of Solaris, most of the system parameters needed to run Oracle are already set properly, so the only one you need is the maximum shared memory parameter. In earlier versions this was called SHMMAX and was set by editing the /etc/system file and rebooting. With Solaris 10 you set this by modifying a «Resource Control Value». You can do this temporarily by using prctl, but that is lost at reboot so you will need to add the command to the oracle user's $HOME/.profile.
The other option is to create a default project for the oracle user.
# projadd -U oracle -K "project.max-shm-memory=(priv,4096MB,deny)" user.oracle
What this does:
* Makes a project named "user.oracle" in /etc/project with the user oracle as it's only member.
# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:100::oracle::project.max-shm-memory=(priv,4294967296,deny)
* Because the name was of the form "user.username" it becomes the oracle user's default project.
* The value of the maximum shared memory is set to 4GB, you might want to use a larger value here if you have more memory and swap.
* No reboot is needed, the user will get the new value
at their next login.
Now you can also modify the max-sem-ids Parameter:
# projmod -s -K "project.max-sem-ids=(priv,256,deny)" user.oracle
Check the Parameters as User oracle
$ prctl -i project user.oracle
project: 100: user.oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-contracts
privileged 10.0K - deny -
system 2.15G max deny -
project.max-device-locked-memory
privileged 125MB - deny -
system 16.0EB max deny -
project.max-port-ids
privileged 8.19K - deny -
system 65.5K max deny -
project.max-shm-memory
privileged 4.00GB - deny -
system 16.0EB max deny -
project.max-shm-ids
privileged 128 - deny -
system 16.8M max deny -
project.max-msg-ids
privileged 128 - deny -
system 16.8M max deny -
project.max-sem-ids
privileged 256 - deny -
system 16.8M max deny -
project.max-crypto-memory
privileged 498MB - deny -
system 16.0EB max deny -
project.max-tasks
system 2.15G max deny -
project.max-lwps
system 2.15G max deny -
project.cpu-shares
privileged 1 - none -
system 65.5K max none -
zone.max-lwps
system 2.15G max deny -
zone.cpu-shares
privileged 1 - none -
Create Unix Group «dba»
$ groupadd -g 400 dba
$ groupdel dba
Create Unix User «oracle»
$ useradd -u 400 -c "Oracle Owner" -d /export/home/oracle \
-g "dba" -m -s /bin/ksh oracle
Setup ORACLE environment ($HOME/.bash_profile) as follows
# Setup ORACLE environment
ORACLE_HOME=/opt/oracle/product/10.2.0; export ORACLE_HOME
ORACLE_SID=QUO1; export ORACLE_SID
TNS_ADMIN=/home/oracle/config/10.2.0 export TNS_ADMIN
ORA_NLS10=${ORACLE_HOME}/nls/data; export ORA_NLS10
CLASSPATH=${CLASSPATH}:${ORACLE_HOME}/jdbc/lib/classes12.zip
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_OWNER=oracle; export ORACLE_OWNER
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
LD_LIBRARY_PATH=/usr/lib:${ORACLE_HOME}/lib:${ORACLE_HOME}/lib32; export LD_LIBRARY_PATH
# Set up the search paths
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/sfw/sbin
PATH=$PATH:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/sadm/bin
PATH=$PATH:/usr/sfw/bin:/usr/X11/bin:/usr/j2se/bin
PATH=$PATH:$ORACLE_HOME/bin
Install Oracle Software
To extract the installation archive files, perform the following steps:
$ gunzip filename.cpio.gz
$ cpio -idcmv < filename.cpio
Check oraInst.loc File
If you used Oracle before on your system, then you must edit the Oracle Inventory File, usually located in:
/var/opt/oracle/oraInst.loc
Install with Installer in interactive mode
Install Oracle 10g with Oracle Installer
$ DISPLAY=:0.0
$ export DISPLAY
$ ./runInstaller
Edit the Database Startup Script /var/opt/oracle/oratab
QUO1:/opt/oracle/product/10.2.0:Y
Create Password File
If the DBA wants to start up an Oracle instance there must be a way for Oracle to authenticate this DBA. That is if he is allowed to do so. Obviously, his password can not be stored in the database, because Oracle can not access the database if the instance has not been started up. Therefore, the authentication of the DBA must happen outside of the database.
The init parameter remote_login_passwordfile specifies if a password file is used to authenticate the DBA or not. If it set either to shared or exclusive a password file will be used.
Default location and file name
The default location for the password file is: $ORACLE_HOME/dbs/orapw$ORACLE_SID
Deleting a password file
If password file authentication is no longer needed, the password file can be deleted and the init parameter remote_login_passwordfile set to none.
Password file state
If a password file is shared or exclusive is also stored in the password file. After its creation, the state is shared. The state can be changed by setting remote_login_passwordfile and starting the database. That is, the database overwrites the state in the password file when it is started up. A password file whose state is shared can only contain SYS.
Creating a password file
Password files are created with the orapwd tool.
$ orapwd file=orapwQUO1 password=manager entries=5 force=y
Create a Symbolic Link from $ORACLE_HOME/dbs to the Password.
Create the Database
Edit the CREATE DATABASE File initQUO1.ora and create a symbolic-Link from $ORACLE_HOME/dbs to your Location.
$ cd $ORACLE_HOME/dbs
$ ln -s /home/oracle/config/10.2.0/initQUO1.ora initQUO1.ora
$ ls -l
lrwxrwxrwx 1 oracle dba 39 Jun 5 12:55 initQUO1.ora -> /home/oracle/config/10.2.0/initQUO1.ora
lrwxrwxrwx 1 oracle dba 36 Jun 5 12:58 orapwQUO1 -> /home/oracle/config/10.2.0/orapwQUO1
First start the Instance, just to test your initQUO1.ora file for correct syntax and system resources.
$ cd /export/home/oracle/config/10.2.0/
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup nomount
SQL> shutdown immediate
Now you can create the Database
SQL> @initQUO1.sql
SQL> @shutdown immediate
SQL> startup
Check the Logfile: initQUO1.log
Start Listener
$ lsnrctl start LSNRQUO1
Automatically Start / Stop the Database
Solaris 10 has introduced the Solaris Service Management Facility to start / stop Services.
Services that are started by traditional rc scripts (referred to as legacy services) will generally continue to work as they always have. They will show up in the output of svcs(1), with an FMRI based on the pathname of their rc script, but they can not be controlled by svcadm(1M). They should be stopped and started by running the rc script directly.
$ svcs | grep oracle
legacy_run 8:27:00 lrc:/etc/rc3_d/S99oracle
To start the Database automatically on Boot-Time, create or use our Startup Scripts oracle which must be installed in /etc/init.d. Create symbolic Links from the Startup Directories.
lrwxrwxrwx 1 root root S99oracle -> ../init.d/oracle
For our installation, we used the following ORACLE_HOME and ORACLE_SID, please adjust these parameters for your own environment.
*
ORACLE_HOME = /opt/oracle/product/9.2.0
*
ORACLE_SID = QUO1
Check Hardware Requirements
Minimal Memory: 1024 MB
To determine the amount of RAM memory installed on your system, enter the following command.
$ /usr/sbin/prtconf
Minimal Swap Space:
To determine the amount of Swap Space installed on your system, enter the following command.
$ /usr/sbin/swap -s
*
Between 1024 MB and 2048 MB 1.5 times the size of RAM
*
Between 2049 MB and 8192 MB Equal to the size of RAM
*
More than 8192 MB 0.75 times the size of RAM
Minimal Disk Space in /tmp: 400 MB
To determine the amount of disk space available in the /tmp directory, enter the following command:
$ df -h /tmp
Operating System Software Requirements
Use the latest kernel patch from Sun Microsystems (http://sunsolve.sun.com)
- Download the Patch from: http://sunsolve.sun.com
- Read the README File included in the Patch
- Usually the only thing you have to do is:
$ cd
$ ./install_custer
$ cat /var/sadm/install_data/
$ showrev -p
- Reboot the system
To determine your current operating system information:
$ uname -a
To determine which operating system patches are installed:
$ showrev -p
To determine which operating system packages are installed:
$ pkginfo -i [package_name]
To determine if your X-windows system is working properly on your local system, but you can redirect the X-windows output to another system.
$ xclock
To determine if you are using the correct system executables:
$ /usr/bin/which make
$ /usr/bin/which ar
$ /usr/bin/which ld
$ /usr/bin/which nm
Each of the four commands above should point to the /usr/ccs/bin directory. If not, add /usr/ccs/bin to the beginning of the PATH environment variable in the current shell.
Java Runtime Environment (JRE)
The JRE shipped with Oracle10 is used by Oracle Java applications such as the Oracle Universal Installer is the only one supported. You should not modify this JRE, unless it is done through a patch provided by Oracle Support Services. The inventory can contain multiple versions of the JRE, each of which can be used by one or more products or releases. The Installer creates the oraInventory directory the first time it is run to keep an inventory of products that it installs on your system as well as other installation information. The location of oraInventory is defined in /var/opt/oracle/oraInst.loc. Products in an ORACLE_HOME access the JRE through a symbolic link in $ORACLE_HOME/JRE to the actual location of a JRE within the inventory. You should not modify the symbolic link.
Check Software Limits
Oracle10 includes native support for files greater than 2 GB. Check your shell to determine whether it will impose a limit.
To check current soft shell limits, enter the following command:
$ ulimit -Sa
To check maximum hard limits, enter the following command:
$ ulimit -Ha
The file (blocks) value should be multiplied by 512 to obtain the maximum file size imposed by the shell. A value of unlimited is the operating system default and is the maximum value of 1 TB.
Setup the Solaris Kernel
In Solaris 10, you are not required to make changes to the /etc/system file to implement the System V TPC. Solaris 10 uses the resource control facility for its implementation.
Parameter Resource Control Recommended Value
noexec_user_stack NA 1
semsys:seminfo_semmni project.max-sem-ids 100
semsys:seminfo_semmsl process.max-sem-nsems 256
shmsys:shminfo_shmmax project.max-shm-memory 4294967295
shmsys:shminfo_shmmni project.max-shm-ids 100
Many kernel parameters have been replaced by so called resource controls in Solaris 10. It is possible to change resource controls using the prctl command. All shared memory and semaphore settings are now handled via resource controls, so any entries regarding shared memory or semaphores (shm & sem) in /etc/system will be ignored.
Here is the procedure we followed to modify the kernel parameters on Solaris 10 / Oracle 10.2.0.3.
Unlike earlier releases of Solaris, most of the system parameters needed to run Oracle are already set properly, so the only one you need is the maximum shared memory parameter. In earlier versions this was called SHMMAX and was set by editing the /etc/system file and rebooting. With Solaris 10 you set this by modifying a «Resource Control Value». You can do this temporarily by using prctl, but that is lost at reboot so you will need to add the command to the oracle user's $HOME/.profile.
The other option is to create a default project for the oracle user.
# projadd -U oracle -K "project.max-shm-memory=(priv,4096MB,deny)" user.oracle
What this does:
* Makes a project named "user.oracle" in /etc/project with the user oracle as it's only member.
# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:100::oracle::project.max-shm-memory=(priv,4294967296,deny)
* Because the name was of the form "user.username" it becomes the oracle user's default project.
* The value of the maximum shared memory is set to 4GB, you might want to use a larger value here if you have more memory and swap.
* No reboot is needed, the user will get the new value
at their next login.
Now you can also modify the max-sem-ids Parameter:
# projmod -s -K "project.max-sem-ids=(priv,256,deny)" user.oracle
Check the Parameters as User oracle
$ prctl -i project user.oracle
project: 100: user.oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-contracts
privileged 10.0K - deny -
system 2.15G max deny -
project.max-device-locked-memory
privileged 125MB - deny -
system 16.0EB max deny -
project.max-port-ids
privileged 8.19K - deny -
system 65.5K max deny -
project.max-shm-memory
privileged 4.00GB - deny -
system 16.0EB max deny -
project.max-shm-ids
privileged 128 - deny -
system 16.8M max deny -
project.max-msg-ids
privileged 128 - deny -
system 16.8M max deny -
project.max-sem-ids
privileged 256 - deny -
system 16.8M max deny -
project.max-crypto-memory
privileged 498MB - deny -
system 16.0EB max deny -
project.max-tasks
system 2.15G max deny -
project.max-lwps
system 2.15G max deny -
project.cpu-shares
privileged 1 - none -
system 65.5K max none -
zone.max-lwps
system 2.15G max deny -
zone.cpu-shares
privileged 1 - none -
Create Unix Group «dba»
$ groupadd -g 400 dba
$ groupdel dba
Create Unix User «oracle»
$ useradd -u 400 -c "Oracle Owner" -d /export/home/oracle \
-g "dba" -m -s /bin/ksh oracle
Setup ORACLE environment ($HOME/.bash_profile) as follows
# Setup ORACLE environment
ORACLE_HOME=/opt/oracle/product/10.2.0; export ORACLE_HOME
ORACLE_SID=QUO1; export ORACLE_SID
TNS_ADMIN=/home/oracle/config/10.2.0 export TNS_ADMIN
ORA_NLS10=${ORACLE_HOME}/nls/data; export ORA_NLS10
CLASSPATH=${CLASSPATH}:${ORACLE_HOME}/jdbc/lib/classes12.zip
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_OWNER=oracle; export ORACLE_OWNER
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
LD_LIBRARY_PATH=/usr/lib:${ORACLE_HOME}/lib:${ORACLE_HOME}/lib32; export LD_LIBRARY_PATH
# Set up the search paths
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/sfw/sbin
PATH=$PATH:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/sadm/bin
PATH=$PATH:/usr/sfw/bin:/usr/X11/bin:/usr/j2se/bin
PATH=$PATH:$ORACLE_HOME/bin
Install Oracle Software
To extract the installation archive files, perform the following steps:
$ gunzip filename.cpio.gz
$ cpio -idcmv < filename.cpio
Check oraInst.loc File
If you used Oracle before on your system, then you must edit the Oracle Inventory File, usually located in:
/var/opt/oracle/oraInst.loc
Install with Installer in interactive mode
Install Oracle 10g with Oracle Installer
$ DISPLAY=
$ export DISPLAY
$ ./runInstaller
Edit the Database Startup Script /var/opt/oracle/oratab
QUO1:/opt/oracle/product/10.2.0:Y
Create Password File
If the DBA wants to start up an Oracle instance there must be a way for Oracle to authenticate this DBA. That is if he is allowed to do so. Obviously, his password can not be stored in the database, because Oracle can not access the database if the instance has not been started up. Therefore, the authentication of the DBA must happen outside of the database.
The init parameter remote_login_passwordfile specifies if a password file is used to authenticate the DBA or not. If it set either to shared or exclusive a password file will be used.
Default location and file name
The default location for the password file is: $ORACLE_HOME/dbs/orapw$ORACLE_SID
Deleting a password file
If password file authentication is no longer needed, the password file can be deleted and the init parameter remote_login_passwordfile set to none.
Password file state
If a password file is shared or exclusive is also stored in the password file. After its creation, the state is shared. The state can be changed by setting remote_login_passwordfile and starting the database. That is, the database overwrites the state in the password file when it is started up. A password file whose state is shared can only contain SYS.
Creating a password file
Password files are created with the orapwd tool.
$ orapwd file=orapwQUO1 password=manager entries=5 force=y
Create a Symbolic Link from $ORACLE_HOME/dbs to the Password.
Create the Database
Edit the CREATE DATABASE File initQUO1.ora and create a symbolic-Link from $ORACLE_HOME/dbs to your Location.
$ cd $ORACLE_HOME/dbs
$ ln -s /home/oracle/config/10.2.0/initQUO1.ora initQUO1.ora
$ ls -l
lrwxrwxrwx 1 oracle dba 39 Jun 5 12:55 initQUO1.ora -> /home/oracle/config/10.2.0/initQUO1.ora
lrwxrwxrwx 1 oracle dba 36 Jun 5 12:58 orapwQUO1 -> /home/oracle/config/10.2.0/orapwQUO1
First start the Instance, just to test your initQUO1.ora file for correct syntax and system resources.
$ cd /export/home/oracle/config/10.2.0/
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup nomount
SQL> shutdown immediate
Now you can create the Database
SQL> @initQUO1.sql
SQL> @shutdown immediate
SQL> startup
Check the Logfile: initQUO1.log
Start Listener
$ lsnrctl start LSNRQUO1
Automatically Start / Stop the Database
Solaris 10 has introduced the Solaris Service Management Facility to start / stop Services.
Services that are started by traditional rc scripts (referred to as legacy services) will generally continue to work as they always have. They will show up in the output of svcs(1), with an FMRI based on the pathname of their rc script, but they can not be controlled by svcadm(1M). They should be stopped and started by running the rc script directly.
$ svcs | grep oracle
legacy_run 8:27:00 lrc:/etc/rc3_d/S99oracle
To start the Database automatically on Boot-Time, create or use our Startup Scripts oracle which must be installed in /etc/init.d. Create symbolic Links from the Startup Directories.
lrwxrwxrwx 1 root root S99oracle -> ../init.d/oracle
Tuesday, June 2, 2009
Opensolaris 2009.06 Release
Open Solaris 2009.06 is out now, you can download from - http://opensolaris.com/get
Special features - http://link.brightcove.com/services/player/bcpid1640183659?bctid=24694644001
http://www.sun.com/aboutsun/media/features/2009-0601/index.jsp
Project Crossbow Takes Networking to a New Level
As a follow on to Sun's ZFS technology, which reinvented the fundamental concept of file systems, Project Crossbow's complete re-architecture of the network stack becomes the new standard for how networking at the operating system level is done. This project delivers, for the first time, the networking capability designed for virtualization in combination with highly scaled, multiple-core, multi-threaded processors connected with extremely fast network interfaces. More information on Project Crossbow is available at: http://opensolaris.com/learn.
Project Crossbow's virtual network interfaces provide full resource management to simplify administration of complex deployments of multi-tiered applications on a single machine or an entire datacenter. Combined with the ability to scale the workload of single or multiple network interfaces across multiple core and processor systems, up to the largest systems available in the world today, customers can increase network efficiency and performance. Available today, both of these networking enhancements are major milestones for an enterprise operating system and are likely to set a new standard for next generation operating system platforms.
Major Enhancements Continue in Storage
OpenSolaris 2009.06 provides dozens of enhancements to the breakthrough technology of ZFS and encompasses it with a complete architecture of connectivity and protocol support. New, fully integrated flash storage support in ZFS helps to optimize large scale pools of very high performance storage by designating flash devices as write accelerators and read accelerators. These pools are automatically managed by ZFS to achieve extreme levels of performance across many workloads, making the need for small caches on RAID controllers obsolete.
Native support for Microsoft CIFS has been added as a full peer to NFS, as a high performance kernel with integrated features and support for Microsoft Windows semantics for security, naming and access rights, allowing transparent use and sharing of files across Windows, Linux and Solaris environments. To round out the complete storage capability, Sun has designed new, very high performance support for iSCSI and Fiberchannel block protocols into the Solaris kernel, allowing systems running OpenSolaris to participate as a client and a target for virtually any storage topology.
All of these storage features are integrated into the Solaris platform and take full advantage of its core functionality including: fault management, networking, multi-threaded scaling, performance, security and resource management capabilities. More information on the storage enhancements in OpenSolaris is available at: http://opensolaris.com/learn.
Comprehensive Approach to Virtualization
With this announcement, Sun continues to deliver on a holistic, built-in virtualization design for networking, storage and application abstraction, raising performance and scale to new highs for the industry. Building on the advances in networking storage virtualization, the OpenSolaris platform delivers key server virtualization technologies in the form of Solaris Containers, Logical Domains (LDoms) for Sun CMT systems and the Xen-based hypervisor to give users a complete virtualization platform built directly into the OpenSolaris OS. One of the most widely deployed virtualization technologies in the world, Solaris Containers provide lightweight, agile, software-defined boundaries that can be used to create virtual servers for consolidating hundreds of existing enterprise-class workloads onto a single system. More information on the built-in virtualization capabilities of OpenSolaris is available at: http://opensolaris.com/learn.
Special features - http://link.brightcove.com/services/player/bcpid1640183659?bctid=24694644001
http://www.sun.com/aboutsun/media/features/2009-0601/index.jsp
Project Crossbow Takes Networking to a New Level
As a follow on to Sun's ZFS technology, which reinvented the fundamental concept of file systems, Project Crossbow's complete re-architecture of the network stack becomes the new standard for how networking at the operating system level is done. This project delivers, for the first time, the networking capability designed for virtualization in combination with highly scaled, multiple-core, multi-threaded processors connected with extremely fast network interfaces. More information on Project Crossbow is available at: http://opensolaris.com/learn.
Project Crossbow's virtual network interfaces provide full resource management to simplify administration of complex deployments of multi-tiered applications on a single machine or an entire datacenter. Combined with the ability to scale the workload of single or multiple network interfaces across multiple core and processor systems, up to the largest systems available in the world today, customers can increase network efficiency and performance. Available today, both of these networking enhancements are major milestones for an enterprise operating system and are likely to set a new standard for next generation operating system platforms.
Major Enhancements Continue in Storage
OpenSolaris 2009.06 provides dozens of enhancements to the breakthrough technology of ZFS and encompasses it with a complete architecture of connectivity and protocol support. New, fully integrated flash storage support in ZFS helps to optimize large scale pools of very high performance storage by designating flash devices as write accelerators and read accelerators. These pools are automatically managed by ZFS to achieve extreme levels of performance across many workloads, making the need for small caches on RAID controllers obsolete.
Native support for Microsoft CIFS has been added as a full peer to NFS, as a high performance kernel with integrated features and support for Microsoft Windows semantics for security, naming and access rights, allowing transparent use and sharing of files across Windows, Linux and Solaris environments. To round out the complete storage capability, Sun has designed new, very high performance support for iSCSI and Fiberchannel block protocols into the Solaris kernel, allowing systems running OpenSolaris to participate as a client and a target for virtually any storage topology.
All of these storage features are integrated into the Solaris platform and take full advantage of its core functionality including: fault management, networking, multi-threaded scaling, performance, security and resource management capabilities. More information on the storage enhancements in OpenSolaris is available at: http://opensolaris.com/learn.
Comprehensive Approach to Virtualization
With this announcement, Sun continues to deliver on a holistic, built-in virtualization design for networking, storage and application abstraction, raising performance and scale to new highs for the industry. Building on the advances in networking storage virtualization, the OpenSolaris platform delivers key server virtualization technologies in the form of Solaris Containers, Logical Domains (LDoms) for Sun CMT systems and the Xen-based hypervisor to give users a complete virtualization platform built directly into the OpenSolaris OS. One of the most widely deployed virtualization technologies in the world, Solaris Containers provide lightweight, agile, software-defined boundaries that can be used to create virtual servers for consolidating hundreds of existing enterprise-class workloads onto a single system. More information on the built-in virtualization capabilities of OpenSolaris is available at: http://opensolaris.com/learn.
Labels:
OpenSolaris,
Solaris
Subscribe to:
Posts (Atom)


