Create Your Own Software Development Platform using Phabricator on CentOS 7

Prerequisites

Update Your System

yum -y update

Install LAMP Stack

yum -y install httpd mariadb-server mariadb mod_ssl
yum -y install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php71w php71w-cli php71w-mysqli php71w-gd php71w-mbstring php71w-curl php71w-iconv php71w-pcntl php71w-opcache
nano /etc/php.ini
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone =
post_max_size = 8M #Change it to at least 32M 
upload_max_filesize = 2M #Change it to at least 32M
systemctl start httpd && systemctl enable httpd
systemctl start mariadb && systemctl enable mariadb
mysql_secure_installation
Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password:<your-password>
Re-enter new password:<your-password>
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
yum -y install git

Install Phabricator

mkdir /var/www/phabricatorcd /var/www/phabricator
git clone https://github.com/phacility/libphutil.gitgit clone https://github.com/phacility/arcanist.gitgit clone https://github.com/phacility/phabricator.git
cd /var/www/phabricator/phabricator/./bin/config set mysql.host localhost./bin/config set mysql.port 3306./bin/config set mysql.user root./bin/config set mysql.pass <MySQL-root-password>
./bin/storage upgrade --user root --password YourMariaDBPssword
Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).
Are you ready to continue? [y/N] y...
Completed applying all schema adjustments.
ANALYZE Analyzing tables...
Done.
ANALYZED Analyzed 510 table(s).
chown -R apache:apache /var/www/phabricator
yum -y install python-certbot-apache
certbot certonly --standalone -d yourdomain.com
/etc/letsencrypt/live/yourdomain.com
crontab -e
30 1 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log

Create a Virtual Host

nano /etc/httpd/conf.d/yourdomain.com.conf
<VirtualHost *:80>  
ServerName yourdomain.com
Redirect permanent / https://yourdomain.com/
TransferLog /var/log/httpd/yourdomain.com_access.log
ErrorLog /var/log/httpd/yourdomain.com_error.log
</VirtualHost>
<VirtualHost *:443>
ServerName yourdomain.com
DocumentRoot /var/www/phabricator/phabricator/webroot
ServerAdmin me@liptanbiswas.com
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
<Directory /var/www/phabricator/phabricator/webroot>
AllowOverride All
Require all granted
</Directory>

TransferLog /var/log/httpd/yourdomain.com_ssl_access.log
ErrorLog /var/log/httpd/yourdomain.com_ssl_error.log
</VirtualHost>
systemctl restart httpdsystemctl restart mariadb
setenforce 0

Web Interface

cd /var/www/phabricator/phabricator/./bin/phd start
cd /var/www/phabricator/phabricator/./bin/config set phabricator.base-uri 'https://yourdomain.com'
mkdir /var/repochown -R apache:apache /var/repo

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store