Ahoy there! This is my blog in which I jot down some of my experiences in IT (stuff related to my job and other random IT stuff). Hope you find something useful. My primary fields of interest in IT are Korn/Bash Shell Scripting, web/middleware/database technologies (ZXTM, Apache, WebLogic Server, Oracle, etc.), ICT Operations Management, ITIL and UNIX (any flavour/distribution).

My blogs are hosted on hostmonster and run on the Wordpress platform. About 8 months ago, before I started blogging (finally!), I researched the pros and cons of various blogging platforms and tried out a few before selecting Wordpress. So far, it’s been a great experience blogging using Wordpress.

When I first started blogging, I registered the domain www.mrkips.com for my blogs. A few days ago, I registered another domain www.cybergav.in (a domain name which relates more to  me and my ethnic roots). Yesterday, I finally switched my blogs from mrkips.com to cybergav.in and although the Wordpress forums provide adequate information on how to do this task, I’m describing the process below which worked for me.

Let’s say you host your Wordpress blog on hostmonster (process should be applicable to most hosting platforms) and wish to switch its domain from www.abc.com to www.xyz.com.

 

STEP 1: Register your domain and specify DNS servers

Register your new domain xyz.com after doing a bit of research and choosing an appropriate registrar (typical factors in choosing a registrar are cost, DNS management facility, Domain privacy (not available for all ccTLDs) and customer service – there are other goodies usually provided such as web forwarding, domain cloaking, etc.). When you select your registrar and register your domain, you must ensure that you use the registrar’s DNS management facility to configure the DNS servers belonging to your hosting platform. For example, for my domain, I configured my DNS servers as ns1.hostmonster.com and ns2.hostmonster.com. It is this DNS configuration that will ensure the required DNS A records are inserted in your hosting platform’s DNS servers to map your domain name with your hosting account (and consequently your website).

 

STEP 2: Verify your domain

My domain was registered in less than half an hour and I could verify its registration using a WHOIS search. If your domain name registrar and hosting provider are different companies, then ensure you inform your hosting provider after registering your domain. My hosting provider switched my primary domain to cybergav.in and I configured mrkips.com as a parked domain. Now before you migrate your website to your new domain, you must verify if your new domain is resolvable. To do this, you can either use any one of the myriad websites available (e.g. www.who.is ) or use the nslookup utility as follows:

#
# SYNTAX 1: nslookup <domain name>
#
c:\>nslookup cybergav.in
Server:  BeBox.config
Address:  192.168.1.130:53
 
Non-authoritative answer:
Name:    cybergav.in
Address:  66.147.240.162
 
#
# SYNTAX 2: nslookup <domain name> <dns server>
#
c:\>nslookup cybergav.in ns1.hostmonster.com
Server:  UnKnown
Address:  74.220.195.131:53
 
Name:    cybergav.in
Address:  66.147.240.162

STEP 3: Change your Wordpress blog’s domain name

(i) Define the WP_HOMEand WP_SITEURLvariables: This is required in order to give your Wordpress blog its new domain name and access its Administration console (wp-admin). You do this by adding the following in wp-config.php (in the root of your Wordpress installation):

define('WP_HOME','http://www.xyz.com');
define('WP_SITEURL','http://www.xyz.com');

 

(ii) Update your blog’s Wordpress database by ensuring that URLs containing your old domain reflect your new domain as per the following example :

UPDATE wp_posts SET guid = REPLACE (
guid,
'abc.com',
'xyz.com');
 
UPDATE wp_posts SET post_content = REPLACE (
post_content,
'abc.com',
'xyz.com');

 

STEP 4: Redirect all traffic from your old domain to your new domain

After getting your blog up and running with your new domain name, you must redirect all traffic arriving at your old domain to your new domain to ensure your users and search engines know that you’ve switched domains. You must use a HTTP 301 Redirect method (permanent move) so that search engines and browsers will recognize your blog’s new home. You can configure this redirect by either using your hosting provider’s management tools or configuring .htaccess (Apache web server) as per the following example:

 

RewriteEngine On
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^/?$ "http\:\/\/www\.xyz\.com\/" [R=301,L]
VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

If you’re given access to a Linux machine without being told the Linux distribution being used, there are a couple of ways by which you can determine the Linux distribution

OPTION 1: Use the lsb_release utility.

The Linux Standard Base (LSB) is a joint project by several Linux distribution vendors working under the Linux Foundation, to develop and promote a set of open standards that will increase compatibility among Linux distributions and enable software applications to run on any compliant system even in binary form.

The lsb_release utility which is part of all Linux distributions which adhere to the LSB specification will print distribution specific information. Check the lsb_release manpage for details on usage. Example screenshots of using lsb_release on Ubuntu and Fedora distributions are given below:

 

lsb_release_ubuntu

 

lsb_release_fedora

 

OPTION 2: Check release files in /etc.

Linux distribution vendors typically include release files with details about the distribution, in the /etc directory. Screenshots of examples showing how to check such files on Ubuntu and Fedora are given below:

 

etc_release_ubuntu

 

etc_release_fedora

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

If you’re familiar with the UNIX touch command to modify the access and modification times of a file or directory and are looking for an easy equivalent on Windows, you can use Stefan Küng’s SKTimeStamp. Stefan Küng is the lead developer of TortoiseSVN

Check out some screenshots of SKTimeStamp below:

Installation (note the Tortoise watermark)

SKTimeStampSetup

Timestamps on file before modification (note the TimeStamps tab)

SKTimeStamp adds a TimeStamps tab

 

Timestamps on file after modification

SKTimeStampAfterTime

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

With virtualization so popular, gone are the days when you would need to partition your hard drive and configure dual-boot to give you the option of running more than one OS on your computer.

Sun VirtualBox is a free, open source x86 virtualization software which allows you to create virtual machines (VMs) on your computer’s Operating System (host OS) and run other Operating Systems (guest OS) within the VMs. Sun VirtualBox is easy and intuitive to use and will enable you to quickly test an OS. Well, many OSes nowadays come with LIVE CDs/DVDs to enable you have a test run, but running these OSes in a virtualization software like Sun VirtualBox works better and faster.

Given below is a screenshot of my Sun VirtualBox console. As you can see, I use Sun VirtualBox to run three 64-bit guest OSes (Fedora 11, Solaris 10, Ubuntu 9.04). I have run 2 guest OSes simultaneously, each with 1 GB of allocated memory, without any issues (on my 4 GB Dell Studio XPS 16 laptop).

sun_virtualbox

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

Scanning jars with JarScan

JarScan is a handy utility (available as a client and online tool) which can help locate a java class or package within jars and zip files (libraries). This is especially useful when debugging java.lang.ClassNotFoundException and java.lang.NoClassDefFoundError exceptions.

For more details about JarScan (developed by Geoff Yaworski), click here. In case Geoff’s JarScan-hosting website (inetfeedback.com) isn’t available, you may download JarScan version 2.1 from here.

A screenshot of JarScan usage is given below:

jarscan_help

Refer this example which shows how JarScan was used to find the location of the MulticastTest class.

A while ago, when I had a requirement to locate a Java class file, I simply used jar –tvf and grep. Although that worked, I would henceforth prefer to use JarScan, as it provides a good output, it is fast and it is platform independent.

VN:F [1.6.5_908]
Rating: +1 (from 1 vote)

 Page 5 of 12  « First  ... « 3  4  5  6  7 » ...  Last »