Posts by smanne:
How to install and configure FTP Server
June 29th, 2010There are lots of ftp servers available for linux, proftpd is one of the popular server available for Debian, so in this tutorial we will deal with installing and configring proftpd server on Debian
To install proftpd server
apt-get install proftpd
While installing there is a option to choose the type of installation, whether it is standalone or inetd installation, normally we need standalone installation, After installation the server will start automatically.
Read the rest of this entry “
MySql Database Replication
June 29th, 2010When we search for `Database Replication` we will find lots of tutorials, so here I wont add new one, I am just highlighting one of the best tutorials to refer.
http://www.howtoforge.com/mysql_database_replication
This article contains simple copy & paste steps to configure MySql replication, if you need more detailed indepth explanation on different configuration settings then go to
http://dev.mysql.com/doc/refman/5.0/en/replication.html
MySQL Stress Test tool
April 23rd, 2010Recently we moved a client from virtual host to amazon ec2 3 tier architecture then we thought of providing benchmark test report to show the Improvement, then we searched for simple straight forward tools, but we haven`t found, then I started to write a java code to benchmark by stressing mysql server.
It performed well, so being a fan of open source, thought of releasing that code and uploaded it to google code. Here is the link
Downloadable binary is not yet posted you need to compile it from source code Read the rest of this entry “
Script to start a instance in amazon ec2
April 6th, 2010This script is used to start a instance in ec2, you can extended this script in the way you want, we keep on posting new scripts to work with ec2
#!/bin/bash
export EC2_HOME=/home/sandeep/ec2/ec2-api-tools-1.3-46266
PATH=$EC2_HOME/bin:$PATH
export EC2_PRIVATE_KEY=/home/sandeep/ec2/pk-XXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=/home/sandeep/ec2/cert-XXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_URL=https://us-east-1.ec2.amazonaws.com
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/
export amiid="ami-0d5db264"
export key="xxxxsshkeyxxxx"
export zone="us-east-1d"
export id_file="/home/sandeep/ec2/keyxxx.pem"
export group="default"
#
# Start the instance
#
echo Launching AMI ${amiid}
${EC2_HOME}/bin/ec2-run-instances ${amiid} -z ${zone}
-k ${key} --group ${group} > /tmp/a
if [ $? != 0 ]; then
echo "Error starting instance for image" ${amiid}
exit 1
fi
export iid=`cat /tmp/a | grep INSTANCE | cut -f2`
#
# Loop until the status changes to 'running'
#
sleep 30
echo Starting instance ${iid}
export RUNNING="running"
export done="false"
while [ $done == "false" ]
do
export status=`${EC2_HOME}/bin/ec2-describe-instances ${iid} | grep INSTANCE | cut -f6`
if [ $status == ${RUNNING} ]; then
export done="true"
else
echo Waiting...
sleep 10
fi
done
echo Instance ${iid} is running
Please feel free to post any comments or errors XX
Page level caching using nginx
March 17th, 2010Many of our dynamic sites contain rarely updated content (ex. blog archive page). By adding nginx server as proxy server infront of your apache server you can server those pages like static pages instead of running the page for every request, this will boost your site speed from 50% – 400%.
We need apache, nginx to work with this tutorial
To install nginx on debian please follow this link
http://timothybowler.com/2009/11/25/compiling-nginx-on-debian-lenny/
Note: Dont install using aptitude it contains older version where gzip and proxy module not available,
Modify apache ports.conf to run apache on port 8080
Add this lines to default site of nginx
server {
listen 80;
server_name debianzone.com;
location / {
proxy_pass http://debianzone.com:8080;
proxy_cache debianzone-cache;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
}
}
Add this in http section of nginx.conf
http {
proxy_cache_path /var/www/cache levels=1:2 keys_zone=debianzone-cache:8m max_size=1000m inactive=600m;
proxy_temp_path /var/www/cache/tmp;
}
Chrome released for debian distros
December 9th, 2009Finally google released chrome browser for debian based distros. After running for hours i feel its stable and working fine
Download Google chrome for Debian
For developers it has developer tools which looks like firebug, but it`s not so power full like firebug, to open developer tools click
ctrl + shift + i
It also supports extensions and themes
At present i can say it as just an alternate browser, but not total replacement for firefox, let me test the stability of chrome for some more time

Changing host name of Linux server
December 5th, 2009To change the host name of current session use
/bin/hostname your-host-name
To change the host name permanently use
/etc/hostname /etc/init.d/hostname.sh start
Tools to monitor linux apache server
November 29th, 2009The following tools are usefull to linux administration and monitoring
RRDTool: RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. Use it to write your custom monitoring shell scripts or create whole applications using its Perl, Python, Ruby, TCL or PHP bindings.
Free ubuntu CD
November 28th, 2009If you are facing problem in downloading large files of linux distibutions, Ubuntu is giving a great offer, you can request free CDs from ubuntu it is totally free and ships to any part of world.
Mail alert for ssh login
November 28th, 2009To get a mail when some logged into your linux system then follow this steps
Edit .bashrc in root folder /root
vi .bashrc
Add following line at end of the file
echo 'ALERT - Root Shell Access (server name) on:' `date`
`who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")"
-f1`" yourmail@gmail.com

