/ KB

On Preparing a Linux VM

Yes, I'm a .NET guy, but every now and then I need to deal with the penguin's side of the moon.
This is a short tutorial on setting up a Linux virtual machine with the LAMP stack for testing and playing around.
All the steps below require you to login to your remote server. Keep your root's credentials on sight, you'll need them.


First of all, let's add the Webmin repo

sudo vi /etc/apt/sources.list

Press i on the keyboard to enable vi's editing mode and add this line at the end:

deb http://download.webmin.com/download/repository 
sarge contrib

Press Esc to exit edit. Shift + : followed by wq to save the changes.
Now download and install the key via:

wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -

Once completed, install the latest version on Webmin:

sudo apt-get update
sudo apt-get install webmin

Now point your client's browser to https://<ubuntu-serverip>:10000 to reach the Webmin login page.

PHP 5.6

To upgrade to a newer version of PHP 5.6 on Ubuntu 14.04, you can use Ondřej Surý's PPA. He is one of the Debian maintainers of the php5 package. To add the PPA and upgrade your packages, run:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring 

php5.6-mcrypt php5.6-mysql php5.6-xml
sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart
As reported, without the a2dismod/a2ensmod steps, Apache will continue to see your older version of PHP, even if command line is seeing the new version.

MySQL 5.6

If you're migrating from an earlier MySQL version, please backup your databases by running:

mysqldump --lock-all-tables -u root -p --all-databases > dump.sql

Then after the successful MySQL upgrade, you can restore if needed by running:

mysql -u root -p < dump.sql

To upgrade to MySQL 5.6 just run

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server-5.6

That's it.


A nice guide about installing Webmin.
How to move from PHP 5.5 to 5.6.
The simplest way to upgrade to MySQL 5.6.
Here there are directions for enabling remote access.


This article is provided as-is without any guarantees.
All the instructions reported in this blog post may or may not work for your environment, setup, or specific problem.
The author may not be responsible for any unwanted result, unexpected behaviour, data loss, or any problem whatsoever.
Please use this knowleldge base article at your own responsibility.