Compress and Uncompress using TAR

I often fall into situation where I have forgotten how to uncompress a tar file, specially during a new application setting up. Since this method of compression is outdate (but still widely used) and I have made my self comfortable in using “zip”. Commands for compressing and uncompressing a tar file is just as simple as zip.

 

Below is an example of compressing a folder “mango” into “mango.tar.gz”. Atributes after the command, “c” compress, “z” zip, “f” file, “v” verbose. If you want “bzip” file after compression rather than “gz”, use “j” instead of “z”.

tar czvf mango.tar.gz mango/

For uncompressing a “tar” file, use “x” extract atribute as shown below,

tar -xzvf Mango.tar.gz

Zip a File or a Folder in Linux CLI

I often require to compress large files or folder to port between servers and often find myself wondering the commands compress them. I usually use “zip” command command to accomplish my task. Option “-9” is used for best compression. This compression is compatible with Microsoft Windows too.

To zip a folder:

zip -9 -r <zip file> <folder name>

To zip a single file:

zip -9 <zip file> <filename>

Configuring a Subversion server with Apache2 and DAV

Subversion is very popular software version and revision control system where developers can maintain current and previous versions development work. It’s gradually replacing the old Concurrent Versions System (CVS) and provide more sophistic set of features to developers. In this article I will explain you how to configure a Subversion (svn) server which uses Apache2 and DAV module. Also I presume that you have a running Apache2 service in your server.

Continue reading

How to setup a Mirrored Subversion repository

Releases after 1.4 in Subversion saw the introduction of a new tool “svnsync” which was very useful in creating two synchronized svn repositories. It can be used on many different designs and the most simplest design was to create a mirrored repository of source repository as a backup. In this article I will describe a scenario where it is one step further on above mentioned design.

Continue reading

Application server load balancing using Apache JServ Protocol

Apache JServ Protocol (AJP) is a binary protocol which is mainly used as an inbound web request load balancer from a web server through to an several application servers. Inbound web requests (Sessions) are redirected to correct application server using a context based routing mechanism.

 

In this example, we are focusing on Apache 2.2 which uses proxy ajp, proxy and proxy balancer as the web server while Apache Tomcat 6.0.20 and Jboss 5.1.0.GA as the application servers.First, let’s configure AJP on Apache Tomcat.

 

By default AJP 1.3 is configured in Apache tomcat and default port is 8009. You may have to change this port accordingly to eliminate port conflict with any other application servers running on the server. Let’s consider port 8011 is available and configuration will be,

  Continue reading

Cisco VPN client configuration in Ubuntu

This guide is focuses on Ubuntu users who needs to connect to Cisco VPN. We will be using VPNC (it is in Ubuntu 9.04) and assumes you have profile file in .pcf format (we will use cisco.pcf as an example here).

 
Let’s begin and follow the steps exactly replacing your own pcf file:
 

Open terminal and run the following commands. Create a directory for our configuration and change into that directory,

mkdir vpnclient
cd vpnclient

Continue reading