Archive for October, 2007

Oct 26 2007

Quick introduction to MySQL

Published by admin under MySQL

There is a lot of books written about MySQL, some of them are very deep and profound and explore endless possibilities of this true “people” database server. But very often this is not for a beginner, who just enters the world of databases, needs. He needs to read a little and to build upon it fast, especially if his manager is very demanding.

Well, dear friends, save your money and go directly to the source. It should help you to start with MySQL in a couple of days (if not the same day).  There is a nice tutorial in MySQL reference manual written by developers of this database server.

No responses yet

Oct 21 2007

One Web Site Instead of All Books

Published by admin under Apache

Honestly, my dream is to find a great book on Apache server. From time to time I still keep this dream alive by religiously buying newly published books on Apache. But after reading half of the new book, I realize, that I am not getting any new “inside” information that will put AFG Solutions ahead of its competitors.

So, here is my conclusion: You may find anything about Apache Web server, its new features, configuration, etc on Apache’s own web site. I think, we are just getting too lazy to read stuff off Internet, plus the above mentioned reasons that I was talking about. And I also, honestly, think, that authors got our attitude and make a lot of money on us by just rephrasing the same information taken from Apache Web site. Apache.org is a truly great site, maybe a little bit chaotic and slightly disorganized. But that is where you need to turn to in your times of trouble.

No responses yet

Oct 17 2007

Troubleshooting Linux

Published by admin under Linux Administration

We all had problems with Linux and sometimes had to spend hours searching for solutions, googling and surfing message boards. Would not it be nice if the whole troubleshooting guide will be in one place?

There are many sites that try to create that kind of all-encompassing tutorial for troubleshooting with different level of success.  I can recommend one of them that stands aside from the others. This Wiki deals with software and debugging mostly, but people of various Linux/Unix skills might fine them intriguing. So, read on!

No responses yet

Oct 13 2007

How to free a lot of memory and drop caches

Published by admin under Linux Administration

In my Web Analytics company, I occasionally had problems with Linux servers, because they tended to cache a lot of stuff. Especially, this problem occured, when I was manually copied a lot of files or was doing a tar backups for one of our clients. Well, there is an easy  solutions for this issue now

Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can help free up a lot of memory. Now you can throw away that script that allocated a ton of memory just to get rid of the cache…

To use /proc/sys/vm/drop_caches, just echo a number to it.

To free pagecache:

# echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

# echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation and dirty objects are not freeable, the user should run “sync” command first!

No responses yet

Oct 13 2007

Do you wanna… Samba?

Published by admin under Samba

I can’t express how happy I was when I built my first Samba server. I used my old box that was no good for running Windows file-and-print server, did not have enough memory or storage for that “perfect” Microsoft configuration.

This was a while ago. Those who did not have their own Samba, had to cough up a chunk of money for Windows “solutions”.

Anyways, when I saw that server icon from my Windows workstation, I was walking on heaven… After a while, I thought and created networking environment for all my printers. They started running off my mentioned above Samba server, unclogging my not -so-fast home LAN.

When hard drives became much bigger and printers more sophisticated, having Samba servers made even more sense. Anything, just anything that was not worth while keeping on our workstations went to Samba servers. Each person had his own share, where he could work and in the end of the day save all his stuff. Windows workstations were running faster and no information was getting lost or slipping through the cracks.

There is an unthinkable number of configurations that you could for your home LAN, office LAN, medium-size or big corporation. The settings are are easy, as a rule, if you know what you are doing. If you don’t, well, go to the main Samba site, click on Documentation link and knock yourself out. I swear, you won’t regret it.

No responses yet

Oct 11 2007

Miracle software with a simple name Dovecot

Published by admin under Sendmail

Over the years I used Dovecot as a companion for Sendmail. It is getting better with the time. In early versions I had to open the configuration file in Dovecot and tweak it (the tweaking itself was as simple as it could be). In recent versions one can use Dovecot as is - right “out of the box”.

The most surprising, positive effect that Dovecot has on me is that it just never crashes. Hundreds of megabytes go through this software, it receives it gracefully and without any visible (or invisible) problems.

There are still many interesting configurations that can be used with Dovecot. I am so glad that the Dovecot guys now have their own Wiki. Read it and you will find lots of tips and tricks that can help you one day.

No responses yet

Oct 03 2007

IPTables: Blacklists

Published by admin under Linux Administration

I bet, you have to block more and more ip addresses to your iptables on daily basis. How about blocking the whole country? I don’t know how these guys from LinuxAdmin.org did it, but it is a reality. You can use this simple application to automatically generate huge list of ipaddresses of a certain country (there are 14 countries, currently, I believe) ready to be included in your iptables. You can block selectively certain ports of your choice : smtp 25(tcp), ssh 22(tcp), ftp 20,21(tcp),http 80(tcp),dns 53(udp),53(tcp) and so on.

No responses yet

Oct 01 2007

The Spamhaus Project

Published by admin under Sendmail

I have nothing but the utmost respect for the Spamhaus project.  What is Spamhaus? For those who don’t know I wll reproduce the quote from its web site:  “Spamhaus tracks the Internet’s Spammers, Spam Gangs and Spam Services, provides dependable realtime anti-spam protection for Internet networks, and works with Law Enforcement to identify and pursue spammers worldwide.

And this is not boasting but 100% true. You just need to add a line to your E-mail server like Sendmail or Postfix and you are all set! Spamhaus filter catches up to 70% of all junk and spam e-mails. In fact, there are several filters that you can set up with Spamhaus.

I heard some sysadmins comlaining that sometimes spamhaus jamms a couple of legimitate addresses. Yet, nothing happens without reason. Somehow these “legimitate addresses” got busted somewhere in most cases and were included in Spamhaus blacklists.  If one believes that such thing occured, he needs to go and resolve this issue with Spamhaus, not with you.

So, if you are interested in clearing your cluttered shiny new E-mail server from spam and junk, visit the Spamhaus project.

No responses yet