Wednesday, January 30, 2008

making things easy - single command for any archive

Since we are on the topic of commands (previous post), I have been using this simple utility (called "e") that makes it possible to extract almost _any_ type of archive. I have been able to use it successfully for .zip, .tar, .tar.gz,, .deb and (wait for it.....) .rpm.

It is written in Ruby and recognizes the type of source from its content and not by extension.

It's I will never need to remember the "-" options for any of the individual commands. But thats the least impressive benefit according to me. The fact that it allows me to extract an RPM package is the best. Check this post out about using rpm2cpio to extract an RPM (of course without installing it) since there is no option with the 'rpm' command itself.

rutul@rutul-laptop:~/tmp$ e php-5.1.4-1.esp1.x86_64.rpm

19188 blocks
rutul@rutul-laptop:~/tmp$ ls
etc php-5.1.4-1.esp1.x86_64.rpm usr var

However, not much success with this experiment. A few days ago, after I compiled a kernel RPM, installed it and created the initrd image, I had trouble booting because it was missing some modules. So, I had to dig into it to check if everything I had wanted did get compiled/build in.

So, this is what I had to do:
mv initrd-2.6.21-1.3194.fc7.img initrd-2.6.21-1.3194.fc7.gz
gunzip <>

Now I tried to do:
rutul@rutul-laptop:/boot/tmp$ sudo e initrd.img-2.6.20-16-generic
gzip: initrd.img-2.6.20-16-generic: unknown suffix -- ignored

ERROR extraction not successful with these files:
initrd.img-2.6.20-16-generic: gzip compressed data, from Unix, last modified: Tue Jan 29 02:03:36 2008, max compression

As you can see, no luck there.

aging = losing memory = need a command line list

Not that I like to think only age is the factor here, but recently more often than before I have had the realization of forgetting commands, specially since in my world a shell is the best place to get real work done...GUI tools are for "girlie men"...not that girls don't use shell...oh well, you get the point.

So, here is a pretty good reference guide, indexed/arranged by sections:
  • System information
  • Shutdown (Restart of a system and Logout )
  • Files and Directory
  • File search
  • Mounting a Filesystem
  • Disk Space
  • Users and Groups
  • Permits on Files
  • Special Attributes on files
  • Archives and compressed files
  • RPM Packages ( Fedora, Red Hat and like)
  • YUM packages updater (Fedora, RedHat and like)
  • DEB packages (Debian, Ubuntu and like)
  • APT packages updater (Debian, Ubuntu e like)
  • View file content
  • Text Manipulation
  • Character set and Format file conversion
  • Filesystem Analysis
  • Format a Filesystem
  • SWAP filesystem
  • Backup
  • Networking (LAN and WiFi)
  • Microsoft Windows networks (SAMBA)
  • IPTABLES (firewall)
  • Monitoring and debugging
  • Others useful commands
You could download the zip file HERE.

search for a server distribution

I never have had to think about Linux distributions and comparing those in order to get a system (desktop or server) installed and running. I almost accidentally stumbled upon Ubuntu for my personal laptop and cannot be more glad that I did.

However, here is the challenge: I am currently researching in the background. The charitable bug in me helps out (volunteers) a non-profit with their website needs. They want to move to hosting their own Web server instead of paying a hosting company. So, I am tasked with finding the right hardware (still under research) and getting the server up.

Of course it has to be a LAMP installation (which I recently found out is the right term to use for a Linux running Apache, MySQL and PHP...clever). The question is, which Linux distribution do I go with?

I would have thought running a Google search with the words "comparing Linux distribution for web server" should have brought something up......apparently not. Or resources such as DistroWatch would have yielded an article or two on the topic. Found a few comparison charts, but nothing in particular for Web servers.

So, here is the thought process so far. I have always thought of RHEL as the "first instinct" server installation. Probably is the most popular one. Fedora should not be too far behind/very different than RHEL, and I have used each of those over the last 3 or 4 years, but I don't find either of those charming/clever. Not that I am going to need my web sever to have either of those qualities, but hey, I get to decide here! Also, I never have been able to spend too much time on Debian, Mandrake, Slackware or SUSE. So unless I find out _very_ convincing arguments in favor of either of those, I might not be willing to spend any time of my own installing and analyzing.

Now, that leaves me with Ubuntu Server Edition. I am already happy with my Desktop version. Have spend enough time with the distribution, playing with the system tools, etc in case I need to use those. Here is what I am expecting:
- simple and quick thin client server installation.
- reliable performance.
- simple security (SELinux-kind, only simpler) = no useless open ports. I don't want to be running and analyzing too many things with nmap.
- some level of smart power management. That could save a few $$

Will post my experiences when I get around to it.

Monday, January 28, 2008

anomaly - IE for Linux

It's like how the tail was/is a vestigial organ for homo sapians that eventually will get phased out due to lack of usage. But for now, having IE run under _might_ have some use, like if you do web development, testing for IE or once in a while when you run into those IE-only sites.
So, here is how you do it: IEs4Linux

Seems like a it installs IE and setups Wine accordingly. I was able to verify Flash works fine.

Here is the challenge apparently which I am going to have to spend some time on. I sometimes watch soccer online (living in USA does force you to be innovative if you are a football fan, and that just doesn't mean learning to call football soccer) and this requires me to use IE and Sopcast.

I believe qsopcast should get me to a point where I am able to run the streams in the stand-alone player. But integrating it into Firefox doesn't seem to be supported yet. Maybe I can get Sopcast to work with ie4Linx?

Sunday, January 27, 2008

Ubuntu documentation

Most of the time, I find information that I am looking for at various places (as in google searches), but there is an official Ubuntu Documentation project here. that is well maintained and very useful.

For example, something that I have been wanting to do, but never needed to until today (so had to look it up) was to mount the NTFS partition (that I use to boot into Windows XP) with both read and write support. Found a fairly good documentation on that:

Really helpful.

bootstrapping the blog & first impressions

Back in July of 2007, I installed Feisty Fawn (7.04) on my personal (read: cheap) laptop (Toshiba Satellite M35X-S149, only upgrade was to 512MB RAM) after receiving the Live CDs and haven't stopped being impressed by this wonderful software ever since. They (who?) say that within the first three seconds of a new encounter, you are evaluated… even if it is just a glance. Ubuntu does score a ton of points there.

So, before I move on to Gusty Gibbon (7.10), I figured it was time to start writing about my experiences, tips, tricks, hurdles and notes instead of having that information all scattered around in my mind, in notebooks or in emails.

As a start, the first thing I remember that impressed me most (even when running just the Live CD was that my integrated wireless card was up and running without any intervention.

Another useful thing was that during the install, for user creation, it was able to recognize the Windows partition (XP Home) and was able to add the user already present for Windows (password, profile, etc). Cute.

After the install, I discovered command line package management with "apt-get" is great to use. The unique concept of not having a "root" user login is something that takes a little getting used to, but the more you use it, the more it seems to make sense.

My first few installs were:
- Macromedia Flash plugin for Mozilla/Firefox
sudo apt-get install flashplugin-nonfree
- sudo apt-get install build-essentials
- sudo apt-get install libncurses5-dev
- sudo apt-get install azureus

Thats a short list, but I was already up and running most of my commonly used applications with what was installed as default.

Lets gets started.