Contents
Setting up Phabricator
ZFS Layout for jail
zfs create -o compress=lz4 -o atime=off zroot/j/jails/reviews zfs create -o recordsize=16k -o mountpoint=/j/jails/reviews/var/db/mysql zroot/j/jails/reviews/db zfs create -o mountpoint=/j/jails/reviews/var/log/mysql zroot/j/jails/reviews/dblogs zfs create -o mountpoint=/j/jails/reviews/var/phabricator zroot/j/jails/reviews/files
Packages
arcanist-php80 git nginx postfix mysql57-server php80-ctype php80-fileinfo php80-filter php80-gd php80-mysqli php80-opcache php80-openssl php80-pcntl php80-pecl-APCu php80-pecl-mailparse php80-posix php80-zip py39-pygments rsync sudo
Commands
mkdir -p /usr/local/www/phabricator cd /usr/local/www/phabricator git clone https://github.com/facebook/arcanist.git arcanist git clone https://github.com/freebsd/phabricator.git phabricator cd /usr/local/www/phabricator/phabricator/support/aphlict/server npm install ws touch /var/log/aphlict.log chown daemon-user /var/log/aphlict.log
MySQL Config
/usr/local/etc/my.cnf
# phab requested ft_min_word_len=3 ft_stopword_file=/usr/local/www/phabricator/phabricator/resources/sql/stopwords.txt ft_boolean_syntax=' |-><()~*:""&^' sql_mode=STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION #AllanJude innodb_file_per_table = 1 log_bin = /var/log/mysql/reviews-bin max_binlog_size = 256M expire_logs_days = 14 relay_log = /var/log/mysql/relay-bin #ZFS tuning skip-innodb_doublewrite innodb_flush_log_at_trx_commit=2
Phabricator Config
/usr/local/www/phabricator/phabricator/conf/local/local.json
{ "metamta.reply-handler-domain": "reviews.freebsd.org", "policy.allow-public": true, "log.ssh.path": "/var/log/phabricator/ssh.log", "phd.user": "daemon-user", "storage.local-disk.path": "/var/phabricator/large-files", "phabricator.base-uri": "https://reviews.freebsd.org/", "metamta.default-address": "phabric-noreply@FreeBSD.org", "metamta.domain": "FreeBSD.org", "recaptcha.private-key": ..., "mysql.pass": ..., "mysql.user": ..., "mysql.host": ... }
Checklist
- daemons are running:
daemon-user 5427 0.0 0.2 81484 64992 - SsJ 09:30 0:31.60 php ./phd-daemon daemon-user 5431 0.0 0.2 74616 58116 - SsJ 09:30 0:06.76 php ./exec_daemon.php PhabricatorRepositoryPullLocalDaemon daemon-user 5433 0.0 0.2 68420 52152 - SsJ 09:30 0:00.27 php ./exec_daemon.php PhabricatorFactDaemon
https://reviews.freebsd.org , https://reviews-dev.freebsd.org : all resources load correctly.
https://reviews.freebsd.org/login/email/ , https://reviews-dev.freebsd.org/login/email : captcha displays correctly.
- test the mail setup: (this is only testing for phabricator can talk to system mail service)
cd /usr/local/www/phabricator/phabricator ./bin/mail list-outbound ./bin/mail send-test --to pi@freebsd.org ./bin/mail show-outbound --id 1338582
- test notification mail: (test if notification mail does work)
- no good method at the moment, maybe just change something in the system.
- Check if tab display is 8 instead of 2