sixtydoses. where od is harmless.

June 18, 2010

I’m a Slacker.

Filed under: Tech — Tags: , , — od @ 6:10 am

No, no.. not that slacker. But Slacker.

I’ve been using Slackware for about a month or so. Haven’t really got the chance to explore it intensively yet, but so far I’m loving it. The installation process was a breeze and fast(it reminded me of sysinstall). I actually reinstalled three times – due to the lack of skills in partition sizing. The notebook that my company provided only carries an 80Gb size of hard disk, so I had to be very stingy when it comes to allocating spaces.

When I first wanted to switch from Ubuntu which I have been using for about 3 years, I was torn apart between choosing either Arch or Slack. I decided to go with Slack because of some success stories of users installing Lotus Notes that I’ve read. Well to be honest there are similar success stories of users installing Lotus Notes on Arch, but.. I must say that I’m pretty much heavily influenced by other FreeBSD forumers.

Installing Lotus Notes was a bit tricky, but once I got it installed, it runs pretty well. Crashed a few times, rarely though, but hey, this is Lotus Notes am talking about here. It could possibly crash on any possible platform you could think of. Lol. I seriously hate Lotus Notes. Argh. It’s huge, bloated and crippling slow. I wish IBM could produce a light weight version of Lotus Notes as an option for those who have to ‘painfully’ use it to check email. And not marking calendars, browse the net, play with widgets and what not. Gah. Apart from Lotus Notes, I’ve installed WebLogic and it runs smoothly on Slackware, no surprise there. I haven’t tried WebSphere though. Hopefully it’ll run fine as well. I definitely need one running on my notebook else don’t call me a WebSphere technical support.

There’s one thing that irks me though.. the netconfig command. It is the command you use to set an IP address to your machine, but I can’t for the life of me understand why it has to ask me to key in the hostname everytime I want to change my IP. How many times do I change my IP address? Being a technical support, a lot. How many times do I change a hostname of my machine? I don’t know. Like.. never? Well I know I’m complaining here, so.. am just gonna STFU and modify the netconfig script to stop prompting me for a hostname and FQDN. I’ve also added into the script 2 locations that I frequent the most, which is my office and home. I know I could just run a one liner command to change my IP, but that would be dynamic. And I prefer to have the IP to remain upon reboot.

Another thing that I still haven’t gotten the grip yet is the installation of 3rd party packages. All of the packages on my Slackware were installed by manually fetching the packages from slackbuild website, and get them installed using installpkg. I came across of a guy saying this in a forum.. “True slackers compile from the source”. Meh. So obviously I’m not a true slacker.. But anyhoo, that’s not the point. So apart from using installpkg, removepkg or compiling a 3rd party app from the source, I could also opt for slackpkg, the automated tool for managing Slackware packages. Hrmm. But I can only specify one mirror.. at first I thought it is like apt-get, where you can define repositories and just run apt-get install <package> and be done with it. But apparently there are not many packages that I could install using slackpkg. Most of the time when I run slackpkg search <package>, I got a message stating that there is no keyword match for the package that I wish to install. I really don’t mind compiling, or installing the binaries, but I hate to have to go to websites and fetch the packages manually. I think I must’ve missed something, there must be a better way that true slackers are practicing that I have yet to discover.

With all that said, I love the current setup of my notebook with Slackware. Everything is snappy.

So Ray, let me hear you roar.

March 5, 2010

Either Oracle Smart Update utility interface sucks or I’m an artard.

Filed under: Tech — Tags: , , — od @ 6:43 pm

I just couldn’t figure out how to get Smart Update to work offline. I don’t have the authorization to download all the patches, so I got them from some Oracle support guy, fire up bsu.sh, select work offline, and spend several hours trying to figure out how to point to my patches directory. Bleargh. Fortunately, CLI works like a charm.


od@sysh:/opt/bea103/utils/bsu$ ./bsu.sh -install -patchlist=79YU,CJ4W,ETR7,IQXV,SYCB,T552 -patch_download_dir=/home/od/Desktop/allpatcheszip -prod_dir=/opt/bea103/wlserver_10.3
Checking for conflicts..
No conflict(s) detected

Installing Patch ID: 79YU..
Result: Success

Installing Patch ID: CJ4W.
Result: Success

Installing Patch ID: ETR7.
Result: Success

Installing Patch ID: IQXV.
Result: Success

Installing Patch ID: SYCB.
Result: Success

Installing Patch ID: T552.
Result: Success



On a different note, while I was installing WebLogic Server 10.3.x in silent mode, I was prompted with this error:


od@sysh:~/Desktop$ ./server103_linux32.bin -mode=silent -silent_xml=silent_103.xml
Extracting 0%……………………………………………………………………………………….100%
The local BEA product registry is corrupted. Please select another BEA Home or contact BEA Support
** Error during execution, error code = 65280.



