zcommands: Read gzip Compressed Text Files On a Fly

Posted on in Categories Linux, Tip of the day, UNIX last updated August 31, 2007

Linux and Unix like operating systems comes with z* commands. These commands allow you to read gzip compressed text files using zless, zcat, zmore and friends commands. The gzip command reduces the size of the files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times. z* commands has some cool usage too; such as display the current time in different zonename.

Comparison: Linux and UNIX ~ ZFS vs XFS vs EXT4 filesystem

Posted on in Categories File system, Linux, Sys admin, Tips, UNIX last updated August 30, 2007

This is an interesting filesystem comparison. If you are looking to build cheap storage for personal use file system decision is quite important:

This is my attempt to cut through the hype and uncertainty to find a storage subsystem that works. I compared XFS and EXT4 under Linux with ZFS under OpenSolaris. Aside from the different kernels and filesystems, I tested internal and external journal devices and software and hardware RAIDs. Software RAIDs are “raid-10 near2” with 6 disks on Linux. On Solaris the zpool is created with three mirrors of two disks each. Hardware RAIDs use the Areca’s RAID-10 for both Linux and Solaris. Drive caches are disabled throughout, but the battery-backed cache on the controller is enabled when using hardware RAID.

=> ZFS, XFS, and EXT4 filesystems compared

How to create your own Linux live CD easy way!

Posted on in Categories Download of the day, Howto, Linux, Linux desktop, Linux distribution, Tips, Troubleshooting last updated August 30, 2007

A LiveCD is an operating system along with useful apps stored on a bootable CD-ROM / DVD disk. You can run complete operating system without installation on a hard disk. I often use Knoppix Live CD for troubleshooting, fixing computers and testing new hardware.

This article talks about generating your customized Linux distribution using NimbleX Live Cd. It allows you selecting packages you want to have and it also allows you to configure several other stuff like the default wallpaper, volumes, sounds, greetings, passwords and the language of the interface:

Custom NimbleX 2 is now available for everybody. Even if now it is at Release Candidate stage this provides a much better way for generating a customised Free Linux OS based on NimbleX. The only requirements from the users are knowledge of English, a web browser (Firefox) and a CD for burning the ISO that was generated.

Download NimbleX Live CD or Customize NimbleX 2 Live CD

=> NimbleX project home page.

Humor: Ubuntu Linux Easter Eggs using apt-get and aptitude commands

Posted on in Categories Debian Linux, Humor, Linux, Linux desktop last updated August 30, 2007

Earlier today someone in IRC chat room pointed out me an easter egg (hidden feature or message in a game or software or sound track) for Ubuntu Linux.

apt-get command easter egg

Open your terminal and type the command:

apt-get moo

         (__)
         (oo)
   /------\/
  / |    ||
 *  /\---/\
    ~~   ~~
...."Have you mooed today?"...

aptitude command easter egg

Also try out following at a shell prompt:
aptitude -v moo
Output:

There really are no Easter Eggs in this program.

Now try one more time:
aptitude -vv moo
Output:

Didn't I already tell you that there are no Easter Eggs in this program?

Heh, keep adding more v options to a command:
aptitude -vvv moo
aptitude -vvvvv moo

I’m sure there are more easter eggs. I’d love to read about more hidden features in the comments section below.

New Bulletproof X system for Linux / UNIX desktop

Posted on in Categories Linux, Linux desktop, Linux distribution, UNIX, X server last updated August 30, 2007

I was just wondering why this feature wasn’t included in X from the day one. Ubuntu Xorg maintainer Bryce Harrington recently demonstrated the BulletProof-X feature that is planned for inclusion in Ubuntu 7.10:

This specification describes a new failsafe mode that will be used if X fails to start up. It will be in a reduced (VESA 800×600/256 or VGA 640×480/16) graphics environment running a single application (displayconfig-gtk) for configuring the graphics devices.

The goal of this specification is to eliminate the need for users to need to run apt-get reconfigure on the commandline. That approach is confusing and too technical for many users, so moving away from that will solve a key pain point for users.

This is useful if the user has changed monitors or graphics cards or X failed to detect your hardware. Linux based desktop system getting better and better everyday 🙂

Interview with Ubuntu Founder Mark Shuttleworth on Productivity and Linux

Posted on in Categories Ubuntu Linux last updated August 30, 2007

Lifehacker has published an interesting interview with Ubuntu Founder Mark Shuttleworth:

