Archive for the 'General Blog' Category

Friday, November 21st, 2008

If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands […]

Sunday, March 23rd, 2008

Introduction
In Windows, you use this format to access a directory
D:\Folder\subfolder\file.txt
In Linux, this is the basic format
/Folder/subfolder/file.txt
You’ll notice that the slashes are forward slashes in Linux versus backslashes in Windows. Also, there is no drive name (C:, D:, etc.) in Linux. At boot, the ‘root partition’ is mounted at /. All files, folders, devices and drives […]

Friday, February 22nd, 2008

In this tutorial I will describe how to install and configure mod_deflate on an Apache2 web server. mod_deflate allows Apache2 to compress files and deliver them to clients (e.g. browsers) that can handle compressed content which most modern browsers do. With mod_deflate, you can compress HTML, text or XML files to approx. 20 - 30% […]

Friday, February 15th, 2008

testing your webserver with siege
First, you’ll need to untar the package:
$ tar xvzf siege-latest.tar.gz
Then you’ll need to configure it; the default configuration is a good start:
$ ./configure
Configuration help is available with the -help suffix. The only one that I’ve personally added on is SSL support through the -with-ssl=/usr/local/ssl suffix.
Next, it’s time to compile and install:
$ […]

Friday, February 15th, 2008

Start/Stop and Restart Service
Apache Web Server
#apachectl start/stop/restart
#/etc/rc.d/init.d/httpd start/stop/restart
#service httpd start/stop/restart
Squid Proxy Server
#/etc/rc.d/init.d/squid start/stop/restart
#service squid start/stop/restart
DHCP
#/etc/rc.d/init.d/dhcpd start/stop/restart
#service hdcpd start/stop/restart
DNS
#/etc/rc.d/init.d/named start/stop/restart
#service named start/stop/restart
Sendmail
#/etc/rc.d/init.d/sendmail start/stop/restart
#service sendmail start/stop/restart
NFS
#/etc/rc.d/init.d/nfs start/stop/restart
#service nfs start/stop/restart
Samba
#/etc/rc.d/init.d/smb start/stop/restart
#service smb start/stop/restart
Network
#/etc/rc.d/init.d/network start/stop/restart
#service network start/stop/restart
FTP,imap4,pop3
#/etc/init.d/xinetd start/stop/restart
/etc/xinetd.d/ipop3,imap,ftp
disable =yes
vsftpd
#/etc/rc.d/init.d/vsftpd start/stop/restart
#service vsftpd start/stop/restart

Friday, February 15th, 2008

Sometimes you want to restart your Apache server after changing some configuration in your virutual hosts,sites etc, but you have few hundred clients currently downloading files from your server and you dont want to disconnect them.You need to use the following command
sudo /etc/init.d/apache2 graceful
This will gracefully restart your Apache with new configuration without affecting your […]

Friday, February 15th, 2008

Many data centers disable direct root login to servers for security reason. You need to login first as a normal user than su to login as root.
But i like direct login as root. So i disabled this extra security on my servers. If some one can get my root password, they can also get my […]

Friday, February 15th, 2008

Compressed files use less disk space and download faster than large, uncompressed files. You can compress Linux files with the open-source compression tool Gzip or with Zip, which is recognized by most operating systems.
By convention, compressed files are given the extension .gz. The command Gzip creates a compressed file ending with .gz; Gunzip extracts the […]

Friday, February 15th, 2008

#mysql -u root -p
Enterpassword : ************
mysql>use database_name;
mysql>repair table table_name;
mysql>quit;
#

Friday, February 15th, 2008

1. Telnet using TCP port 25 :
#telnet xxx.xxx.xxx.xxx 25
or
#telnet domain.tld 25
2. Issue the following smtp command sequence
helo <your domain name><enter>
response should be as follows
250 OK
mail from: <your Email Address><enter>
response should be as follows
250 OK - mail from <your Email address>
rcpt to: <recipient address><enter>
response should be as follows
250 OK - Recipient <recipient address>
data<enter>
response should be as […]