Installing Phabricator on Debian Latest

Phabricator is a powerful and open source software development platform that offers a range of tools for code collaboration, review, and management. In this tutorial, we will guide you through the process of installing Phabricator on Debian Latest.

Prerequisites

Before beginning the installation, you will need the following:

Step 1: Update System

To ensure that your system is up to date, run the following command:

sudo apt update && sudo apt upgrade

Step 2: Install Dependencies

Phabricator requires several dependencies to be installed first. Run the following commands to install the required dependencies:

sudo apt install -y curl git php php-curl php-cli php-json php-mbstring php-phar php-xml php-zip php-mysql php-gd php-memcached php-redis php-apcu

Step 3: Install MySQL

Phabricator requires a MySQL database to store its data. Run the following command to install MySQL:

sudo apt install -y mysql-server

During the installation process, you will be prompted to set a root password for MySQL. Choose a strong password and remember it.

Step 4: Configure MySQL

To configure MySQL, run the following command:

sudo mysql_secure_installation

You will be prompted to select a level of password validation, then to enter and confirm a root password.

Step 5: Create a MySQL Database

After installing and configuring MySQL, create a new database for Phabricator. Run the following command:

sudo mysql -u root -p

Enter the root password when prompted. Once you are inside the MySQL shell, run the following commands:

CREATE DATABASE phabricator;
GRANT ALL ON phabricator.* TO 'phabricator'@'localhost' IDENTIFIED BY 'your_password_here';
FLUSH PRIVILEGES;
EXIT;

Replace your_password_here in the command above with a strong and secure password.

Step 6: Install Phabricator

You can download the latest version of Phabricator from the official website http://phabricator.org/.

Run the following commands to download and extract Phabricator:

cd /var/www/
sudo mkdir phabricator
cd phabricator
sudo git clone https://github.com/phacility/phabricator.git .
sudo git checkout stable
sudo chmod -R 755 /var/www/phabricator

Step 7: Configure Phabricator

Copy the sample configuration file into a new file named local.php:

cd /var/www/phabricator
sudo cp conf/local/local.json.sample conf/local/local.json

Open the local.json file and update the following settings:

{
    "mysql.pass": "your_password_here",
    "phabricator.base-uri": "http://your-server-name.com:your-port-name/",
    "metamta.default-address": "noreply@your-server-name.com",
    "config": {
        "phabricator.show-prototypes": true
    }
}

Replace your_password_here with the password used for your MySQL root user, and replace your-server-name.com and your-port-name with your domain name and port.

Step 8: Configure Apache

Phabricator must be installed on a web server to be accessible through a web browser. For this tutorial, we will install and configure Apache.

Install Apache:

sudo apt install -y apache2

Create a new Apache virtual host for Phabricator:

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

Add the following configuration:

<VirtualHost *:80>
    ServerName your-server-name.com
    DocumentRoot /var/www/phabricator/webroot/

    RewriteEngine on
    RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
    RewriteRule ^/favicon.ico  -                       [L,QSA]
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

    <Directory "/var/www/phabricator/webroot">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

Replace your-server-name.com with your domain name.

Enable the virtual host configuration:

sudo a2ensite phabricator.conf

Reload Apache:

sudo systemctl reload apache2

Step 9: Install Additional Packages

Install additional required packages:

sudo apt-get install -y --no-install-recommends libssl-dev libzip-dev libc6-dev libicu-dev

Step 10: Install Arcanist

Arcanist is the command-line tool that integrates with Phabricator. To install Arcanist, run the following commands:

cd /opt
sudo git clone https://github.com/phacility/arcanist.git
sudo chown -R $USER:$USER /opt/arcanist
echo 'export PATH="/opt/arcanist/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Step 11: Start Phabricator

Start Phabricator by running the following command:

sudo /var/www/phabricator/bin/phd start

Step 12: Access Phabricator

Phabricator is now accessible through a web browser at the URL you specified in the configuration file. Navigate to http://your-server-name.com:your-port-name/ in your browser to access Phabricator.

You should be prompted to create a new account. Once you have created your account, you can begin using Phabricator.

Congratulations! You have successfully installed Phabricator on Debian Latest.

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!