Archive

Archive for October, 2008

Struts 2 Backporting

October 28, 2008 Leave a comment

Struts 2 and all depedencies, by default is compiled using JDK 1.5 and just can be used on at least JDK 1.5 environment.

But, for people who wish to use this current framework on environment below JDK 1.5, such as JDK 1.4 or 1.3, can use Retrotranslator (http://retrotranslator.sourceforge.net/) for backporting all struts 2 core, library and dependencies on current destination….

the steps for backporting, completely can be read at :

Here

Categories: Programming

Install Oracle on Ubuntu 8.04(hardy) server

October 20, 2008 1 comment

(using silent mode – the box doesn’t has xserver installed)

This documentation is sumarized  from :
– Oracle documentation
– Installing Oracle 11g on ubuntu linux 7.10 (gutsy Gibbon) by Augusto Bott
– Installing ubuntu 10gR2 on ubuntu edgy by akhsay mehta
– Installing oracle 10g in ubuntu 7.10 (gutsy gibbon)
The steps are :
1. Login to your ubuntu box using user which has administrative rights
2. check swap (typically 2GB or more)  , hard drive space (for EE needs 2.5 GB),and enough ram
(at least 2 GB)
3. Install library packages
­ sudo apt­get install build­essential libmotif3 libaio1 rpm lesstif2­dev alien
4. create groups, user swhich are used by oracle installation
­ sudo groupadd oinstall
­ sudo groupadd nobody
­ sudo groupadd dba
­ sudo useradd -­g oinstall ­-G dba,nobody ­-d /opt/oracle ­-m oracle ­-s /bin/bash
­ sudo useradd nobody ­-g nobody
­ sudo passwd oracle (set oracle user password)
5. Make sure to set the directory ownership
­sudo chown -­R oracle:oinstall /opt/oracle
­sudo chmod ­-R 775 /opt/oracle
6. try to login using oracle user, if failed, check steps [at 4] above and do the steps again. If it
works fine and success, then logout
7. Append ORACLE_HOME, ORACLE_SID and PATH to  oracle’s  .bashrc
­ sudo vi /opt/oracle/.bashrc
­ export ORACLE_BASE=/opt/oracle
­ export ORACLE_HOME=$ORACLE_BASE/product/10gR2
­ export ORACLE_SID=orcl
­ export PATH=$PATH:$ORACLE_HOME/bin
8. Append this configuration to /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.file­max = 65536
net.ipv4.ip_local_port_range = 1024 65000

9. type the following command:
­ sudo /sbin/sysctl ­p
10. Append the following configuration to /etc/security/limits.conf
­ *soft nproc 2047
­ *hard nproc 16384
­ *soft nofile 1024
­ *hard nofile 65536
11. Create symbolics links to make the ubutu box like as Red hat system (oracle need redhat
system)
­ sudo ln -­s /usr/bin/awk /bin/awk
­ sudo ln ­-s /usr/bin/rpm /bin/rpm
­ sudo ln ­-s /lib/libgcc_s.so.1 /lib/libgcc_s.so
­ sudo ln ­-s /usr/bin/basename /bin/basename
­ sudo ln ­-s /etc /etc/rc.d
­ sudo touch /etc/redhat­release
­ sudo chmod 666 /etc/redhat­release
­ sudo echo “Red Hat Linux release 4.0 ”> /etc/redhat­release
12. login as oracle user
13. run the installer (on silent mode) using response file ahmad.rsp (the file is attached)
­ ./runInstaller ­ignoreSysPrereqs ­silent ­responseFile ahmad.rsp
14. Wait for the rest installation till complete
15. edit the oratab file in /etc/oratab
­ change N to Y
16.  Create the startup script (oracle)

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run­level Startup script for the Oracle Listener and Instances
#
# It relies on the information on /etc/oratab
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/10gR2
export ORACLE_OWNR=oracle
e
export PATH=$PATH:$ORACLE_HOME/bin
if [ ! ­f $ORACLE_HOME/bin/dbstart ­o ! ­d $ORACLE_HOME ]
then
echo “Oracle startup: cannot start”
exit 1
f
fi
case “$1” in
start)
# Oracle listener and instance startup
echo ­n “Starting Oracle: ”
su $ORACLE_OWNR ­c “$ORACLE_HOME/bin/lsnrctl start”
su $ORACLE_OWNR ­c “$ORACLE_HOME/bin/dbstart”
touch /var/lock/oracle
echo “OK”
;;
stop)
# Oracle listener and instance shutdown
echo ­n “Shutdown Oracle: ”
su $ORACLE_OWNR ­c “$ORACLE_HOME/bin/lsnrctl stop”
su $ORACLE_OWNR ­c “$ORACLE_HOME/bin/dbshut”
rm ­f /var/lock/oracle
echo “OK”
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo “Usage: ‘basename $0’ start|stop|restart|reload”
exit 1
e
esac
exit 0

17. put the script on /etc/init.d/ folder
18. set to chmod 777
19. type the following command to create symbolic links to make the db start on boot
­ sudo update­rc.d oracle defaults

Jakarta, 20 juli 2008
A. Ahmad Kusumah

Categories: Database

First to say

October 20, 2008 Leave a comment

This my replacement blog of my old blog …

My old blog was deleted caused of lack of awerenes on renewingmy domain …

On this new Blog i’ll try to recover all my writing ….

Regrads,

Categories: Diary