What's brewing

Entries in Linux (11)

Thursday
Jan222009

Using RCLI in Gentoo AMD64

We are operating a VMWare ESXi 3.5 server and is looking for way to perform operation on the VM via command line.

VMWare provides an API (which is a set of perl script) called RCLI (Remote Command Line Interface) and it provides the script in two flavor - Windows and Linux.

We want to issue the command on our Gentoo box which is running in 64 bit but the RCLI linux deliverable failed to deploy in 64 bit. Googling around noticed a patch to get around this.

Apply the patch by the following command

patch vmware-install.pl vmware-viperl-distrib.diff
After that, just install the script by,
./vmware-install.pl


It goes OK except a warning explaining the failure to bind with the perl module Crypt::SSLeay.

I guess it doesn't exist on my box and thus I emerge this right after. Upon doing so, when I try to issue the command "vmware-cmd", I was greeted with the following,

builder vmware-rcli-distrib # vmware-cmd
Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/XML/LibXML/Common/Common.so' for module XML::LibXML::Common: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/XML/LibXML/Common/Common.so: wrong ELF class: ELFCLASS32 at /usr/lib64/perl5/5.8.8/x86_64-linux/DynaLoader.pm line 230.
at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/XML/LibXML.pm line 12





No help to google around but I suspect it's again the missing of a proper perl module, so I emerge it again and try. Turns out I am right but I am seeing yet another error message on a different module. I repeat until I can execute "vmware-cmd" without an error.

Below is the list of module I have emerged,

  • emerge Crypt-SSLeay

  • emerge libxml-perl

  • emerge XML-LibXML-Common

  • emerge XML-LibXML

  • emerge Class-MethodMaker


After that, all is running well.
Tuesday
Jul012008

Offending key in /usr/NX/home/nx/.ssh/known_hosts

After upgrading the SSH package due to security issue in Debian, I noticed that I cannot connect back to my machine through NX Client.

The error message is an offending key in the known_hosts. I suspect it is due to a change of the key and thus, when I connect back to it, NX thought the server is compromised.

By deleting the entries in this file resolved the issue.
Saturday
May102008

Low end dedicated server vs a powerful VPS

Lately, I am having an "itch" in owning a dedicated server, which enables me to install VMWare Server and run multiple of virtual OS. All to satisfy my control freak deep within.

But most of the subscription plan are expensive. You can find dirt cheap bargain but the "server" they are offering is even slower than the PC I have at work.

I have finally found a reasonably priced plan (around US$79) which offers a Dual Core CPU with 2G RAM and 320G of HDD space, not bad in terms of specification. Right before I click the "order" button, I came across this discussion thread, VPS vs. Dedicated - New Benchmark Results. Reading it through and noticed the availability of a benchmarking scripts.

I downloaded the script and have it run on my 2 VPS account, to my surprise, one of them is having a benchmark result 6 times faster than the other! And I am amazed to notice the result of some VPS plan is very close to the dedicated server which I am interested to order.

After a bit of struggling (on money and necessity of course), I opt for a VPS replacement on my slow account instead.

Below are the benchmark result for your reference.

VPS#1 : 241.8
VPS#2 : 164.7
VPS#3 : 29-30

My PC (Core2Duo E6600, 2G RAM, 250G HDD) has a benchmark result of 423.3

Interested to try it on your machine? Download UnixBench v4.1.0 - WHT Variant now!
Thursday
Nov012007

Software I have purchased in 2007

Some people like to buy clothes and I definitely have a desire to buy good software. Be it commercial software, or shareware, I would get myself a license as long as I find it useful.


  1. Springy
  2. BetterZip
  3. PulpMotion
  4. HTTP Scoop
  5. Connected Flow - Aperture Plugin
  6. Connected Flow - iPhoto Plugin
  7. Sticky Window
  8. PDF Studio
  9. Coda
  10. Parallels
  11. Oxygen XML Editor (include the license for SVNClient)
  12. VMWare Fusion
  13. Screen Recycler
  14. iLife 2008
  15. iWorks 2008
  16. Keynote Pro - Eclipse Pro
  17. Graphic Converter 6.0 upgrade
  18. Fission
  19. Write Room
  20. VMWare Workstation 6.0 for Linux
  21. 1Password
  22. IntelliJ 7.0
  23. Mac OS X 10.5
  24. MarsEdit 2.0 upgrade
  25. TheMacPak


