Phabricator is a suite of web-based software development collaboration tools that include code review, repository hosting, bug tracking, and more. If you want to install Phabricator on your Ubuntu server, then this tutorial will walk you through the process.
Before you start, you need to make sure that you have:
First, you need to make sure your packages are up to date.
sudo apt-get update
Next, install the following dependencies required by Phabricator:
sudo apt-get install -y curl git apache2 libapache2-mod-php php php-cli php-cgi php-mbstring php-mysql php-curl php-json php-gd php-phar php-zip
Phabricator requires a web server to function, and you can use Apache for this purpose. Install Apache using the following command:
sudo apt-get install -y apache2
Next, you need to enable the required Apache modules:
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod ssl
And finally, restart Apache to apply the changes:
sudo systemctl restart apache2
Phabricator requires a MySQL database to store its data. If you don't have MySQL installed, then run the following command to install it:
sudo apt-get install -y mysql-server
Next, you need to secure your MySQL installation:
sudo mysql_secure_installation
Then, create a new database and user for Phabricator:
sudo mysql -u root -p
CREATE DATABASE phabricatordb;
CREATE USER 'phabricatoruser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL ON phabricatordb.* TO 'phabricatoruser'@'localhost';
FLUSH PRIVILEGES;
exit;
The easiest way to install Phabricator is to use the Phabricator installer script. To get the script, run the following command:
cd /var/www/html
sudo git clone https://github.com/phacility/phabricator.git
cd phabricator
sudo git checkout stable
Next, run the installer script using the following command:
sudo ./bin/config set mysql.host localhost
sudo ./bin/config set mysql.user phabricatoruser
sudo ./bin/config set mysql.pass your_password_here
sudo ./bin/storage upgrade --force
Next, you need to configure Apache to serve Phabricator:
sudo nano /etc/apache2/sites-available/phabricator.conf
Add the following configuration to the file:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/phabricator/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>
Save and exit the file.
Enable the new virtual host and disable the default one:
sudo a2dissite 000-default
sudo a2ensite phabricator.conf
sudo systemctl restart apache2
You can now access your Phabricator installation by pointing your web browser to http://yourdomain.com. You will be prompted to set up your Phabricator account and customize your installation.
Congratulations! You have successfully installed Phabricator on your Ubuntu server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!