23 April, 2008

Oracle 11g on Gentoo Part 2. dbstart, dbshut and emctl

On Gentoo Wiki, there is a page dedicated for Oracle on Gentoo. You should found a set of rc script to start / stop Oracle instance, Listener, the EM DB console and isqlplus. For 11g, however, those scripts need some adjustment. This post will shows you how.

  1. 11g no longer provide isqlplus, hence the script should not start/stop isqlplus.
  2. Secondly, dbstart and dbshut will manage the start and stop of listener, hence, the rc script should not deal with the listener directly (let dbstart do it).
  3. For dbstart/dbshut in 11g, you need to supply ORACLE_HOME as the 1st argument, just like the following shows:
     oracle> dbstart /u01/app/oracle/product/11.1.0/db_1
    
  4. For emctl, you should pass ORACLE_SID to emctl via environment variable, just like:
     oracle> ORACLE_SID=mydb emctl start dbconsole
    

Finally, you can use my init script for 11g. The files can be downloaded from here.

To use the script,

 root> tar -C / -zxf oracle-11g-gentoo-rc-scripts.tgz
 root> chmod +x /etc/init.d/oracle
 root> vim /etc/conf.d/oracle # edit the ORACLE_HOME, ORACLE_SID

21 April, 2008

Installing Oracle 11g on Gentoo

This weekend, I managed to setup Oracle 11g r1 on my little Gentoo box. Basically, installation is roughly the same as other distros (like RHEL). However, the following extra steps is needed:
  1. Before the installation (pre-install prep), create a symlink for libstc++.so.6
      root> ln -s `gcc-config -L`/libstdc++.so.6 /usr/lib
    
  2. During installation, at the 'Linking executable' steps, you will encounter an error which is something like "Failed to link sqlplus binary". At this moment, update a make file included config:
      root> cd $ORACLE_HOME
      root> sed -ie 's/$/ -lrt/' lib/sysliblist
    
    After edited the file, click 'Retry' the installation should completed without any other problem.
    When installation completed successfully, you should remove the libstdc++ symlink.
  3. After the installation, create the rc scripts to manage the Oracle instance (as well as the listener and EM as well).
    While the rc scripts from Oracle administrator guide is not usable on Gentoo (as Gentoo has its own rc system), some Gentoo users have contributed their rc script which can be found on Gentoo Wiki.
NOTE: The step 1 and 2 is found from Gentoo Forum. However, the thread have some non-mandatory information, which is not relevant IMO.

11 April, 2008

Rescue mode for my iPhone

My iPhone bricked again! This is the second times I bricked my iphone.

Contrary to experience of most other iphone users, the brick is caused by installing / uninstalling 3rd party app, but not by improper jailbreak / unlock methods.

While my only way to go is using ziphone to recover the iphone from scratch, I start thinking the possibility of booting the iphone with a rescue ramdisk. Such image will be very helpful, as you can boot the iphone in rescue mode just like the way in every Linux distro. We can then create full backup by simply tar up the whole root filesystem or just fix the broken thing and restart the iphone.

Anyway, it is just a idea. Hope it will comes true later.

06 April, 2008

From pyblosxom to blogger

I've once setup pyblosxom on my own server as my personal blog. During this weekend, I start migrating my post to blogger.

So, I need some good ways to do the import task and I finally come across with the official gdata python library. With a few line of code, the import is done.

During the process, I found Bash Blogger, which is a cli blogger interface. This looks interesting as one of my next task is to look for an cli interface for posting notes.

However, the most trouble part is not solved, which is the content of the post. When using pyblosxom, I define a small set of tag and CSS classes, but when imported into blogger, my post looks strange...