The heavily used application


With OS excluded, I still have a couple of candidate.
VMWare Fusion, iWorks, Connected Flow Aperture Plugin, 1Password. This one is tough so there will be two winners - VMWare Fusion and 1Password. You can find both application running on my mbp everyday, my development work rely very much on VMWare and 1Password could help me to manage the password for the different kind of account I am having.

The worst investment


There's several of them, TheMacPak, Screen Recycler, Parallels and Oxygen XML Editor. But if I have to pick one, it will go to Parallels. I bought it even before it ships, it works OK but definitely resources hog. Besides, I am so used to VMWare that I jumped right into it when they have the mac version ready. Sometimes, I should just wait and decide.

The bang of the bucks


Springy. It's very useful, especially with the context menu integration. The good thing is, it even works with JAR files, that helps me to navigate through the java library which I need to tackle in development work.

The interesting candidate


Apart from the application above, I would also like to mention a service which I used a lot over the year. I purchase the stock photo and vector graphics which I used in presentation from iStockphoto. They used to be quite cheap ($10 for 10 credit) but have increased the price recently. Still, they offer a wide range of quality photos that could liven up the boring presentation.
Tuesday
Jul032007

SVN over WebDAV (and proxy server)

I was setting up a project in LaunchPad and is trying to import the source from our SVN server. Since they can only do it via HTTP so I have to enable WebDAV support for my SVN server. But to make things complicate, the request have to get through a proxy server (err, 2 to be precise).

OK, so, what has to be done?

Firstly, you need to setup the mod_dav_svn on your SVN server.


Install apache server, I am using Gentoo Linux, so all I have to do is

emerge apache



And then, I need to enable apache in loading mod_dav_svn, so I modified /etc/conf.d/apache2

APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D DAV -D DAV_FS -D SVN"



After that, we have to define the context path, as well as the repository location. These information is stored in the config files for mod_dav_svn, mine is located under "modules.d "and named as "47_mod_dav_svn.conf". The file structure is something like the following, you might want to refer to the Red Book for details of each syntax.


<IfDefine SVN>
<IfModule !mod_dav_svn.c>
LoadModule dav_svn_module modules/mod_dav_svn.so
</IfModule>
<Location /src/xyz>
DAV svn
SVNPath /usr/local/repository/xyz
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /home/svn/svnconf/svnusers
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
SVNAutoVersioning On
SVNIndexXSLT /svnindex.xsl
</Location>
</IfDefine>



Restart apache and all should be done. Check by issuing the following command,

svn list http://localhost/src/xyz



Requesting the repository via a proxy server



My SVN server is sitting behind the firewall and all request has to be done from the web server in front of it. The web server is running apache and I can do that by using mod_proxy.

The source is served by one of the virtual host, and we need to modify the httpd.conf in configuring the mod_proxy.


<VirtualHost *>
ServerName www.mycode.com
....
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass /src/xyz http://192.168.0.1/src/xyz
ProxyPassReverse /src/xyz http://192.168.0.1/src/xyz
CacheRoot "/path/to/write/proxy/file"
</IfModule>
</VirtualHost>



Note that I am only showing the excerpt. Restart apache and test by issuing the command

svn co http://www.mycode.com/src/xyz



If you can checkout properly, then, congratulation. You are all set :)

There's always some tricks



But I find that I am the unlucky one, and I have spot a couple of thing

1. In setting up the mod_dav_svn, the "Location" specified has to be the same as the "context path" you define in mod_proxy. For example,


ProxyPass /src/abc http://192.168.0.1/src/abc



It won't work if the request context path differs from the destination URL.

2. If your SVN server is installed behind a SQUID Proxy Server, you will need to make sure it supports all the DAV command that is required by SVN. Take a look at this .

Good luck!