Main menu

Install Phabricator on a Linux Debian system

After experiencing a few problems installing Phabricator on my Raspberry Pi I wrote this article.

"Phabricator, an open source, software engineering platform

Phabricator is a collection of open source web applications that help software companies build better software."

Requirements

Phabricator can run in a normal computer, with following required packages. We don’t need specification with high resources.

  1. Apache2.2.7 or higher
  2. MySQL and PHP 5.2 or higher
  3. Git and some of the php extensions.

You can follow my guide "Installing LAMP on a Raspberry Pi" here.

Login on the Raspberry Pi as root.

 

Step 1: Installing Required Components

We will first install a few additional PHP-extensions:

sudo apt-get install php5-gd php5-dev php5-curl php-apc
 

Step 2: Downloading Phabricator Files

Once, you have all the above stuff installed, now pick install directory. Here I’m going to create a directory called ‘myproject‘ under DocumentRoot of Apache directory.

sudo mkdir /var/www/myproject
cd /var/www/myproject

Now, start pulling the phabricator and its dependencies from there official git repository.

git clone https://github.com/phacility/libphutil.git 
git clone https://github.com/phacility/arcanist.git 
git clone https://github.com/phacility/phabricator.git

Step 3: Configure Apache for Phabricator

On Ubuntu based distributions, you need to enable mod_php, mod_rewrite and mod_ssl modules, during installation most of these modules enabled by default, but we need to confirm.

sudo a2enmod rewrite 
sudo a2enmod ssl

Once, these modules enabled, next restart the web server to reflect changes.

sudo service apache2 restart

Next, create a separate Virtualhost in your Apache configuration file.

sudo nano /etc/apache2/sites-available/phabricator.conf

Append the following Virtualhost entry at the bottom of the file and change the

DocumentRoot path to match exact location of phabricator files and ServerName path to your local ip-address

<VirtualHost *:80>
ServerName 'your local ip-address' DocumentRoot /var/www/myproject/phabricator/webroot RewriteEngine on RewriteRule ^/rsrc/(.*) - [L,QSA] RewriteRule ^/favicon.ico - [L,QSA] RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] <Directory "/var/www/myproject/phabricator/webroot"> Order allow,deny Allow from all </Directory> </VirtualHost>

You need to enable the newly created virtualhost entry using following command

sudo a2ensite phabricator.conf

Finally, restart the Apache service to reflect new changes.

sudo service apache2 restart

 

Step 4: Configure MySQL for Phabricator

Now, it’s time to configure MySQL, but before heading up for setup, make sure your MySQL is running and you able to connect to it. So, that you can load the mysql settings into it. Note that you hace to substitute 'secret' with our choosen password for the MySQL-server

cd /var/www/myproject/phabricator/
./bin/config set mysql.host localhost
./bin/config set mysql.user root
./bin/config set mysql.pass 'secret'

Next, run the storage upgrade script to load database schema into it. While processing, it will prompt you to press ‘y‘ to continue, this will take little time to complete the setup for setting-up data schema.

./bin/storage upgrade --user root --password 'secret'

Once, scheme added to mysql, restart the service to take new settings.

service mysql restart

 

Step 5: Configuring Phabricator Web UI

Now you can access the web UI at the following locations, but we need to create an admin login account.

http://ipaddress

If the above admin setup page is not displayed we need to create admin login manually from the terminal. This step only required, if incase we get the error cause admin account was not defined.

./bin/accountadmin

Once admin account created, you can login into admin section using same credentials. After login you can see some setup issue in the top left corner, that needs to be resolved before start using it.

 

All done!