Installing Joomla on a Raspberry Pi: Difference between revisions

From Joomla! Documentation

Line 38: Line 38:


==Connecting Raspberry Pi to LAN==
==Connecting Raspberry Pi to LAN==
Now we put the micro SD card with the Operating System in the SD Card slot on the Raspberry Pi. With an Ethernet cable we connect the Raspberry Pi to the Local Area Network by connecting it to a router.
When we have installed the Raspbian Operating System on the SD Card, we will:
* Insert the micro SD card in the SD Card slot on the Raspberry Pi.  
* Connect an an Ethernet cable to the Raspberry Pi and to the Local Area Network (connect it to our router).
* Connect the 5V power supply to the the Raspberry Pi


When the Raspberry Pi has been powered up after roughly 30 seconds, we need to find the IP address. We can use different approaches for that:  
Booting up the Raspberry Pi takes roughly 30 seconds. We've to find the IP address to connect to it using SSH. We can use different approaches for that:  
* log into the webinterface of your router and look up the connected devices;
* log into the webinterface of your router and look up the connected devices;
* use a mobile phone connected the Wifi router using a network scanning App called '''Fing Overlook''';
* use a mobile phone connected the Wifi router using a network scanning App called '''Fing Overlook''';
* use a command like '''nmap''':
* use a command like '''nmap'''. Assuming that our PC has IP address '''192.168.0'''.25 we can find all other devices in the same network range by doing the following:
<source lang="bash">sudo nmap -sP 192.168.0/24</source>
<source lang="bash">sudo nmap -sP 192.168.0/24</source>
Which might show the following details:
MAC Address: B8:27:EB:BA:27:1D (Raspberry Pi Foundation)
Nmap scan report for 192.168.0.15
Host is up.
To log into our Raspberry Pi, we'll use the command '''ssh'''.
<source lang="bash">ssh pi@192.168.0.15</source>
The first time you'll connect to it, it will show something like:
The authenticity of host '192.168.0.15 (192.168.0.15)' can't be established.
ECDSA key fingerprint is 42:42:42:42:42:42:42:42:42:42:42:42:42:42:42:42.
Are you sure you want to continue connecting (yes/no)?
We'll choose "Yes" and use the default password "raspberry"


==Webserver==
==Webserver==

Revision as of 15:40, 22 October 2016

The Raspberry Pi is a small single-board computer that was originally developed to promote the teaching of basic computer science in schools and developing countries. Because of its versatility it has become very popular and is used as media player, small stand-alone server, etc. You can use it as webserver and install Joomla! on it. This page shows you how to get a your Joomla! website running on the Raspberry Pi.

Hardware

  • Rasberry Pi version 3 Model B - There are various models of Raspberry Pi. You can use most models that have an Ethernet port (the Model B types). However for performance we will use the latest version with most RAM memory.
  • micro SD card - For the operating system + webserver + Joomla. (RPi version 3 model B uses micro SD other versions might use normal SD cards)
  • 5 Volt adapter (1 Amp) - to power the Raspberry Pi you'll need to convert the mains power (230V or 110V) to 5 Volt. The Rasperry Pi needs about 1 Amp, and maybe more if you connect USB devices to it.
  • standard Ethernet cable - to connect the RPi to your Local Area Network / router / the internet.

Installing Operating System

The operating system Raspbian is a Debian Linux version specially compiled for the Raspberry Pi. There are two versions of Raspbian available: Raspbian Jessie with Pixel Lite (version with PIXEL desktop based on Debian Jessie) and Raspbian Jessie Lite (minimal version based on Debian Jessie). Because we use the Raspberry Pi as webserver for Joomla, we won't need the GUI.

Download Raspbian Jessie Lite and unzip the downloaded file, e.g. 2016-09-23-raspbian-jessie-lite.zip (306 MB) to 2016-09-23-raspbian-jessie-lite.img (1.4 GB).

Now we need to copy the .img file to the (micro) SD card. You can use a tool with graphical interface like UNetbootin (for Windows, Mac OS X and Linux) or do it on the command line.

Be very careful when writing the .img disk image to another disk. In case you use the wrong destination disk, you will overwrite that disk with the .img which makes that disk unusable, resulting in data loss.

Windows

In a terminal (CMD) check which device corresponds with the SD Card and do something like:

dd bs=1M if=c:\temp\2016-09-23-raspbian-jessie-lite.img od=[the device of your SD Card]

See also Installing Operating System Images using Windows

Apple OSX

Check which device is used for your SD Card. In our case it's disk1s1 and we'll do in Terminal:

sudo dd bs=1M if=~/Downloads/2016-09-23-raspbian-jessie-lite.img of=/dev/disk1s1

See also: Installing Operating System Images on MacOS

Linux

We connect a SD Card reader with the (micro) SD Card to a computer. With dmesg we can find the device name of the SD Card. In our case dmesg shows something like

[xxxxxx.xxxxxxx]  sdd: sdd1 sdd2

meaning that we have a SD Card with 2 partitions. Do not write the Raspbian image to a partition but to the whole disk sdd.

We will use dd ("Disk Dump") to write an Input File (if) to an Output File (of) using a specified Block Size (bs).

Be VERY careful: dd will write to a device without any warning. Triple double check that that you write to the right device! If you write to the wrong disk, then you'll always remember the dd command as "Disk Destroyer".

sudo dd if=~/Downloads/2016-09-23-raspbian-jessie-lite.img of=/dev/sdd bs=4M

See also Installing Operating System Images on Linux

Connecting Raspberry Pi to LAN

When we have installed the Raspbian Operating System on the SD Card, we will:

  • Insert the micro SD card in the SD Card slot on the Raspberry Pi.
  • Connect an an Ethernet cable to the Raspberry Pi and to the Local Area Network (connect it to our router).
  • Connect the 5V power supply to the the Raspberry Pi

Booting up the Raspberry Pi takes roughly 30 seconds. We've to find the IP address to connect to it using SSH. We can use different approaches for that:

  • log into the webinterface of your router and look up the connected devices;
  • use a mobile phone connected the Wifi router using a network scanning App called Fing Overlook;
  • use a command like nmap. Assuming that our PC has IP address 192.168.0.25 we can find all other devices in the same network range by doing the following:
sudo nmap -sP 192.168.0/24

Which might show the following details:

MAC Address: B8:27:EB:BA:27:1D (Raspberry Pi Foundation)
Nmap scan report for 192.168.0.15
Host is up.

To log into our Raspberry Pi, we'll use the command ssh.

ssh pi@192.168.0.15

The first time you'll connect to it, it will show something like:

The authenticity of host '192.168.0.15 (192.168.0.15)' can't be established.
ECDSA key fingerprint is 42:42:42:42:42:42:42:42:42:42:42:42:42:42:42:42. 
Are you sure you want to continue connecting (yes/no)?

We'll choose "Yes" and use the default password "raspberry"

Webserver

A fast and leightweight alternative for Apache webserver is the becoming increasingly popular Nginx webserver.

Installation of Nginx

sudo apt-get install nginx

Starting Nginx webserver

sudo service nginx start

PHP

MySQL

Joomla!

sudo wget https://github.com/joomla/joomla-cms/releases/download/3.6.3/Joomla_3.6.3-Stable-Full_Package.zip
sudo unzip -x Joomla_3.6.3-Stable-Full_Package.zip

External links