Installation instructions for v3.x

The following instructions are valid only for official RUNALYZE releases starting from version 3.0. If you want to use our current development version, have a look at our checkout instructions.

In general, RUNALYZE requires at least PHP 5.6.0+ and MySQL 5.0.0+. We encourage you to use the latest MySQL versions for future releases (5.7).

General

Since version 3.0 the web directory is the public web directory. We strongly recommend you to use a specific (sub)domain for your RUNALYZE installation. Otherwise, it’s your responsibility to secure your configuration files and we cannot guarantee that all parts of RUNALYZE will work as expected.

To install an official release, download the respective *.zip or *.tar.gz file and unpack the archive. Check that the files are owned by the webserver user.

Copy app/config/default_config.yml to data/config.yml and adjust at least the following settings:

database_host: 127.0.0.1     # database hostname or ip  (e.g. localhost, 127.0.0.1 ...)
database_prefix: runalyze_   # table prefix of the new RUNALYZE installation
database_port: 3306          # port of the database server (normally 3306)
database_name: runalyze      # database name
database_user: root          # database username
database_password: "xxx"     # database password

Afterwards open /install in your browser and follow the instructions. This will work only if the database settings are correct.

Installation on a webspace

If you are using a webhosting space (like e.g. Netcup*) it should be really easy to install RUNALYZE.

Note

We recommend a webspace with ssh access (for longer lasting tasks), perl (for fit file import) and cronjobs (needed for later versions). Do not forget that you need at least PHP 5.5.9+

  1. Download the latest version from Github and extract it to a folder of your choice.
  2. Pay attention to the directories. the web directory is the public web directory. Everything above should be better not visible to the public. Best practice is to setup a subdomain and point it to the web directory
  3. Copy and adjust the configuration (have a look at the General section on this page)

Ubuntu/Debian distributions

Packages:

  • php-gettext
  • php-zip
  • php-curl
  • php-xml
  • libxml2
  • gettext
  • php
  • php-intl
  • perl

(Use the corresponding version php packages names)

You may need to install the corresponding locales to get the translations running: Have a look in less /usr/share/i18n/SUPPORTED whether the locale is already installed. If not you have to install the locales on the system (the following example is for the german language):

Timezone recognization

The following is only needed for the timezone recognization. It has no effects if not installed:

Required packages:

  • php-sqlite3
  • sqlite3
  • libsqlite3-mod-spatialite (at least on ubuntu 16.04)

You also need to download http://cdn.runalyze.com/update/timezone.sqlite and place that file into your data directory. In addition, you have to edit your php.ini and make sure that sqlite3.extension_dir is set correctly. (wherever mod_spatialite is located)

Elevation correction via satellite files

Have a look at our help page for a short introduction to the satellite files.

If you want to use this elevation correction you have to download the srtm files from dwtkns. You only have to download that parts of the world you need.

Extract the zip files and put the tif file into the directory data/srtm. That`s all!

Last but not least

You may need to install the corresponding locales to get the translations running: Have a look in less /usr/share/i18n/SUPPORTED whether the locale is already installed. If not you have to install the locales on the system(the following example is for the german language):

sudo locale-gen de_DE.UTF-8

And now just follow the General installation guide at the top of the page.

Windows

Warning

We encourage you to use a unix system. We cannot guarantee that RUNALYZE will always be compatible with a Windows system. You will get the best experience with a unix system.

Warning

The ttbin-Importer will only work with a unix system.

In order to use the fit-Importer you need to install perl and have to set the corresponding path in the configuration.

The installation of a webserver (apache) and database server (MariaDB) is really easy. Just use the XAMPP package. There are enough tutorials on the web, which direct you through the installation of XAMPP.

Note

You are welcome to complete this part of the documentation - Make a pull request at Github or send us a text or link to a tutorial.

Mac OSX

The installation of a webserver (apache) and database server (MariaDB) is really easy. Just use the XAMPP package. There are enough tutorials on the web, which direct you through the installation of XAMPP.

Note

You are welcome to complete this part of the documentation - Make a pull request at Github or send us a text or link to a tutorial.

Running RUNALYZE on Apache

Warning

Required Apache modules - You need to enable mod_rewrite for Apache. On Debian-based systems you can do this by a2enmod rewrite

Please take a look at the symfony documentation for alternatives of the apache configuration if you having problems with this one.

Create a new virtual host: Version: Apache >= 2.4:

<VirtualHost *:80>
    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/project/web
    <Directory /var/www/project/web>
        AllowOverride None
        Require all granted

        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ app.php [QSA,L]
        </IfModule>
    </Directory>

    ErrorLog /var/log/apache2/project_error.log
    CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>

Running RUNALYZE on NGINX

Adjust the PHP-FPM config to your needs:

server {
    server_name domain.tld www.domain.tld;
    root /var/www/project/web;

    location / {
        # try to serve file directly, fallback to app.php
        try_files $uri /app.php$is_args$args;
    }

    location ~ ^/app\.php(/|$) {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;

        internal;
    }

    error_log /var/log/nginx/project_error.log;
    access_log /var/log/nginx/project_access.log;
}