Found a forum that says, for version above 9.x, ‘COMPONENT_PATHS’ doesn’t accept value like this –> “WebLogic Server/Core Application Server” anymore. But actually it does accept “WebLogic Server/<insert_component>” format, and even the documentation says so.

So anyway, the error was due to my habit of copying and pasting in vi which sort of corrupted my component paths line. So yea, if you get that kind of error, I’d say chance is your silent.xml file format is incorrect.

These are my silent.xml files.



This will install  all WebLogic Server components.

###################################################

<?xml version=”1.0″ encoding=”UTF-8″?>
<!– Silent installer option: -mode=silent -silent_xml=C:\bea\silent.xml –>

<bea-installer>
<input-fields>
<data-value name=”BEAHOME” value=”/opt/bea1032″ />
<data-value name=”WLS_INSTALL_DIR” value=”/opt/bea1032/wlserver_10.3″ />
<data-value name=”COMPONENT_PATHS” value=”WebLogic Server” />
<data-value name=”INSTALL_NODE_MANAGER_SERVICE” value=”yes” />
<data-value name=”NODEMGR_PORT” value=”5559″ />
<data-value name=”INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER” value=”yes”/>

</input-fields>
</bea-installer>

###################################################



This will install all WebLogic Server components, without the samples.

###################################################

<?xml version=”1.0″ encoding=”UTF-8″?>
<!– Silent installer option: -mode=silent -silent_xml=C:\bea\silent.xml –>

<bea-installer>
<input-fields>
<data-value name=”BEAHOME” value=”D:\bea\wls103_silent” />
<data-value name=”WLS_INSTALL_DIR” value=”D:\bea\wls103_silent\wlserver_10.3″ />
<data-value name=”WLW_INSTALL_DIR” value=”D:\bea\wls103_silent\workshop_10.3″ />
<data-value name=”COMPONENT_PATHS” value=”WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/Web 2.0 HTTP Pub-Sub Server|WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/Third Party JDBC Drivers|WebLogic Server/WebLogic Server Clients|WebLogic Server/WebLogic Web Server Plugins|WebLogic Server/UDDI and Xquery Support|WebLogic Server/Server Examples|Workshop/Workshop for WebLogic|Workshop/Workshop Runtime Framework” />
<data-value name=”USE_EXTERNAL_ECLIPSE” value=”false” />
<data-value name=”EXTERNAL_ECLIPSE_DIR” value=”D:\eclipse332\eclipse” />
<data-value name=”INSTALL_NODE_MANAGER_SERVICE” value=”yes” />
<data-value name=”NODEMGR_PORT” value=”5559″ />
<data-value name=”INSTALL_SHORTCUT_IN_ALL_USERS_FOLDER” value=”yes”/>

</input-fields>
</bea-installer>

###################################################


What caused the error was, I simply copied the component paths from my terminal, and paste it using the vi editor, so I kinda missed the fact that the line was not continuous, creating breaks of white space. Something like this:

<data-value name=”COMPONENT_PATHS” value=”WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/Web 2.0 <break of white space>
HTTP Pub-Sub Server WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/Third Party JDBC <break of white space>
Drivers|WebLogic Server/WebLogic Server Clients|WebLogic Server/WebLogic Web Server Plugins|WebLogic Server/UDDI and Xquery Support|WebLogic Server/Server Examples|Workshop/Workshop for <break of white space>
WebLogic|Workshop/Workshop Runtime Framework” />

January 22, 2010

Autostart tomcat upon reboot.

Filed under: Tech — Tags: , , , , — od @ 1:04 pm

So this morning they shutdown the server and called me up complaining that the website is down.

No, I didn’t ask how many times have they rebooted. Lol.

Anyway the website is down because I didn’t configure both apache and tomcat to run automatically upon reboot. Am so lazy today because it’s Friday, basically it’s a yippee day,  a day that is legal for you to come to work late, and go back early.

Googled for the auto script, but none satisfied my needs, so, here’s mine (adapted from a couple of scripts), because sharing is caring.

This script will always run tomcat as user ‘admin’ (EUID 500). If you run the script as a different user, it’ll prompt for admin’s password. Dump the script in /etc/init.d/ and run chkconfig to configure runlevel startup.





#!/bin/bash
#
# tomcat     This is the init.d script used to start tomcat.
#                It calls $CATALINA_HOME/bin/startup.sh or shutdown.sh
# chkconfig: – 91 15
# description: Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies.
# processname: tomcat

export JAVA_HOME=/usr/java/jdk1.6.0_16
export CATALINA_HOME=/usr/local/apache-tomcat-5.5.28

tomcat_stop() {
if [[ $EUID -ne 500 ]]; then
su -c ‘$CATALINA_HOME/bin/shutdown.sh’ admin
exit 1
else
$CATALINA_HOME/bin/shutdown.sh
fi
}

