There are few tricks and tips that one should take care of with their servers. Here are some useful tips that can help you:
SO now you have a new server, what to do with it? The sky is the limit! Or is it? Naturally, and logically, there are restrictions. But a little extra attention for some details goes a long way… Let’s go over some of them.
Security: This is important, and cannot be stressed out enough. THEY ARE OUT THERE. Sounds dramatically? It is! If you want to keep the bad guys away start spending quality time on the firewall before activating services such as MySQL or Postgresql. I am not exaggerating. In the first night my server was active (I hadn’t even discovered these forums yet) I got 16 logon attempts from a total of 3 different IP addresses. Where the heck they came from is beyond me, but this is common behavior (this isn’t a surprise for me; been here, seen this before). They are out there! Trust me on this.
By default you might feel safe, no icky things in your logs, everything seems in order… Yes and no. Go Daddy charges you for used up space, and doesn’t risk default processes gobbling up your disk space without you knowing it. I think this is a very fair business policy, but it comes with a price. Namely that you’re probably left in the dark about your security. Do you have a “/var/log/secure” file telling you details on login attempts, failed login attempts and such?
If the answer is no then this is most likely because you do not have the “syslog” package installed (“sysklogd.i386″ to be exact). Want it? Then do (as root): “yum install sysklogd.i386″. And wham, in no time you’ll see what’s happening on your box. Careful: This comes at a price. Not a big one, but those log files do take up disk space no matter how you put it. Fortunately not all is lost.
If you installed that MC program mentioned earlier now is a good time to use it. Go to the /etc/logrotate.d directory. Here you’ll find a file called “syslog”. Press ‘F3′ to view it. Don’t worry if you don’t understand everything in there. What counts here is the first line. Notice stuff like “/var/log/messages” and “/var/log/secure”?
As the name suggests this is a configuration file telling a program on your server called “Log rotate” to actually rotate the files being mentioned in the config files which you find in that “/etc/logrotate.d” directory. So what does this mean? That every day (assuming default behavior) the system will archive your logfile and tell the main system to start using a new one. So, for example, let’s focus on “/var/log/secure”. A very important file in my opinion. If you wait a while (and I suggest not doing this behind your computer, but getting some sleep too) you’ll eventually notice 2 ‘secure’ files. One called ‘secure’, the other called ‘secure.1.gz’. What is this? Simple.. The first (’1′) of the compressed (‘gz’ stands for ‘gzip’ which is a compression program on Linux) logs. Still didn’t get MC? Shame on you! If you are on the console you can still easily view this file, just use something like: “zless /var/log/secure.1.gz” (you need to be root). ‘Space’ goes to the next page and ‘q’ quits. Using MC you simply press ‘F3′.
To conclude a personal comment: Go Daddy, I really hope you’ll consider using some ‘preview’ option. It really makes life easier (I know I could ‘edit’ my post, but still… “A good preparation goes a long way”).
Creation of Backup – Regular backups are necessary as we do not know when a failure can occur. It is a good practice to take backups of all documents, images and database and make sure it is stored in the right place.
To perform regular kernel security updates and keep all software’s up-to-date and secure.
Easy script installations such as Fantastico or Softacolous can be useful in daily installation requirements and keeps you safe from unwanted server errors and bugs.
Control Panels can make your life easier when you are about to manage their sites.
Frequent update of passwords is important to increase security of your dedicated servers.
Monitoring is a good habit which helps you to understand your dedicated server better. This mainly can be through monitoring software or a remote panel offered by your hosting provider.
Use only that is required. You should leave more space for your CPU, RAM and disks to deliver better.
Maintenance should be taken seriously as this increases your dedicated server lifespan and mainly include software updates, software upgrades, migrations, service checks, security monitoring.