Founder of Ubuntu Linux Mark Shuttleworth took time out of his busy schedule to talk with us about email, productivity, travel, web applications, Ubuntu, free software and much more. We asked Shuttleworth what you wanted to know and he gave us the full scoop. Hit the jump for the full interview transcript.

HP Compaq DX2250: Red Hat Linux-based Desktop Computer

Posted on in Categories Business, Linux, Linux desktop, Linux distribution, RedHat/Fedora Linux last updated August 30, 2007

Go Linux go…

After Dell, it is now Hewlett-Packard, the world’s largest PC manufacturer, has announced it will start selling Linux-based PCs from $AU600 in Australia. The pc is powered by Red Hat Enterprise Linux 5 desktop will come pre-loaded on the HP dx2250 desktop computer — an AMD-based model. This system aimed at small to medium businesses. Technical support is offered by Red Hat.

More information

Install Squid Proxy Server on CentOS / Redhat enterprise Linux 5

Posted on in Categories CentOS, Linux, RedHat/Fedora Linux, Squid caching server, Suse Linux, Sys admin, Tips last updated August 30, 2007

I’ve already wrote about setting up a Linux transparent squid proxy system. However I’m getting lots of questions about Squid basic installation and configuration:

How do I install Squid Proxy server on CentOS 5 Liinux server?

Sure Squid server is a popular open source GPLd proxy and web cache. It has a variety of uses, from speeding up a web server by caching repeated requests, to caching web, name server query , and other network lookups for a group of people sharing network resources. It is primarily designed to run on Linux / Unix-like systems. Squid is a high-performance proxy caching server for Web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process. Squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests. Squid consists of a main server program squid, a Domain Name System lookup program (dnsserver), a program for retrieving FTP data (ftpget), and some management and client tools.

Install Squid on CentOS / RHEL 5

Use yum command as follows:
# yum install squid
Output:

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package squid.i386 7:2.6.STABLE6-4.el5 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 squid                   i386       7:2.6.STABLE6-4.el5  updates           1.2 M

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: squid                        ######################### [1/1]

Installed: squid.i386 7:2.6.STABLE6-4.el5
Complete!

Squid Basic Configuration

Squid configuration file located at /etc/squid/squid.conf. Open file using a text editor:
# vi /etc/squid/squid.conf
At least you need to define ACL (access control list) to work with squid. The defaults port is TCP 3128. Following example ACL allowing access from your local networks 192.168.1.0/24 and 192.168.2.0/24. Make sure you adapt to list your internal IP networks from where browsing should be allowed:
acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks

Save and close the file. Start squid proxy server:
# chkconfig squid on
# /etc/init.d/squid start

Output:

init_cache_dir /var/spool/squid... Starting squid: .       [  OK  ]

Verify port 3128 is open:
# netstat -tulpn | grep 3128
Output:

tcp        0      0 0.0.0.0:3128                0.0.0.0:*                   LISTEN      20653/(squid)

Open TCP port 3128

Finally make sure iptables is allowing to access squid proxy server. Just open /etc/sysconfig/iptables file:
# vi /etc/sysconfig/iptables
Append configuration:
-A RH-Firewall-1-INPUT -m state --state NEW,ESTABLISHED,RELATED -m tcp -p tcp --dport 3128 -j ACCEPT
Restart iptables based firewall:
# /etc/init.d/iptables restart
Output:

Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]
Applying iptables firewall rules:                          [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

Client configuration

Open a webbrowser > Tools > Internet option > Network settings > and setup Squid server IP address and port # 3128.

See also

You may find our previous squid tips useful:

Squid Security and blocking content Related Tips

Squid Authentication Related Tips

Squid Other Tips

Download of the day: Linux Weather wallpaper

Posted on in Categories Download of the day, Gnome, Linux, Linux desktop, Linux distribution last updated August 29, 2007

The Weather Report tool downloads weather information from the U.S National Weather Service (NWS) servers, including the Interactive Weather Information Network (IWIN) and other weather services. You can use Weather Report to display current weather information and weather forecasts on your computer taskbar / Panel (fig # 1):

Download of the day: Linux Weather wallpaper
Fig # 1

Now there is a new tool called Weather wallpaper. It is a program which connects to NOAA each hour to get the current weather at the specified location and creates and sets a wallpaper with the data retrieved.

First you have to search for the ICAO Location Indicator for your city and edit the configuration file located at ~/.weather-wallpaper/conf accordingly.

Download Linux Weather wallpaper

=> Linux Weather wallpaper