tomcat_start() {
if [[ $EUID -ne 500 ]]; then
su -c ‘$CATALINA_HOME/bin/startup.sh’ admin
exit 1
else
$CATALINA_HOME/bin/startup.sh
fi
}

case $1 in
start)
echo -n “Starting Tomcat server:”
tomcat_start
echo “.”
;;
stop)
echo -n “Stopping Tomcat server:”
tomcat_stop
echo “.”
;;
*)
echo “Usage: /etc/init.d/tomcat start|stop”
;;
esac

December 2, 2009

StatsView on Ubuntu Jaunty.

Filed under: Tech — Tags: , , , — od @ 1:37 am

Quoted from StatsView README:

#####################################################

PREREQUISITES
————-

StatsView is written in Perl5, using the Perl Tk extension library. I recommend
that you use perl5.005_03 or later, and Tk800.014 or later, as StatsView has
been tested with these versions. You will also need the Tk::GBARR add-on
package for this version.

The graphing is done with gnuplot, and version 3.7 or later is required –
a copy can be found in the gnuplot_src subdirectory.

#####################################################

I already have Perl5 and gnuplot in my system, so I only need to install Perl Tk, Tk-GBARR and StatsView.

Install Perl Tk:

#apt-get install perl-tk


Grab Tk-GBARR from http://www.cpan.org/authors/id/SREZIC/. At this time of writing the latest version of Tk-GBARR is 2.08:

#fetch http://www.cpan.org/authors/id/SREZIC/Tk-GBARR-2.08.tar.gz
#tar xvfz Tk-GBARR-2.08.tar.gz
#cd Tk-GBARR-2.08
#perl Makefile.PL
#make
#make test
#make install


Grab StatsView from http://www.cpan.org/authors/id/ABURLISON/.

#fetch http://www.cpan.org/authors/id/ABURLISON/StatsView-1.4.tar.gz
#tar xvfz StatsView-1.4.tar.gz
#cd StatsView-1.4
#perl Makefile.PL
#make install
#./scripts/sv


Test StatsView using the example included:

#cd /path/StatsView-1.4/examples
#gzip -d sar.txt.gz
#../scripts/sv sar.txt


It worked wonderfully using the sar output sample.. but I couldn’t get it to display any graph using my collection of sar output, both in binary and text formats. At this point am still not sure why it kept on complaining that my output file is invalid.

They are valid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa!!! 😯

Now what am I supposed to tell my boss?

“Hi boss.. remember the Linux server performance data that I promised last week? I don’t have it.”
“How come?”
“I have it, but I don’t have it in a pwetty graph format like I pwomised.”
“Well it’s okay you can pass me the raw data.”
“It’s in binary.”
“What?”
“Uh.. you know there are 10 types of people in the world: Those who understand binary, and those who don’t…”
“You don’t have anything to present, do you?”
*GULP*

Source: http://jerkharris.com/books/books/PerlOrDBA/oracleperl-CHP-3-SECT-3.html

January 26, 2009

So it’s Gnome, Linus?

Filed under: Tech — Tags: , — od @ 10:17 am

So much of his Nazi comment that ruffles the feathers of GNOME community last time.

I have always been a loyal user of XFCE4, but if I had my druthers between Gnome and KDE, I’d prefer Gnome. KDE is nice, I love some of KDE apps, but imho, it’s kinda bloated. Very pretty, way prettier than Gnome, but bloated. But of course, I’d go for Enlightenment if I want some real fancy stuff on my desktop.

Anyways, am not any DE/WM fanatic. I just love to keep my desktop clean and minimal.

I lol’ed.



Source: Q&A: Linux founder Linus Torvalds talks about open-source identity

February 24, 2008

I do take free stuff.

Filed under: Tech — Tags: , , , , , — od @ 1:13 am

Finally managed to get the flash-plugin to work on Opera. I recently installed Ubuntu Gutsy Gibbon on my lappie replacing FreeBSD 6.2 to fulfill the training’s requirement I attended last week (but ended up I used the desktop provided). So back to flash, it was pretty annoying to get it working on Opera. I don’t remember having this kinda problem back when I used Edge. Even linux-opera’s flash plugin works out of the box in freebsd.

The solution is, use flash 7, it’ll work like a charm. Forget about flash 9.

Several times I was asked why do I use unix/linux and not windows. Most of the time I’d give them the easiest and fundamental answer – it’s free.

Logically, why would anyone opt for something that is expensive, when there are better products that come for free? It never really came across my mind before that one wouldn’t use linux because it’s free until I read this article. Funny, weird, but somehow it does make sense afterall.

On a different note, I tried vixta on my vm. First try and it didn’t work out well. Some of the buttons weren’t functioning, but yea it does look like vista. Prolly it behaves like one too 😛