設定服務

Apache

加入設定檔

<VirtualHost *>
# Change this to the domain which points to your host.
ServerName phabricator.mycompany.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 /usr/local/lib/php/phabricator/webroot
<Directory "/usr/local/lib/php/phabricator/webroot">
Require all granted
</Directory>
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>

範例升級 Shell Script

#!/bin/sh
set -e
set -x
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended
# to work without modifications.
# NOTE: This script assumes you are running it from a directory which contains
# arcanist/, libphutil/, and phabricator/.
ROOT='/usr/local/lib/php' # 請修改此行為 Phabricator 所在路徑, 此處以 FreeBSD 的路徑為例
### UPDATE WORKING COPIES ######################################################
cd $ROOT/libphutil
git pull
cd $ROOT/arcanist
git pull
cd $ROOT/phabricator
git pull
### CYCLE WEB SERVER AND DAEMONS ###############################################
# Stop daemons.
service phd stop
# If running the notification server, stop it.
# $ROOT/phabricator/bin/aphlict stop
# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
# depending on which system and webserver you are running: replace it with an
# appropriate command for your system.
# NOTE: If you're running php-fpm, you should stop it here too.
service apache24 stop
# Upgrade the database schema. You may want to add the "--force" flag to allow
# this script to run noninteractively.
$ROOT/phabricator/bin/storage upgrade --force
# Restart the webserver. As above, this depends on your system and webserver.
# NOTE: If you're running php-fpm, restart it here too.
service apache24 start
# Restart daemons.
service phd start
# If running the notification server, start it.
# $ROOT/phabricator/bin/aphlict start