Tag Archives: lamp

Setup a backup job for your LAMP sites. | Setup a backup job for your LAMP sites.

I wrote a script which takes a backup of my webserver, taking a snapshot of all the website content, database, and configuration files.

Theory is if the webserver died, we would be about to result quickly using the data backed up.

On the server, put the following script and below is the cron entry which triggers every week. You will need up change the username and password for your mysql server.

This is the cron entry which fires up every friday.

Now this script will be on a linux machine somewhere else, it will connect and copy the backup archive file generated. You must first setup the ssh key so that its passwordless connection.

Simplicity it key! It works and will get you out of trouble. Well worth the 5minute investment.

 

 

Ubuntu installing and preparing Apache2 and PHP7 | how to install and setup apache2 and php on ubuntu

I spent a bit of time this morning setting up apache2 and php, things have changed in the newer versions of Linux.

The following will install apache and php.

This will test if PHP is install and running on the command line.

This will check if the PHP modules are loaded in apache.

Save the following file in the following location.

restart apache

in your web browser navigate to

You should see something like this.