In this tutorial, we will show you how to install Phabricator on CentOS 6. For those of you who didn’t know, Phabricator is an open-source collection of web applications that help software companies build better software. Phabricator is similar to GIT, and SVN. Currently maintained by Phacility, it was originally developed as an internal tool at Facebook. It is available as free software under the Apache License, version 2.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you the step-by-step installation of the Phabricator on CentOS 6.
- A server running one of the following operating systems: CentOS 6.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Phabricator on CentOS 6
Step 1. First of all, make sure that all packages are up to date.
Step 2. Install the LAMP server and include some PHP extensions.
yum install mysql-server httpd git php php-mysql php-gd php-curl php-apc php-cli php-mbstring
Step 3. Configure Apache web server for Phabricator.
Create a virtual host directive in Apache. So open the Apache configuration file with your favorite text editor.
<VirtualHost *:80> ServerAdmin root@your_domain ServerName your_domain DocumentRoot /var/www/html/myapps/phabricator/webroot RewriteEngine on RewriteRule ^/rsrc/(.*) - [L,QSA] RewriteRule ^/favicon.ico - [L,QSA] RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] <Directory "/var/www/html/myapps/phabricator/webroot"> Order allow,deny Allow from all </Directory> </VirtualHost>
Restart Apache for the changes to take effect:
service httpd restart
Step 4. Install Phabricator.
Create a directory called ‘
myapps‘ under DocumentRoot of Apache directory.
mkdir /var/www/html/myapps cd /var/www/html/myapps
Clone the needed Git repositories from Phacility:
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 5. Configuring MySQL.
By default, MySQL is not hardened. You can secure MySQL using the
mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.
Enter the phabricator directory:
Now, it’s time to configure MySQL. Execute the following commands:
./bin/config set mysql.host localhost ./bin/config set mysql.user root ./bin/config set mysql.pass your_mysql_root_password
Then, run a storage upgrade script to load the Phabricator schemata into it. You’ll be asked to press ‘y’ while loading the database schema:
./bin/storage upgrade --user root --password your_mariadb_root_password
Restart MySQL service to take effect the changes.
service mysqld restart
Step 6. Accessing Phabricator.
Phabricator will be available on HTTP port 80 by default. Open your favorite browser and navigate to
http://your-server-ip. Continue the installation. Set up your admin account in the following window and click Create Admin Account. After you are logged in you should check if have some unresolved setup issues to take care of. Click the link in the yellow banner at the top of the screen to see them, or find them in the Config application under Setup Issues.
Congratulations! You have successfully installed Phabricator. Thanks for using this tutorial for installing Phabricator on CentOS 6 system. For additional help or useful information, we recommend you check the official Phabricator website.