Tuesday, April 2, 2013

TCP trace route in windows using tracetcp



For latest posts and newsletters Stay Tuned
Trace route is a nice tool to find where in network resides the actual problem. Windows tracert uses ICMP. ICMP traces can often be inaccurate. To get a more realistic picture of what is going on we will use TCP based trace route. For this in windows based systems we can use tracetcp tool. In this post we will see how to install tracetcp in windows 7 and use it.


You can download a TCP trace route utility for Windows from the following location:
http://tracetcp.sourceforge.net/

You will need to download and install WinPcap first to be able to use tracetcp from the command line. You can download WinPcap from here:
http://www.winpcap.org/install/default.htm




Monday, March 25, 2013

Amazon AMI Copy example with snapshots



For latest posts and newsletters Stay Tuned
Amazon recently announced a new feature to copy the AMIs over regions. It makes replication very easy process. You have to create Linux AMI or Windows AMI of your instances. Then copy it to other regions in case if the current region goes down you can run your site/application from other regions. I have explained how to create AMIs of Linux and windows in previous posts. Also the replication of AMI. But this feature makes it very easy.

In this example we will show how to copy an AMI from North Virginia(US-East) to Oregon(US-West):



Tuesday, December 18, 2012

configuring tftp server in Ubuntu



For latest posts and newsletters Stay Tuned
We use tftp server for network boots. Loading images etc. In this post we will see how to set up a tftp server in Ubuntu.

Install xinetd:
tftp doesn't have a daemon of its own. So it uses xinetd for service control. It is not installed in Ubuntu by default.
apt-get install xinetd

Now install tftpd:
apt-get install tftpd



Saturday, November 3, 2012

benchmarking with http_load



For latest posts and newsletters Stay Tuned

There are a lot tools are there to benchmark a webserver. One of the useful tool is http_load. It is very simple to use. First you have to download and install http_load. Then test the webserver with urls and different options. With http_load you can run multiple http fetches in parallel to test the performance. It gives you a rough idea of how many bytes a server can serve in a time period.
Install the http_load tool:
wget http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz
tar xvzf http_load-12mar2006.tar.gz
cd http_load-12mar2006
make
make install #if required



Monday, October 15, 2012

No space left on device: mod_jk: could not create jk_log_lock



For latest posts and newsletters Stay Tuned
I got this error while working on Apache.
[crit] (28)No space left on device: mod_jk: could not create jk_log_lock
Configuration Failed

It was due to the semaphore limitation.
[root@host ~]# ipcs -su
------ Semaphore Status --------
used arrays = 127
allocated semaphores = 127
[root@host~]#



Thursday, October 11, 2012

Installing SSL certificate on Apache with Tomcat



For latest posts and newsletters Stay Tuned
I have an Apache tomcat stack on which Apache is front proxy and tomcat is serving contents. How to install SSL on this scenario? Whether to install ssl on Apache or Install ssl on Tomcat? In my case Apache and tomcat is connected using mode_jk. I installed ssl on apache. Here is the steps how I did. Comment if you know some better methods. Operating system used is Centos 5.4, Apache version is httpd-2.2.3-65.el5.centos and Tomcat tested on 5 and 6.

Check here for Installing and configuring Apache with tomcat using mod_jk
Generating key and csr:
yum install mod_ssl openssl



Sunday, October 7, 2012

url redirection in apache using proxypass



For latest posts and newsletters Stay Tuned
Url redirection in Apache webserver.
Here is a small example of url redirection in Apache using proxypass. I used this when I was using Apache as proxy to Apache tomcat using mod_jk.

Example:
you want to forward
www.yourdomain.come/abc to www.yourdomain.com/linux/commands/abc



Wednesday, September 5, 2012

Configuring multiple domains or sub-domains in tomcat



For latest posts and newsletters Stay Tuned

We all know how to create multiple domains in Apache. By adding virtual host etries. But how to configure multiple domains in tomcat? We can do this by adding multiple Host tags in server.xml. Its very simple. See the example below. Edit server.xml under conf directory. Suppose you want to setup three domains domain1.com, domain2.com and domain3.com. Every domain points to same ip address in the server.




Saturday, August 11, 2012

Creating multiple user login in Amazon ec2



For latest posts and newsletters Stay Tuned

We know we can login in Amazon ec2 linux instances with our .ppk/.pem keys. But it is restricted to a single root user. How to create more normal users and let them also login to the instance? of course they cant use root users key. so we have to create new login keys for them. This post is also applicable for normal systems. We will see how to create key based authentication for normal users.




password protected directory in tomcat



For latest posts and newsletters Stay Tuned

How to protect a web directory with a password? if we are using Apache, we can do it easily with .htaccess. It will prompt user for credentials while entering the directory. But how to protect a directory with password in tomcat web server? In this post we will discuss how to do it with tomcat Realms. This example was tested in tomcat 7 and tomcat 6.