Coming from a cPanel world - how does one update LAMP stack on D.O?

February 27, 2016 1.1k views
LAMP Stack One-Click Install Apps Ubuntu

I am planning to sign up for one or more D.O droplets, but, coming from a cPanel/WHM background, where all aspects of the LAMP stack and other software packages are automatically updated, secured and maintained by cPanel, needing to maintain everything by myself seems rather daunting.

I know there are one-click scripts for installing the OS, Apache, MySQL and PHP, but what about updating them to apply patches etc.? How exactly does one go about ensuring that the different LAMP stack components and other software packages such as, say, phpmyadmin are kept updated?

I am planning to run Ubuntu LTS on the droplets.

How much time would I need to spend on a weekly/monthly basis, updating all this stuff on the server?

Thanks in advance,
Ramdak

1 Answer

Hey Ramdak,

As long as everything was installed via the package manager (apt-get), you can update the entire system with 2 commands:

  • sudo apt-get update

and

  • sudo apt-get upgrade

You can do this weekly or monthly, but it should be done at least every once in awhile. Especially if a vulnerability is announced and patched. You can automate this with a cronjob, but that would be up to your discretion.

NOTE: The 14.04LTS distro will require you to update the kernel in the control panel if the software update/upgrade installs a new kernel.

Happy coding,

Jon Schwenn
Platform Support Specialist
DigitalOcean

by Adam LaGreca
Updating the kernel on your DigitalOcean Droplet is a straight forward process that differs slightly based on the Droplet's operating system. In this guide, we'll walk you through the process of updating your kernels for DigitalOcean Droplets.
  • Hello Jon,

    Thank you for the quick and detailed response. I did read the kernel upgrade article and it sounded doable, though a bit scary - this part used to be handled by our service provider through their own template for the host node, which I guess is kind of like doing it through the control panel on D.O

    Do the one-click LAMP stack installs use apt-get? So, if I used them for the initial setup, I would still be able to use apt-get for the updates?

    Ramdak

    • Hi Ramdak,

      Some of our OS options have internally managed kernels. It's just that the latest LTS version of Ubuntu does not. If you create a new Droplet in a few months after 16.04 LTS is released, then you would not have to keep track of the kernel version in the control panel.

      The LAMP one-click uses software accessible via the standard Ubuntu repositories accessible with apt-get. Using apt-get for updates is appropriate.

      Happy coding,

      Jon Schwenn
      Platform Support Specialist
      DigitalOcean

Have another answer? Share your knowledge.