Install Guide Xibo Server

From Xibo
Jump to: navigation, search

Contents

Introduction

This document is a work in progress . Complete is an install guide for Windows systems. Eager Linux users should follow the instructions for their distribution, and then skip to the "Installing Xibo" section of the Windows install guide to install Xibo itself.

The server component of Xibo is written in PHP and therefore requires a webserver to make it work. It also needs a database server and PHP installed.

There are several install guides on this page, depending on the operating system you've chosen to run Xibo server on.

If you already know your way around webservers, PHP, MySQL etc then you can skip to the "What you need to know!" section which gives the bare facts in the shortest amount of characters possible.

Install on Linux

Linux makes a good home for a Xibo server. All of the software it needs to support it is provided by the major Linux distributions. We'll cover Ubuntu in detail here, as it's what I use. There are some notes further down for other distributions, however the whole procedure is very similar.

Setup Apache and PHP

Ubuntu

  • Install Apache 2.x Webserver
 sudo apt-get install apache2
  • Install MySQL Server
 sudo apt-get install mysql-server
  • Install PHP5 :
 sudo apt-get install php5 php5-mysql php5-gd

On Ubuntu, DOM, libXML, gettext and JSON extension is already compiled on PHP5

  • Restart Apache 2 Webserver if necessary
 sudo /etc/init.d/apache2 restart

CentOS 5.x / Redhat RHEL 5.x

JSON extension is not include in CentOS 5.x or Redhat RHEL 5.x but you can install it with this steps :

  • Install JSON PHP Extension
 yum install php-devel

If you have more than 8MB of memory limit for PHP, install with PEAR :

 pear install pecl/json

If you have less than 8MB of memory limit for PHP, PEAR failed to install... Use PECL :

 pecl install json
  • Active JSON extension :
 vim /etc/php.d/json.ini
 # Json Extension
 extension=json.so
  • Save file and restart the Apache webserver :
 /etc/init.d/httpd restart

SuSe

  • during web install library location says 'full path' but means relative to document root on suse linux
for me this is /srv/www/htdocs/xlib   in the box for full path, i put "xlib"

Install Xibo

  • Extract the tarball you downloaded inside your webserver's document root (eg /var/www/xibo) and ensure the webserver has permissions to read and write those files:
 cd /var/www
 sudo tar zxvf ~/xibo-1.0.5-server.tar.gz
 sudo mv xibo-1.0.5-server xibo
 sudo chown www-data.www-data -R xibo
  • Make a directory for the server library. Make sure the webserver has permission to write to this location:
 sudo mkdir /xibo-library
 sudo chown www-data.www-data -R /xibo-library

Install on Windows

This Windows install guide is focused mainly on someone who wants to use a Windows PC to be the server as well as the client, or perhaps has a spare Windows XP machine to use as a server. The instructions should work equally well on Windows Server operating systems.

Xibo should also run under IIS, however it's not a platform the Xibo development team currently tests with. If you know your way around IIS, then the latter half of this guide plus the "What you need to know!" section should get you going.

Install the Webserver (XAMPP)

We'll be using XAMPP to install Apache, MySQL, PHP (amongst other things) to support Xibo. This is convenient as it provides the whole system in a single installer, and can be uninstalled via Add/Remove Programs at a later date if required. If you already have XAMPP installed, you can skip to the next section.

You can download XAMPP from Apache Friends. You need to download the full XAMPP Installer package for Windows systems. Save it to the Desktop.

Note: New versions of XAMPP come with PHP 5.3.1 or later. We have some reports of the webservice in Xibo that uses the nuSOAP library not working properly with PHP > 5.2. You can download XAMPP 1.7.1 here which comes with PHP 5.2.9 and should work for everyone.

Once XAMPP Installer has downloaded, double click on it to run it. You may be prompted to allow the installer to run as the publisher could not be verified. Click "Run".

You should get to the start of the install wizard.

XAMPP Installer Running

By default, XAMPP installs to "c:\xampp". Unless you need to move it somewhere else, then that's a good choice. If you do select a different directory, remember it for the next step when we install Xibo. Click Install. The installer will now run, and extract a number of files. When it finishes, it will bring you to a command prompt.

You'll now be asked a few questions about how XAMPP should install itself. At the following prompts, you may select all default options.

XAMPP Command Prompt 1
XAMPP Command Prompt 2
XAMPP Command Prompt 3
XAMPP Command Prompt 4

Once the installation scripts complete, you should choose option 1 to load the XAMPP Control Panel. It should open up, and if everything went to plan, look like the screenshot.

XAMPP Control Panel

At this point, you need to check the boxes next to "Svc" for both Apache and MySql. As you click each, it will prompt you to install the service for that item. Click OK. Then click the "Start" button on each of these items as well. Your screen should now look like the below:

XAMPP Control Panel Started


