Main menu

Purple Technician

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

Tjänster Läs mer

Mjukvara

Utveckling av mjukvara

Utveckling av applikationer och spel

Läs mer
Dator

Datornätverk

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

Läs mer
Konsult

Konsulttjänster

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

Läs mer

Install Joomla on Raspberry Pi

Joomla is a content managment system (CMS) used my many people around the globe to manage their web sites.

Step 1. Setting up the Raspberry with LAMP

If you havent yet set up your Raspberry Pi as a web server my earlier article can help you:

LAMP with Raspberry Pi

Step 2. Download and transfer files

Next, we need a copy of Joomla. ALWAYS use the latest available – you can get it from here:

http://www.joomla.org/download.html

once downloaded, you need to unpack it to the directory /var/www on your Raspberry Pi

I usually use Filezilla to transfer files from my Windows PC to my Raspberry Pi.

To extract locally, open a terminal window and type (change 'joomla.zip' below to the appropiate filename):

sudo unzip joomla.zip -d /var/www

Remove the zip-file with

sudo rm joomla.zip

You can also download an quickstart package from one of the companies who makes templates for Joomla. Just use the quickstart package instead of the above package.

Step 3. Edit config files

Now we need to change a couple of settings in your php.ini file to reduce the load on the Raspberry Pi:

cd /etc/php5/apache2
sudo nano php.ini

then press CTRL w to search for a string, and search for output_buffering

now change it to look like this:

output buffering
Default Vaule: Off
Development Value: 0
Production Value: 0b

now press CTRL o then CTRL x to save the file and exit.

Next, we need to create and make sure your configuration.php is writeable:

sudo bash
cd /var/www
touch configuration.php
chmod 777 configuration.php

and make apache owner of the www-directory

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

Step 4. Install Joomla

Once done, point your browser at http://your-raspberrypi-ip/ or http://localhost if you are on the device.

(if you get the standard Apache welcome screen, delete the index.html from /var/www)

You should get the Joomla installation screen.

Just go through all the steps.

If you cant remove the installationdirectory you have to remove it by:

cd /var/www
sudo rm -rf installation

Now you are done and you can reach your website at http://your-raspberrypi-ip/ or http://localhost if you are on the device. Your adminpages are on http://your-raspberrypi-ip/administrator or http://localhost/administrator if you are on the device

 

 

Install Jenkins on a Linux Debian system

To install Jenkins on a Linux Debian system follow this guide

Step 1. Installing OpenJDK 7

To install OpenJDK 7 JRE and JDK, execute the following command:

sudo apt-get install openjdk-7-jre 
sudo apt-get install openjdk-7-jdk

Step 2. Installing Jenkins

Before we can install Jenkins, we have to add the key and source list to apt. This is done in 2 steps, first we'll add the key.

wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -

Secondly, we'll create a sources list for Jenkins.

echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list

Now, we only have to update apt's cache before we can install Jenkins.

apt-get update

As the cache has been updated we can proceed installing Jenkins. Note that Jenkins has a big bunch of dependencies, so it might take a few moments to install them all.

apt-get install jenkins

Step 3. Configuring Jenkins

Now that Jenkins is running, go to your-server-ip-address:8080. You'll be welcomed by the default Jenkins screen.

You probably have to wait for some time to let Jenkins install itself.

 

After a while you'll be welcomed by the default Jenkins screen. Currently, the installation is insecure and everyone can access it. Lets fix that! First, go to Manage Jenkins (in the left menu) then click Setup Security on the page loaded.

Then enable the security by checking the box.

Set it to use Jenkins's own user database and disable sign ups.

Next, go for the Matrix-based security.

