Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
Glenn Carremans edited this page Jun 18, 2017 · 8 revisions

Welcome to the PMSF wiki!

Getting Started

Install php

CentOS

MySQL/MariaDB

yum -y install php php-mysql php-fpm

PostgreSQL

yum -y install php php-pgsql php-fpm

Ubuntu

MySQL/MariaDB

apt-get -y install php php-mysql php-fpm

PostgreSQL

apt-get -y install php php-pgsql php-fpm

Get project code

Install via ZIP

Download the Source Zip and Extract the Files to your Web Host

Install via Git

Navigate to your Web Host and git clone https://github.com/Glennmen/PMSF.git

Setup config.php

Go to the config file wiki page for more info: Config file

Php.ini

Change default timezone to your local time zone in this format:

date.timezone=Europe/Brussels

Restart your webserver.

Nginx

Add the rewrite rules from nginx.example.conf to your server block

rewrite ^/raw_data$ /raw_data.php?$1 last;
rewrite ^/gym_data$ /gym_data.php?$1 last;
rewrite ^/(.*)map.common.js$ /static/js/map.common.php last;

Example Config

  1. Replace DOMAINNAME with your domain (ex. github.com)
  2. Replace /PATH/TO/PMSF to the location where your PMSF is installed (ex. /var/www/pmsf) 2 times
  3. Restart Nginx
server {
    listen       80;
    server_name  DOMAINNAME;

    rewrite ^/raw_data$ /raw_data.php?$1 last;
    rewrite ^/gym_data$ /gym_data.php?$1 last;
    rewrite ^/(.*)map.common.js$ /static/js/map.common.php last;
  
    #charset koi8-r;

    error_log  /var/log/nginx/error.log warn;

    #access_log  logs/host.access.log  main;

    location / {
    include /etc/nginx/mime.types;
        root   /PATH/TO/PMSF;
        index  index.php index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    # redirect server error pages to the static page /50x.html
    #


    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           /PATH/TO/PMSF;
        try_files $uri =404;
        fastcgi_pass   unix:/var/run/php-main.socket;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny  all;
    }
}

More info

CentOS

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7

Ubuntu

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

Clone this wiki locally