Installing Phabricator on Ubuntu 20.04
To install the required dependency packages
sudo apt-get -qq update sudo apt-get install \ git mysql-server apache2 libapache2-mod-php \ php php-mysql php-gd php-curl php-apcu php-cli php-json php-mbstring \ || failed
To enable mod_rewrite in Apache
sudo a2enmod rewrite
To enable mod_php
sudo apt install libapache2-mod-php7.4
sudo a2enmod php7.4
To make changes in the default PHP config, need to open the php.ini file and set the following configs.
sudo vim /etc/php/7.4/apache2/php.inifile_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = asia/singapore
After saving the above configs, need to restart the Apache2 server to apply the configs.
sudo systemctl restart apache2.service
To test PHP 7.4 settings with Apache2, create a phpinfo.php file in Apache2 root directory.
sudo vim /var/www/html/phpinfo.php
Save the below content in the above created phpinfo.php file.
<?php phpinfo( ); ?>
To test Apache2, browse the below url.
http://localhost/phpinfo.php
Now, you can grab Phabricator and its dependencies from git.
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git
Then, configure Phabricator mysql settings.
cd phabricator./bin/config set mysql.host localhost
./bin/config set mysql.user root
./bin/config set mysql.pass <password>./bin/storage upgrade --user root--password <password>
Now, we need to configure Apache2
To add configuration file with VirtualHost entry for Phabricator, create phabricator.conf file in the below location and add the below content in it.
sudo vim /etc/apache2/sites-available/phabricator.conf<VirtualHost *>
# Change this to the domain which points to your host.
ServerName localhost.com
# Change this to the path where you put 'phabricator' when you checked it
# out from GitHub when following the Installation Guide.
#
# Make sure you include "/webroot" at the end!
DocumentRoot /path/to/phabricator/webroot
RewriteEngine on
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost><Directory "/path/to/phabricator/webroot">
Require all granted
</Directory>
After configuring the VirtualHost as above, to enable it and restart Apache2.
sudo a2ensite phabricator.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service
To access Phabricator browse the below url.
http://127.0.0.1