Make sure Anonymous only has the Read right under the View group (Jenkins could crash when it doesn't have that set).

Click save at the bottom of the page. After the page load, you'll see a login form, ignore that, go to ci.company.net:8080 again instead. You'll see this sign up form.

Sign up with a username and you'll be administrator of this fresh Jenkins install.

 

All done!

Install Phabricator on a Linux Debian system

After experiencing a few problems installing Phabricator on my Raspberry Pi I wrote this article.

"Phabricator, an open source, software engineering platform

Phabricator is a collection of open source web applications that help software companies build better software."

Requirements

Phabricator can run in a normal computer, with following required packages. We don’t need specification with high resources.

  1. Apache2.2.7 or higher
  2. MySQL and PHP 5.2 or higher
  3. Git and some of the php extensions.

You can follow my guide "Installing LAMP on a Raspberry Pi" here.

Login on the Raspberry Pi as root.

 

Step 1: Installing Required Components

We will first install a few additional PHP-extensions:

sudo apt-get install php5-gd php5-dev php5-curl php-apc
 

Step 2: Downloading Phabricator Files

Once, you have all the above stuff installed, now pick install directory. Here I’m going to create a directory called ‘myproject‘ under DocumentRoot of Apache directory.

sudo mkdir /var/www/myproject
cd /var/www/myproject

Now, start pulling the phabricator and its dependencies from there official git repository.

git clone https://github.com/phacility/libphutil.git 
git clone https://github.com/phacility/arcanist.git 
git clone https://github.com/phacility/phabricator.git

Step 3: Configure Apache for Phabricator

On Ubuntu based distributions, you need to enable mod_php, mod_rewrite and mod_ssl modules, during installation most of these modules enabled by default, but we need to confirm.

sudo a2enmod rewrite 
sudo a2enmod ssl

Once, these modules enabled, next restart the web server to reflect changes.

sudo service apache2 restart

Next, create a separate Virtualhost in your Apache configuration file.

sudo nano /etc/apache2/sites-available/phabricator.conf

Append the following Virtualhost entry at the bottom of the file and change the

DocumentRoot path to match exact location of phabricator files and ServerName path to your local ip-address

<VirtualHost *:80>
ServerName 'your local ip-address' DocumentRoot /var/www/myproject/phabricator/webroot RewriteEngine on RewriteRule ^/rsrc/(.*) - [L,QSA] RewriteRule ^/favicon.ico - [L,QSA] RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] <Directory "/var/www/myproject/phabricator/webroot"> Order allow,deny Allow from all </Directory> </VirtualHost>

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

sudo a2ensite phabricator.conf

Finally, restart the Apache service to reflect new changes.

sudo service apache2 restart

 

Step 4: Configure MySQL for Phabricator

Now, it’s time to configure MySQL, but before heading up for setup, make sure your MySQL is running and you able to connect to it. So, that you can load the mysql settings into it. Note that you hace to substitute 'secret' with our choosen password for the MySQL-server

cd /var/www/myproject/phabricator/
./bin/config set mysql.host localhost
./bin/config set mysql.user root
./bin/config set mysql.pass 'secret'

Next, run the storage upgrade script to load database schema into it. While processing, it will prompt you to press ‘y‘ to continue, this will take little time to complete the setup for setting-up data schema.

./bin/storage upgrade --user root --password 'secret'

Once, scheme added to mysql, restart the service to take new settings.

service mysql restart

 

Step 5: Configuring Phabricator Web UI

Now you can access the web UI at the following locations, but we need to create an admin login account.

http://ipaddress

If the above admin setup page is not displayed we need to create admin login manually from the terminal. This step only required, if incase we get the error cause admin account was not defined.

./bin/accountadmin

Once admin account created, you can login into admin section using same credentials. After login you can see some setup issue in the top left corner, that needs to be resolved before start using it.

 

All done!

LAMP with Raspberry Pi

In this article I will show you how to install LAMP (Linux Apache Mysql Php) on your Raspberry Pi.

Step 1. SD-card preparations

First you should prepare your SD-card accordingly to the documentation. I recommend Raspbian as the OS.

 

Step 2. Connecting

Either connect a display, mouse and keyboard to connect or use some kind of software to SSH into the Raspberry Pi.

I usually use putty to SSH into the Raspberry Pi. Use your router to examine which IP-address the Raspberry Pi receives.

You login in as 'pi' with the password 'raspberry'

 

Step 3. Updating

First of all you shall  do the basic configuration of the Raspberry Pi:

Either the system starts 'raspi-config' automatically or you have to start it manually with

sudo raspi-config

As a security measure you shall change your passwd:

sudo passwd pi

Also change the root password with

sudo passwd root

Then you shall update your system with the following commands:

sudo apt-get update
sudo apt-get upgrade

You will be prompted if you would like to continue, typefor yes and hit enter to continue. This process may take a few minutes.

 

Step 4. Install Apache and PHP

To install Apache and PHP, use the following command: 

sudo apt-get install apache2 php5 libapache2-mod-php5

You will be prompted if you would like to continue, typefor yes and hit enter to continue. This process may take a few minutes. 

If you get any errors, run the following commands:

sudo groupadd www-data
sudo usermod -g www-data www-data

Restart Apache with the following command:

sudo service apache2 restart

Now go to your web browser of choice and type the Raspberry Pi's IP address into the URL bar. (if you cannot remember the IP address, use the ifconfig command). 

You should see a web page that says "It works!"

 

Step 5. Install Mysql

Install MySQL with the following command:

sudo apt-get install mysql-server mysql-client php5-mysql

You will be asked if you want to continue, type y for yes and hit enter to continue. 

During the installation, you will be prompted to set a new password for the MySQL root user.  Type a password of your choice, confirm the password again to continue the installation.

 

You are now done with your LAMP-installation!