Report this

What is the reason for this report?

What kind of maintenance tasks should I be thinking about on a LAMP server?

Posted on August 20, 2013
lon

By lon

Hi everyone,

I recently set up a new LAMP server for two moderately trafficked blogs in my content network. The performance so far has been great and my 1 gig server still has plenty of RAM and processing speed available.

This is the first time I’ve hosted a server on my own. The first 48 hours were smoother than I expected but I did have a MySQL database lockup that brought my sites down until I cycled the process.

So my question is - what kind of maintenance tasks should I be doing on the server? Should I set up a cron to restart my database and apache services or reboot the droplet on some regular basis? Any other maintenance tasks I should be doing beyond offsite backups to ensure reliability?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Make sure you keep your server updated so that you’re up to date on all of the security patches. Also backup your files and databases. <br> <br>> Should I set up a cron to restart my database and apache services or reboot the droplet on some regular basis? <br> <br>No. If you have to do that, you’re doing it wrong. It should run flawlessly without having to restart any services.

The servers should take care of themselves if configured correctly. I would set up logwatch as it emails you every day details about whats happening on the server. <br> <br>Also consider something like OSSEC and/or ConfigServer CFS/LFD as they monitor connections and attempts to access the server. Also recommend doing security tweaks. <br> <br>Oh, and update using yum frequently.

On my 512Mb when doing some load testing, my MYSQL processes quit due to not having enough RAM. I’ve since set up a swap partition and have had no issues, so I would suggest that! :)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.