Last edit by philipp October 15, 2017 09:52

How to install Phabricator on Debian 8 with NGINX

This guide describes, how to install Phabricator on Debian 8. Phabricator does not work with PHP7 at the moment.

Install Packages

root@phab:~# apt install nano git nginx php5-cli php5-common php5-fpm php5-mysql php5-gd php5-dev php5-curl php5-cli php5-json php5-ldap

Get Phabricator

root@phab:~# cd /opt/
root@phab:/opt# git clone https://github.com/phacility/libphutil.git
root@phab:/opt# git clone https://github.com/phacility/arcanist.git
root@phab:/opt# git clone https://github.com/phacility/phabricator.git
root@phab:/opt# chown -R www-data:www-data /opt/*

Install MariaDB

root@phab:/opt# apt install mariadb-server
root@phab:/opt# service mysql start
root@phab:/opt# mysql -u root -p
CREATE DATABASE phabricator;
CREATE USER phabricator@localhost IDENTIFIED BY '**********';
GRANT ALL PRIVILEGES ON phabricator.* TO phabricator@localhost;
FLUSH PRIVILEGES;
SET PASSWORD FOR root@localhost=PASSWORD('');

Setup Phabricator

root@phab:/opt/phabricator# /opt/phabricator/bin/storage upgrade

Config NGINX

root@phab:/opt/phabricator# nano /etc/nginx/sites-enabled/default
server {
  server_name phab.dosing.local;
  root        /opt/phabricator/webroot;

  location / {
    index index.php;
    rewrite ^/(.*)$ /index.php?__path__=/$1 last;
  }

location ~ ^/index\.php(/|$) {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/run/php/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param DOCUMENT_ROOT $realpath_root;
    include fastcgi_params;

    fastcgi_param  QUERY_STRING       $query_string;
    fastcgi_param  REQUEST_METHOD     $request_method;
    fastcgi_param  CONTENT_TYPE       $content_type;
    fastcgi_param  CONTENT_LENGTH     $content_length;

    fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

    fastcgi_param  REMOTE_ADDR        $remote_addr;

  }
}

The content on this page is licensed under Creative Commons Attribution 4.0 International license.