Main menu

Purple Technician

Din leverantör av System- och tekniklösningar inom IT-området

Tjänster Läs mer


Utveckling av mjukvara

Utveckling av applikationer och spel

Läs mer


Installation, konfigurering, felsökning och support av nätverk, klienter, servrar och programvaror

Läs mer


Systemdesign, Weblösningar, IT-säkerhet, Utbildning m.m.

Läs mer

Installing Drupal on Raspberry Pi

This guide will teach you how to install Drupal 7 on a Raspberry Pi


Before you get started with this guide, you will need Raspbian installed and updated. You will also need to have Apache, PHP, and MySQL configured on your server. Follow my LAMP guide here.

Once you have fulfilled the above requirements, continue on with this guide.

Step-by-Step Install Drupal 7 via Software Repositories

Step 1.  Install latest version of drupal (drupal7) from the repositories with following commands:

sudo apt-get update
sudo apt-get install drupal7

Step 2. Registering Drupal to apache with following command:

sudo cp /etc/drupal/7/apache2.conf /etc/apache2/mods-enabled/drupal.conf
sudo /etc/init.d/apache2 restart

Step 3. Create database with command below,in case we’ll create database with name “dbdrupal”

mysql -u root -p

Logout from mysql server


Step 4. Install drupal from your favorite browser by typing http://host/drupal7/install.php

Step-by-step Installing Drupal 7 Manually

Step 1. Download and extract all drupal files into /var/www/ directory:

sudo -i
cd /var/www
tar xvf drupal-7.36.tar.gz
mv drupal-7.36/ drupal

Step 2. Change an ownership of all Drupal installation files to www-data user.

chown -R www-data.www-data /var/www/drupal/

Step 3. Create a MySQL database to be used by our new Drupal 7 installation, Let’s create and use following credentials:

  • Database: dbdrupal
  • User: drupaluser
  • Password: drupalpass
mysql -u root -p
create database dbdrupal;
CREATE USER drupaluser;

Create password: “drupalpass” for user: “drupaluser”

SET PASSWORD FOR drupaluser = PASSWORD("drupalpass");

Grant user drupaluser all permissions on the database.

GRANT ALL PRIVILEGES ON dbdrupal.* TO drupaluser@localhost IDENTIFIED BY "drupalpass";

Logout from mysql server


Step 4. Navigate your browser to Apache’s hostname or IP address and follow Drupal 7 installer (http://hostname/drupal) to complete your own Drupal  installation.


Good luck!

Install multiple CMS for development on your apache server

This guide will show you how to install multiple CMS on your apache server. This can be used for development or customer presentations.

Step 1. Create directory and copy CMS

We are going to create a directory called ‘joomla1‘ under DocumentRoot of Apache directory.

sudo mkdir /var/www/joomla1
cd /var/www/joomla1

Now follow my guide to copy a Joomla CMS in your newly created directory at /var/www/joomla1 but substituting /var/www in my guide to /var/www/joomla1.

Now next CMS-directory

sudo mkdir /var/www/joomla2
cd /var/www/joomla2

Now follow my guide to copy another Joomla CMS in your newly created directory at /var/www/joomla2 but substituting /var/www in my guide to /var/www/joomla2

Dont forget to make apache owner of the www-directory

cd /var
sudo chown -R www-data:www-data www

Step 2. Change Apache-configuration

We have to make changes in apache ports.conf-file to listen to a few more ports.

sudo nano /etc/apache2/ports.conf

Add this after Listen 80:

NameVirtualHost *:8080
Listen 8080
NameVirtualHost *:8081
Listen 8080

You can add more ports if you like.

Next, create a separate Virtualhost-file in your Apache sites-available-directory.

cd /etc/apache2/sites-available/
cp default joomla1
sudo nano joomla1

Change the following Virtualhost entries:

port to, for example, 8080 in joomla1-file and 8081 in joomla2-file and so on, ServerName to your local ip-address, DocumentRoot to match exact location of your files, the same to Directory and :

<VirtualHost *:port>
ServerName 'your-ip-address-of-your-server' DocumentRoot /var/www/joomla1 <Directory /var/www/joomla1>

You have to to the exact same thing to your joomla2-file but change the port entry to 8081.

You need to enable the newly created virtualhost entries using following command

sudo a2ensite joomla1
sudo a2ensite joomla2

Finally, restart the Apache service to reflect new changes.

sudo service apache2 restart

Now  you can access your different CMS-sites at http://your-ip-address-of-your-server:8080 and http://your-ip-address-of-your-server:8081

Good luck

Cloning your Joomla 3.x site

I discovered a great extension which can clone or backup your Joomla 3.x site.

It is called Akeeba Backup and the extension is found here.

Just upload it to your existing Joomla 3.x site and you can then access it through Components on your admin site.

If you make a copy of your, for example, development site you can easily transfer the jpa-backupfile to your new site. Just upload this file to the root of your webserver installationfolder, for example /var/www on a apache webserver. You also have to transer a few files which are included in Akeeba Kickstart found here. Just place the required files from the kickstart-zipfile at the same folderlevel as the jpa-file.

Good luck!

Removing existing Joomla installation on Raspberry Pi

Remove all folders insida /var/www.

And use the command:

sudo apt-get remove --purge mysql\*

to delete anything related to packages named mysql. Those commands is only valid on debian / debian based linux distributions (for eg. Raspian).

For more cleanup for package cache you can:

sudo apt-get clean

Remember to:

sudo updatedb

Otherwise the "locate" command will display old data.