Installation procedure (Demyo 1.x)

Demyo 1.x is obsolete. The below instructions are preserved for those who wish to recover date from older exports of their libraries.

Requirements

Demyo has been to tested to run on Windows and Linux. It probably runs on Mac OS X, too, but this has not been tested.

Demyo’s interface is Web-based, which means it runs in a Web browser. Currently, the following browsers are supported:

  • Internet Explorer 7 or later (no rounded borders, everything else is working as it should)
  • Gecko-based: Mozilla Firefox 3.0 or later, Seamonkey, Iceweasel, Epiphany…
  • Webkit-based: Google Chrome, Safari, Konqueror, Epiphany…
  • Opera 9.5 or later (no rounded borders, everything else is working as it should)

There will be no official support for Internet Explorer 6 or lower. That browser was first released in 2001, it’s time to move on.

Demyo also requires a Web server with PHP 5.2 or older and MySQL 4 or older. If you already have one, proceed to “Install the software”. If you don’t have one or don’t know (in which case you most likely don’t have one), read the following.

On Windows

The setup takes care of everything. Do not deselect the XAMPP component when installing.

XAMPP is automatically downloaded from Internet. If you want to install Demyo on a computer that doesn’t have an Internet access, you can download XAMPP Lite (EXE version) and put it in the same directory as Demyo’s setup, in a file named xampp-lite.exe. It will be used during the installation process.

On Linux, with your distribution’s packages

Extract the Demyo archive (.zip or .tar.gz) in a temporary directory of your choice. In the following, we will assume that the file was extracted to /tmp/demyo-VERSION.

On supported distributions

An install script is available for the following distributions :

  • Debian
  • Fedora Core
  • Mandriva
  • openSUSE
  • Ubuntu

To use the helper script, run sh install-linux.sh as root or sudo sh install-linux.sh.

If you use a derivative of the supported distributions (like Knoppix or Xubuntu), you can also try to run the script. The installer will probably complain about not being able to detect your OS, and will ask you to select it manually.

All distributions (manual installation)

You need to install the following packages. The way of doing so depends on your distribution.

  • Apache 2 (on Debian: apache2)
  • A MySQL server (on Debian: mysql-server)
  • PHP5 for Apache 2 (on Debian: libapache2-mod-php5)
  • MySQL for PHP5 (on Debian: php5-mysql)
  • GD for PHP5 (on Debian: php5-gd)
  • APC for PHP (on Debian: php-apc)

You should also follow the following steps. The way of doing so depends on your distribution.

  • To secure your installation by only accepting requests from your computer, edit the apache configuration file (on Debian: /etc/apache2/ports.conf) and replace Listen 80 by Listen 127.0.0.1:80 .
  • Enable the Apache 2 module mod_rewrite, which is needed by Demyo.
  • You should also enable mod_deflate and mod_expires. These modules are optional, but will increase Demyo’s performance.
  • Create a site configuration (on Debian: /etc/apache2/sites-enabled/demyo) with the following contents:
    <Directory /var/www/demyo>
    	AllowOverride FileInfo Indexes
    	Options +FollowSymLinks
    </Directory>
  • Restart the Apache server

On Linux, with LAMPP

Extract the Demyo archive (.zip or .tar.gz) in a temporary directory of your choice. In the following, we will assume that the file was extracted to /tmp/demyo-VERSION.

If your distribution doesn’t have packages for Apache or if they are somehow broken (consider reporting a bug to your distribution), you can also set up an all-in-one server.

Note: installing your distribution’s packages should be the preferred way and I offer limited or no support for this procedure.

XAMPP

Download XAMPP for Linux from the XAMPP website.

Extract the downloaded file to /opt : in a terminal, change to the directory where the file was downloaded and run tar zxf xampp-linux-VERSION.tar.gz -C /opt . You will need root privileges to do that (either use su or sudo).

Note: It is only possible to run XAMPP for Linux from /opt , though you could install it anywhere and make a symbolic link from /opt to your directory of choice. This restricts the usage from a USB key to a computer where you can have root access (or where someone can set you a symbolic link once).

Security

Copy the recommended configuration files: in a terminal, run cp -rf /tmp/demyo-VERSION/xampp-linux/* /opt/lampp/.

Finishing and using

The server installation is now complete. Each time you want to start Demyo, start the server by running /opt/lampp/demyo start. To stop it, run /opt/lampp/demyo stop.

Installing

Now that you have a functionnal Web server (make sure it’s running), you can install the actual Demyo software.

Make sure you have extracted the Demyo archive you downloaded. Most of the files mentionned in the following instructions can be found in that archive.

On Windows

The setup takes care of everything.

To start Demyo on later occasions, you’ll need to start the XAMMP servers first (Apache and MySQL), using the tool that you already used at install time. A shortcut to access it is installed in the Start Menu.

On Linux

If you used the install script mentionned in “Requirements”, you do not need to read this section.

Note: the steps below use the mysql command. If you installed XAMPP on Linux, you need to call /opt/lampp/bin/mysql instead.

Creating a user

A database user will now be added. This user is a bit like an account for a forum: it helps defining what you can and cannot do.

In a terminal, run mysql -u root -p < /tmp/demyo-VERSION/create-user.sql. You will have to type the password for the root database user (which you were told to remember in the above procedure).

You can edit the file beforehand and change the password if you want, but you will have to change the configuration.

Creating the database

In a terminal, run mysql -u root -p < /tmp/demyo-VERSION/create-database.sql. You will have to type the password for the root database user (which you were told to remember in the above procedure).

Copying the files

You can now copy the demyo directory (the one from inside the extracted archive) into your server’s hosting directory. A common setting is /var/www (/opt/lampp/htdocs if you installed XAMPP for Linux).

In a terminal, run cp -r /tmp/demyo-VERSION/demyo /var/www/demyo.

Fix the privileges for Demyo: run

chown -R $DEMYO_USER:$APACHE_GROUP /var/www/demyo
chmod -R u=rwX,g=rX,o= /var/www/demyo
chmod -R g+w /var/www/demyo/app/tmp /var/www/demyo/app/webroot/img/thumbs
chmod g+w /var/www/demyo/app/config /var/www/demyo/app/config/demyo.php
chown -R $APACHE_USER /var/www/demyo/app/webroot/img/collection_images /var/www/demyo/app/webroot/ccss /var/www/demyo/app/webroot/cjs
chmod -R go=rwX /var/www/demyo/app/webroot/img/collection_images /var/www/demyo/app/webroot/ccss /var/www/demyo/app/webroot/cjs

where:

  • $DEMYO_USER if the name of the user that will use Demyo
  • $APACHE_USER is the user the Apache server runs as (www-data on Debian)
  • $APACHE_GROUP is the group the Apache server runs as (www-data on Debian)

Done !

That’s it, Demyo is installed. You can now use any browser to visit http://localhost/demyo/ if you followed the steps above (the exact URL can change if you didn’t follow the steps). You will be prompted for some data (once again, the default values can be kept if you followed this guide in every way) before being given access to the software.