Thursday 31 May 2012

How to install dos2unix on Linux

DOS-based text files use a pair of carriage return (CR) and line feed (LF) as a new-line delimiter. On the other hand, UNIX-based text files simply use LFs to terminate each line. In order to convert a text file from DOS format to UNIX format, you can install the following package.Read more »

How to change hostname without reboot on Linux

In order to change hostname on Linux, you need to update a configuration file containing hostname, and then let the kernel know that hostname has been changed. The latter step is needed since the kernel still remembers an old hostname until the next reboot. In order to change hostname without reboot, do the following.Read more »

How to install iftop on Linux

iftop is a command line tool that shows a list of active network connections between local host and any remote host, sorted by their bandwidth usage. The list of top-ranking network connections (in terms of bandwith usage) is periodically refreshed in a text-based user interface. Using iftop, you can visually check the bidirectional bandwidth usage of different network connections in real time. In order to install iftop on Linux, follow the instructions below.Read more »

How to check Linux version

Knowing which version of Linux kernel you are running is important because many software or libraries require certain kernel subsystems and features be available in order to run properly. Knowing the kernel version can also be helpful in diagnosing systems or debugging software problems.Read more »

Wednesday 30 May 2012

How to add a static route permanently on Linux

A static route is defined by statically configuring a next-hop router IP address for a specific destination network. You can add a static route by using "route add" command. However, a static route so added is not persistent across reboots. If you would like to add a static route permanently on Linux, do the following. In this example, I assume that you wish to define a static route for network 10.10.0.0/16 via 10.10.5.5 on eth0.Read more »

How to install Google Chrome on Linux

Google Chrome is a free web browser based on WebKit layout rendering engine. Since its public release in 2008, Google Chrome has steadily grown its user base, and now it drives approximately one-third of all web browsing activities worldwide, largely thanks to its lightning fast speed and strong security protection. If you would like to install Google Chrome on Linux, you can follow these instructions below.Read more »

How to install Eclipse on Linux

Eclipse is a software development environment with extensible plug-ins, toolkits, and run-time libraries, supporting development in Java as well as other languages such as C/C++ and PHP. In order to install Eclipse SDK on Linux, you can do the following.Read more »

Tuesday 29 May 2012

How to set system-wide environment variables in Linux

In Linux, when a user logs in, login shell executes /etc/profile script. This script customizes environment variables system-widely for all users. Part of what /etc/profile script does is to source all .sh files placed in /etc/profile.d directory. Therefore, in order to set system-wide environment variables in Linux, you can create a custom file with .sh extension in /etc/profile.d as follows.Read more »

Monday 28 May 2012

How to run iptables automatically after reboot on Debian

If you have customized iptables rules, and would like to load the customized iptables rules persistently across reboots on Debian, you can leverage if-up.d scripts that are located in /etc/network/if-up.d. On Debian, any script that is marked as executable and placed in /etc/network/if-up.d is executed when a network interface is brought up.Read more »

How to configure network interfaces in CentOS

In Red Hat Enterprise or CentOS Linux, you configure network interfaces by using configuration files located in /etc/sysconfig/network-scripts/. For each network interface (e.g., eth0), there should be a corresponding configuration file (e.g., ifcfg-eth0) in the directory. If you would like to enable and configure a network interface, do the following.Read more »

How to log in to system VMs in CloudStack

In CloudStack, there are two system VMs (Console Proxy VM and Secondary Storage VM) that are automatically created by CloudStack for each zone. Console Proxy VM (CPVM) provides console access to tenant's guest VMs, while Secondary Storage VM (SSVM) downloads and maintains VM templates used by tenants. While setting up CloudStack, you may experience problems with either of the system VMs.Read more »

How to install Perl modules from CPAN

Perl has a mechanism to import Perl modules which are external software libraries written in Perl. The CPAN is a public repository of a number of useful Perl modules contributed by Perl developers worldwide. Since the number of core Perl modules that come with Perl is rather small, you often need to search CPAN and install external Perl modules from CPAN. Read more »

Sunday 27 May 2012

How to convert MTS to MP4 for free

My 3-year old camcorder is Canon Vixia HF100. It delivers excellent quality videos via optically stabilized 12X zoom lens. One caveat of the camcorder, however, is that video files are saved in AVCHD format, which is a HD video format developed by Sony and Panasonic. AVCHD videos typically have .mts or .m2ts file extensions. Read more »

How to install HDFS and Hadoop using CDH3

Cloudera's Distribution (CDH) provides streamlined installation of Apache Hadoop via Cloudera Manager. Besides Apache Hadoop, CDH also allows installation of other components such as Hive, Pig, HBase, ZooKeeper, etc. in a modular fashion. The free edition of CDH Manager allows you to build and monitor a Hadoop cluster consisting of up to 50 nodes. Read more »

Friday 25 May 2012

How to install and configure Tinc-VPN on Linux

tinc is an open-source VPN software with a number of powerful features not found in other VPN solutions.  For example, tinc allows peers behind NAT to communicate with one another via VPN directly, not through a third party.  Other features include full IPv6 support and path MTU discovery.Read more »

Tuesday 22 May 2012

How to set up a NFS server on XenServer

Suppose you would like to set up a NFS server on your XenServer-running host for whatever reason, so that other hosts can mount a NFS share exported by the XenServer host.Read more »

Friday 18 May 2012

Wednesday 16 May 2012

How to install CentOS in text mode

By default, CentOS provides a graphical user interface for installation. Sometimes such rich interface would be inconvenient when you are installing CentOS on a VM through slow VMware console. If you would like to install CentOS without GUI, do the following to enable text mode installation.Read more »

Friday 11 May 2012

How to install additional packages in XenServer

I noticed that the default repository maintained by Citrix for XenServer is virtually useless. Read more »

Wednesday 9 May 2012

How to install Maven on CentOS

Apache Maven is a project management software, managing building, reporting and documentation of a Java  development project. In order to install and configure Apache Maven on CentOS, follow these steps.Read more »

Tuesday 8 May 2012

How to install Java 1.6 in Linux

On Debian platform, Sun's Java is available via the non-free repository. If you would like to install Java JRE or JDK on Debian Linux, do the following.Read more »

Friday 4 May 2012

How to reset root password in MySQL

If you forgot the root password in MySQL, and would like to reset it, do the following as root.  In this example, replace "NewPassword" with your own password.Read more »