Before we install Xibo, we need to configure a few things on XAMPP to make it a bit more secure. From the XAMPP Control Panel, click the "Admin" button next to MySQL. This will load a web browser and take you to an application called PHPMyAdmin that was installed along with XAMPP. It will let us setup a password for the "root" MySQL account. The "root" account on MySQL has privileges to add new users, create databases etc so needs to have a strong password.

From the PHPMyAdmin screen, click "Privileges" at the top of the screen. You'll see the database users that exist already listed. We're interested in the one called "root" that has "localhost" in the "Host" column. Click the blue "Edit Privileges" symbol to the right of the word "Yes".

PHPMyAdmin Privileges

Scroll down the page until you find the "Change Password" box. Enter a new password in both the password boxes and click "Go". On a piece of paper, write down "MySQL Admin User details. Username: root Password:" followed by the password you just chose. We'll need these later!

PHPMyAdmin Change Password

Install Xibo

Now we have XAMPP setup, we can get on with installing Xibo.

Firstly, go to the Xibo website and download the latest server zip file. The zip file is prepared for Windows systems, whereas the .tar.gz files are prepared for Unix-like systems. Save the zip file to your Desktop.

Once the download completes, browse to C:\xampp\htdocs. (Unless you changed the target directory for Xampp in the last section, in which case you'll go to the directory you selected then.) Go "File -> New Folder". Name the new Folder Xibo and press Enter. Now double click on the folder to open it. This is where we're going to install the Xibo server.

Xibo Install Folder

Arrange the desktop so you can see both the new Xibo folder we created and the zip file we downloaded earlier. (see screenshot). Double click on the zip file and then double click on the xibo-server-1.0.2 folder inside it. Now we need to extract all these files in to the folder we created earlier.

Go "Edit -> Select All" then "Edit -> Copy" now go to the Xibo folder window we left open and go "Edit -> Paste". You should see the files extract in to the Xibo folder.

Extracting the Xibo Installation Files

Once the files finish extracting, you can close the zip archive window. That should leave you with a folder that looks like this. Close the window.

Files Extracted

Next we need to make a folder for Xibo to store the media (images, videos etc) that you'll upload to be shown on the displays. Crucially this must NOT be inside the Apache Document Root folder. Go to "My Computer", then "Local Disc C:". You may need to click "Show contents of this folder" to see the files inside it. Go "New -> Folder" and name the folder "XiboLibrary". Write on your piece of paper "Library Directory: c:\XiboLibrary". We'll need that information later!

Now open your web browser (Mozilla Firefox, Internet Explorer etc). In the address bar, enter "http://localhost/xibo". You should see the Xibo Installer start screen. Click "Next".

Xibo Installer Start

First the installer checks everything we need is installed. XAMPP provides everything for us, so you should see a long list of green traffic lights indicating everything is OK. Click Next.

Next, the installer asks us about creating a database for Xibo to use. Since we've not created a database, click on "Create New".

The installer will now ask us for information to allow it to create the database for us. The "Host" box is prefilled with "localhost". We don't need to change that. The next two boxes are Admin Username and Password. We wrote these down when we configured MySQL earlier. Fill in "root" in the Admin Username box and the password you chose in the "Admin Password" box. The final three boxes specify the name of the database to create - "xibo" is fine - the name of a new database user to create, again "xibo" is fine - and a password for that user. You can enter anything here, but make a note of the password you chose. When all the boxes are filled in, click "Create".

Xibo Installer Database Options

The installer will now create a new database and user for you, and load in the default database for Xibo. You should see a series of dots appear on the screen as this happens. It can take a few moments to complete. Assuming everything went well, click "Next".

Now we need to choose a password for the xibo_admin user. This is the first user in the xibo system, and is the person who typically administers Xibo (does updgrades etc). Choose a password for the user and enter it in both boxes. Make a note "Xibo Admin: Username: xibo_admin Password:" and then the password that you chose. You'll need this to log on, and to perform upgrades at a later date. Once both boxes are completed, click "Next".

Assuming the password you chose was acceptable, you'll be told the password change succeeded. Click Next.

The next screen deals with configuring Xibo. The first box asks for the location that Xibo should store the media you upload. We created a folder for this earlier and wrote it down. Enter the directory you wrote down next to "Library Directory", eg "c:\XiboLibrary".

The next box asks for a server key. You can think of this as a password for adding client PCs to the system. Choose something obscure. You won't have to enter this very often. Make a note on your piece of paper. You'll need to refer to this when installing the client.

The final tick box asks if it's OK to send anonymous statistics back to the Xibo project. There's information on exactly what we collect is available here. If you're happy for that to happen, tick the box. Otherwise, untick it. Click "Next".

If everything went well, you'll be told so. Click Next.

And we're done. You should be presented with a link to log in to your new Xibo system. Click the link and log in with your xibo_admin username and password.

What you need to know!

  • The server LIBRARY_LOCATION must not be inside the webservers document root. It should be a folder completely separate. The webservice will allow access to those files to authenticated clients as required.