Update Server:
apt update && apt upgrade -y
Set Hostname:
hostnamectl set-hostname ex.example.com
Install Apache2:
sudo apt install apache2
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
Install MariaDB:
apt install mariadb-server mariadb-client
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
sudo mysql_secure_installation
Install PHP:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-curl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-xml php7.4-json php7.4-cli
sudo nano /etc/php/7.4/apache2/php.ini
update
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata
sudo systemctl restart apache2.service
Download and Install Phabricator:
sudo mkdir /var/www/html/repository
cd /var/www/html/repository
sudo apt install git
sudo git clone https://github.com/phacility/libphuti...
sudo git clone https://github.com/phacility/arcanist...
sudo git clone https://github.com/phacility/phabrica...
configure phabricator MariaDB :
cd /var/www/html/repository/phabricator
sudo ./bin/config set mysql.host localhost
sudo ./bin/config set mysql.user root
sudo ./bin/config set mysql.pass your_password
sudo ./bin/storage upgrade --user root --password your_password
sudo chown -R www-data:www-data /var/www/html/repository/phabricator/
sudo chmod -R 755 /var/www/html/repository/phabricator/
Configure the Apache2 Phabricator Site:
sudo nano /etc/apache2/sites-available/phabricator.conf
paste
I'm replacing angled bracket with square bracket ###
[VirtualHost *:80]
ServerAdmin [email protected]
DocumentRoot /var/www/html/repository/phabricator/webroot
ServerName ex.example.com
ServerAlias ex.example.com
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
[Directory /var/www/html/repository/phabricator/webroot/]
Require all granted
[/Directory]
[/VirtualHost]
sudo a2ensite phabricator.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service
sudo mysql -u root
use mysql;
update user set plugin='' where User='root';
flush privileges;
exit
sudo systemctl restart mariadb.service
Access UI:
ex.example.com