Archive for Tecnology

Oracle sysV init script on the fly

Every time I need an Oracle init script file, it’s a terrible pain! No way to use a simple start/stop/status (with nagios check)…

Today I write “on-the-fly” this very simple script to run Oracle Database on RedHat Cluster Suite without nagios plugin.

#!/bin/sh
 
#chkconfig: 2345 80 05
#description: Oracle DB
 
ORA_HOME=/opt/oracle/product/9.2.0
ORA_OWNER=oracle
LOG="/dev/null"
 
prog="Oracle"
lockfile="/var/lock/subsys/oracle"
 
# Source function library.
if [ -r "/etc/rc.d/init.d/functions" ]; then
	. /etc/rc.d/init.d/functions
fi
 
# Oralce configurations
if [ -r "/etc/sysconfig/oracle.conf" ]; then
        . /etc/sysconfig/oracle.conf
fi
 
export ORA_HOME
export ORA_OWNER
export LOG
export prog
export lockfile
 
if [ ! -f $ORA_HOME/bin/dbstart ]
then
  echo "Oracle startup: cannot start"
  exit
fi
 
RETVAL=0
 
start() {
     if [ -f ${lockfile} ]; then
         echo "Oracle already running"
         exit 1
     fi
 
     echo -n "Starting $prog: "
     runuser - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
     RETVAL_DB=$?
     runuser - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start > $LOG"
     RETVAL_LSN=$?
     if (($RETVAL_DB == "0")) && (($RETVAL_LSN == "0")) ; then
         RETVAL="0"
	 touch ${lockfile}
	 echo_success
     else
         RETVAL="1"
	 echo_failure
     fi
     return $RETVAL
}
 
stop() {
     if [ ! -f ${lockfile} ]; then
         echo "Oracle already stopped"
         exit 0
     fi
     echo -n $"Stopping $prog: "
     runuser - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
     RETVAL_DB=$?
     runuser - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop > $LOG"
     RETVAL_LSN=$?
     if (($RETVAL_DB == "0")) && (($RETVAL_LSN == "0")) ; then
         RETVAL="0"
	 rm -f ${lockfile}
	 echo_success
     else
         RETVAL="1"
	 echo_failure
     fi
     return $RETVAL
}
 
status() {
     RETVAL=1
     pid=`pgrep -u $ORA_OWNER`
     if [ -n "$pid" ]; then
           RETVAL=0
           echo -n "$prog is running..."
           echo_success
     else
           echo -n "$prog is not running."
           echo_failure
     fi
     return $RETVAL
}
 
case "$1" in
  "start")
       start
       ;;
  "stop")
       stop
       ;;
  "restart")
       start
       stop
       ;;
  "status")
       status
       ;;
  *)
       echo $"Usage: $prog {start|stop|restart|status}"
       exit 1
 
esac
echo
exit $RETVAL

Improve your GIT experience

I love git. It’s simple, fast, and it’s the first “new generation” versioning system.

I’ve used git for 3/4 months, and now I won’t be able to use anything else (like cvs or svn …)

Here you can see Linus Torvalds (the author of git) during a presentation about git:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Why “Ruby on Rails” will win vs. Seam…

Ruby on Rails (and C., like Turbo Gear and so on…) will  win to java technology because the concept of  “keep it simple” is too far from the minds of java developers.

Today I read this post on TheServerSide, and I’m getting depressed… every time someone try to follow a good idea (like Seam with Ruby on Rail), an other one wants to improve this idea and makes new things… and this is the reason about the fragmentation of java thecnology (too much framework, too much “infrastructure”, too much little “business”).

Now, if you want to start new projects in Java, you can choose between thousands of frameworks, but if you’ve chosen “Seam”,  you have to choose also the persistence layer of your applications…

Two projects based on Seam may be incompatible from each other… Really good…

RedHat Summit

Great days spend in San Diego during annual RedHat Summit. Food, drinks and funny social networking events with “redhat crowd”. Especially I’m happy for the meeting with guys from “et-mgmt-tool” group, one of the most interesting project sponsored by RedHat.

Please, have a look about cobbler and puppet. I think these solutions may be one of the most innovative point of view in provisioning services and configuration management

dsc_6988
Shadowman

dsc_7048
Me, Marcelo and Rik

dsc_7012
Not only work this week… ;-)

Oracle Linux vs. RHEL

Some months ago, Oracle announced new Linux Distribution: Oracle Unbreakable Linux. It should has been the main Linux platfor to support Oracle Database, but today only Dell support this operating system on its hardware, and IBM said “We are going to wait and see if
there is traction in the marketplace”.

Still today, IBM doesn’t support Oracle Linux, like HP, but they continue to support RedHat Enterprise Linux in theit products (hardware and software).

Antonio sent me this useful link on reuters.com. Now we have to see what can happen in near future, but I think Oracle has to reduce its investments in Unbreakable Linux and return to support strong and asserted solutions, like RedHat and Novell.

Everybody has to do only its own job…

Zimbra Groupware

I think Zimbra could be the best OpenSource groupware at the moment. In the past I’ve tried OpenGroupware and Hula.

OpenGroupware is very good, with a lot of advanced features, but it’s been the same version for years! I don’t like software that does not improve.

Hula is (or was?) a Novell Project. Nat Friedman presented it during a great Novell keynotes. The project’s been very ambitious: it created a real Microsoft Exchange collaboration competitor. A few weeks ago, Novell announced the end of the project. Now the future of Hula is in the hands of the comunity.

Zimbra, today, is a very active project. The latest release increased the number of powerful features, and the next version is close to be completed. Next week I’m going to plan a period of testing and carry out come research on this groupware.

I’ve seen Zimbra for two years. But still last year, it seemed quite Windows oriented (at least for web interface and Outlook integration).

Zimbra

Web 2.0

Today Punto-Infomatico published news about this video. I think it’s the right way to learn how web 2.0 is different from “Ajax Tecnology”…

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Tapestry jump start

If you need to learn tapestry, I think this is how tolearn:

http://files.doublenegative.com.au/jumpstart/

It makes you able to build and deploy a minimal application in a “step by step” process.

Jump Start

Linux certified laptop

There’re some very strange certified laptops for RedHat Linux… (found in flickr).

This model, for example, works fine with Harrier fighter jet. ;-)

The guy who has taken the photo said:

I decided to be funny and asked the guy what they use for plugging it into the Harrier - USB? “Well not really… Actually it’s just an ethernet cable.” was the answer I got.

RedHat Laptop

Fedora Core 5 is out!

Fedora Project (or maybe RedHat?) has released the last version of Fedora Core (now is 5!)

Some new features:

  • xen virtualization support
  • kadischi fedora-liveCD creator
  • mono and .net integration (with f-spot, beagle, tomBoy)
  • new “yum based” architecture (also in anaconda!!!)
  • AIGLX for rendering special effects in a desktop envirorment

Let’s go to download it! ;-)

Fedora Core 5

-->