Archive for August, 2006

Oracle 10g on Solaris 10 SPARC installation notes

groupadd -g 100 dba
groupadd -g 101 oinstall
useradd -u 101 -d /export/home/oracle -g oinstall -G dba -m -s /usr/bin/bash oracle
passwd oracle
cp /etc/system /etc/system.orig

Add the following parameters in /etc/system

set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10

/usr/sbin/reboot
su – oracle
mkdir oradata

Add the following parameters in .bash_profile

umask 022
export ORACLE_SID=[sid]
export ORACLE_HOME=[path]

export PATH=$ORACLE_HOME/bin:$PATH

. ./.bash_profile

Upload Oracle 10g binary (i.e. cpio or cpio.gz files) to a directory on the target machine. An example could be /download go to the directory where the Oracle binary are located gunzip each file by running gunzip [gz file]

su –

go to the directory where the Oracle binary are located
Create a working directory for each cpio file.

cpio -idmv < [cpio file]
cd /var/opt
mkdir oracle
cd oracle

Create a text file called oraInst.loc with the following content

inventory_loc=[ORACLE_HOME]/oraInventory
inst_group=

Then, set the file properties:
chown oracle:oinstall oraInst.loc
chmod 644 oraInst.loc

Edit the Oracle response file

cd into [cpio extracted directory]/Disk1/response/ directory
cp enterprise.rsp ../response_file.rsp

edit response_file.rsp

Define the following parameters:
ORACLE_HOME=”[oracle_home_value]” ORACLE_HOME_NAME=”[oracle_home_name_value]“
s_nameForDBAGrp=”dba”
s_nameForOPERGrp=”dba”
SHOW_DATABASE_CONFIGURATION_PAGE=false SHOW_DATABASE_OPTIONS_PAGE=false
s_globalDBName
s_dbSid SHOW_DATABASE_MANAGEMENT_PAGE=false SHOW_DATABASE_FILE_STORAGE_OPTION_PAGE=false

s_mountPoint=[data file location, ex: ORACLE_HOME/oradata] SHOW_BACKUP_RECOVERY_OPTION_PAGE=false SHOW_SCHEMA_PASSWORDS_PAGE=false
s_superAdminSamePasswd=[passord value] s_superAdminSamePasswordAgain=[passowrd value]
sl_superAdminPassowrds=[password value]
sl_superAdminPasswordsAgain=[password value]

comment out rest of parameters that has “Value Unspecified”, which are listed below: CLUSTER_NODES
s_dlgEMSMTPServer
s_dlgEMEmailAddress
s_dlgEMCentralAgentSelected
s_rawDeviceMapFileLocation
s_dlgRBORecoveryLocation
s_dlgRBOUsername
s_dlgRBOPassword

You should make sure that the following two parameters are defined:
ORACLE_HOME = “[home value]“
ORACLE_HOME_NAME=”[name value]”

su – oracle

cd to the directory where the installer is located, i.e. [directory where you ran cpio command]/Disk1

runInstaller -ignoreSysPrereqs -silent -responseFile [full path]/response_file.rsp

Note: -ignoreSysPrereqs is only required on Solaris 10. After the installation completed, run the root.sh script in [ORACLE_HOME]/root.sh.

Comments (26)

How to create an instance of Oracle database using DBCA command line tool?

Pre-condition: You must have Oracle database software installed and this note is for 10g.

You will only need to create an instance if you don’t already have one or if you wish to create a new instance. Check what you already have using ps -ef |grep ora

1. Make a copy of the response file (dbca.rsp in the installation binary directory, which should be [installation bin dir]/Disk1/response/dbca.rsp).

2. Make a copy: cp dbca.rsp ..

3. Edit the response file with local environment configuration information. The parameters that you should update are:

GDBNAME=”Your_GDBNAME_Value”
SID=”YourSID”
TEMPLATENAME = “New Database”

3. run ONE of the the following two command as Oracle user:
dbca -progress_only -responseFile [response file]

or

dbca -silent -responseFile [response file]

Note: -progress_only option will require graphical display. Set your DISPLAY env parameter if you are working remotely.

Comments (16)

Working with Security Manager in Sun Java System Application Server

For a quick and dirty fix, you can disable security manager by removing reference to server.policy in domain.xml. Here is the proper way to configure the security policy. If you want to override the default prmissions through code instead of configuration, here is one way.

Leave a Comment

How to configure log4j on Tomcat for one of your apps?

This instruction is only tested with deploying one and only one app on Tomcat. I only needed one anyway. ;)

1. Create a log4j.properties file. You can use the included code below. Make sure you change the “File” parameter to the correct value for your local environment. The source of the code listed below came from here:

log4j.debug=TRUE
log4j.rootLogger=INFO, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/home/i/h/ihrname.ch/tomcatlogs/tomcat.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSSS} %p %t %c – %m%n

2. Copy the file to /webapps/ping-server/WEB-INF/classes directory.

3. Restart Tomcat.

Comments (32)

Error out to standard out

2>&1

Leave a Comment

SSH Tricks

How to use ssh client with a proxy-server on Linux?
1. Check if you have ssh client installed.
which ssh
Most distro should have ssh client installed by default.
2. Install connect-proxy
apt-get install connect-proxy
3. Create ~/.ssh/config and use the following template to add an entry for your host.
Host host_name_alias
Hostname host_name
ProxyCommand connect-proxy -S proxy_user@proxy_server:proxy_port %h 22
4. ssh user_name@host_name

How to use ssh client with a proxy-server on Solaris 10?
/bin/ssh -o ‘ProxyCommand=/usr/lib/ssh/ssh-socks5-proxy-connect -h proxy_server -p proxy_port host_name 22′ host_name -l user_name

Note: change “proxy_user“, “proxy_server“, “proxy_port“, “user_name“, “host_name_alias“, and “host_name” with the appropariate value for your environment.

Leave a Comment

First Impression on Deepest Sender plugin for Firefox

Deepest Sender plugin for FireFox is only fair on my first impression. I get the familiar rich editor, which is good. Right cick on a page and I get to start blogging. The only thing that I would wish it can handle is the ability for me to include/upload a local image files with my blog post. Another annoyance is that I have to click on login everytime I want to create a new post within the same work session.

To post, you just need configure the plug-in with the following post URL:

http://username.wordpress.com/xmlrpc.php

Here is a screen capture of the plugin:
Deepest Sender Plugin screen capture
Too bad WordPress doesn’t allow me to upload an image bigger than a thumbnail. I guess I’ll have to find my own image repository.

Here is an URL to the plguin:

Deepest Sender :: Mozilla Add-ons :: Add Features to Mozilla Software:

Comments (2)

First Impression about WordPress

I have been a long time Blogger user. After having difficulty searching for specific information in my own blogs, I decided that I need the search feature for my blogs. Blogger doesn’t seem to have it out-of-the-box, so I gave WordPress a try. It certainly has the search feature that I was looking for. It also has the rich editing capability that attracted me to Blogger earlier. WordPress even has an import feature that allows me to import my blogs from Blogger. However, the import broke at about 2/3 way into the process. So, most of my 2005 blogs were missing on this blog. So, it’s not perfect. Even without a working import feature, the pro still outweight the con. Anyway, it’s free. Can’t complain about free. ;)

Comments (2)