Things to do after setting up dedicated server

Setting up a dedicated server is easy. Operating it is difficult.

Thankfully there are many control panels that make the job of system administrator easy. However one must know what exactly to do after the system is up and running The list is endless, but there are some important things that almost every system admin must do.

The foremost worrying thing for me was to ensure that the system performance is up to the mark.

In my case I had a unique challenge – My website experiences 100K + visitors every day and  peak loads of 1000 + users at a time.
This happens quite d few times in a day. All these users need to connect to DB to fetch some information. To handle this peak load I made following settings in my VirtualMin system :

  1. Increase max DB connections in MySQL settings such that it can handle peak load.
  2. Increase the max execution time allowed for PHP Script.
  3. Increase max processed allowed by FcglD script
  4. Increase the max processing time / IO Timeout for FcgID scripts.

How to troubleshoot problems:

  1. Monitor the Apache error logs for your server.
  2. Monitor the MySQL errors to see if there are aborted connections or clients.
  3. Monitor slow queries in MySQL.
  4. Login to your PHPMyAdmin with your root user and see the recommendations.

Ensure you do the following :

  1. Setup regular server Backup – preferable a daily backup.
  2. Make sure, you copy the backup on a different machine / system regularly.
  3. Ensure OS and security updates are installed regularly.

 

As I come across other important settings / configuration to manage the system, I’ll list down more.

Keep watching.

VirtualMin – The most underrated open source control panel

To scale up my website and apps, I recently moved from VPS to Dedicated Server hosting.

The dedicated servers are undoubtedly more powerful than VPS, but they also come along with their own problems of managing. I chose to go for a un-managed server to keep the costs low. And with the new server, the search for a ‘perfect’ control panel started.

At first, I tried the Sentora Control Panel – but it had lot of limitations. I listed the limitations in my previous post here.

Thankfully, I stumbled upon Virtualmin. I read a lot of blogs to find the right panel. I must thank some blogs like this one and this one that did a fair amount of comparison of different control panels – and I feel both of them have underrated the Virtualmin.

Virtualmin can literally (and I mean it) perform ALL the tasks that a server administrator has to do – without knowing any linux commands. Everything is managed by a really nice (bootstrap enabled) Web UI.

Infact it provides so much flexibility (and options) for managing the server that sometimes it may scare away a beginner.

I tried to Open source version which comes for free (to keep my costs low) and I can vouch that this open source version is sufficient for all kind of tasks.

In my next blog, I will list some of the important customization and settings one must do to get things up and running.

Limitations of Sentora Control Panel

I recently moved from a VPS hosting to a Dedicated Server Hosting for many reasons – which I am not listing here.

Typically Dedicated hosting are costlier than VPS and so I wanted to save some money by not opting for managed servers and proprietary control panels.  Instead I chose to go for Open Source web panels. As a matter of fact, I am a big fan of Open Source.

I compared the list of open source web panels on the web and finally stumbled upon Sentora (which is a fork of ZPanel). I decided to try it out.

It has been only few days using Sentora – and I must admit that I am impressed. However, there are some serious limitations of Sentora – especially if you have used any other proprietary control panel in past. For e.g. in past I have used cPanel and Direct Admin.

In this blog I am listing some of those limitations. Before I get into details, I would like to thank the whole Sentora Team for all their hard work and maintaining Sentora.

Limited Cron Job Support

Sentora supports cron jobs. However, it is really – really limited. For e.g.

  • Cron task can only be a PHP file !! What if I want to run a python script or a JAVA program as a cron job ?
  • You can schedule jobs only in the format of periodic interval. For e.g. run every 10 min or daily etc. What if I want to run job on every Sunday at 10:00 p.m. ?
MySQL users have all permissions

When you create a MySQL user, the user has all permissions. This is an issue because sometimes I want to restrict some access to certain users. For e.g. allow Insert / Update and don’t allow Delete on certain Databases.

Sentora does not create a OS User

The main problem that I faced was that when you create a new Client, it does not create respective OS user. I am sure the Sentora team will have reasons to do so, but I will list here the problems that a server admin faces.

  • I could not do a SCP (copy from remote server to local server). The only way to transfer files was via FTP. This is an big issue if the file size is large.

How to overcome these limitations

You can overcome these limitations – but its not a easy job for someone who is not very familiar with the Linux OS.  For e.g. I went ahead and created a OS user for the client. Of-course I restricted the access of the user to limited functionalities.

Here is what I did to overcome the above limitations:

  • Create a OS user. Make sure you restrict his access.
  • Once the OS user was created, I was able to transfer large files using SCP
  • I was also able to set up custom cron jobs using the crontab utility.
  • Login via root MySQL user and restrict the access of SQL users

In my next blog I will document the detailed steps on how to migrate your domains and data from old hosting server (which might be running a different control panel) to Sentora Web Panel.