POSTS
Phabricator 安裝
<VirtualHost *>
# Change this to the domain which points to your host.
ServerName phabricator.example.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 ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>
<Directory "/somewhere/phabricator/webroot">
Order allow,deny
Allow from all
</Directory>
2.nginx
server {
server_name phabricator.example.com;
root /path/to/phabricator/webroot;
try_files $uri $uri/ /index.php;
location / {
index index.php;
if ( !-f $request_filename )
{
rewrite ^/(.*)$ /index.php?__path__=/$1 last;
break;
}
}
location /index.php {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
#required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
#variables to make the $_SERVER populate in PHP
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
}
}
3.lighttpd
$HTTP["host"] =~ "phabricator(\.example\.com)?" {
server.document-root = "/path/to/phabricator/webroot"
url.rewrite-once = (
"^(/rsrc/.*)$" => "$1",
"^(/favicon.ico)$" => "$1",
# This simulates QSA ("query string append") mode in apache
"^(/[^?]*)\?(.*)" => "/index.php?__path__=$1&$2",
"^(/.*)$" => "/index.php?__path__=$1",
)
}
還需要兩個模組mod\_fastcgi,mod\_rewrite.
設定好之後開啟瀏覽器瀏覽[
][2]
依照畫面提示設定mysql.
$ cd /somewhere/phabricator/
$ ./bin/config set mysql.host mysql主機
Set 'mysql.host' in local configuration.
$ ./bin/config set mysql.user mysql帳號
Set 'mysql.user' in local configuration.
$ ./bin/config set mysql.pass mysql密碼
Set 'mysql.pass' in local configuration.
再來會出現[
][3]
依照指示執行,會有提示如有背景需先行關閉.
$ ./bin/storage upgrade
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
Loading quickstart template...
Applying patch 'phabricator:db.conpherence'...
Applying patch 'phabricator:db.token'...
Applying patch 'phabricator:db.releeph'...
Applying patch 'phabricator:db.phlux'...
Applying patch 'phabricator:db.phortune'...
Applying patch 'phabricator:db.phrequent'...
Applying patch 'phabricator:db.diviner'...
Applying patch 'phabricator:20130111.conpherence.sql'...
Applying patch 'phabricator:20130127.altheraldtranscript.sql'...
Applying patch 'phabricator:20130201.revisionunsubscribed.php'...
Migrating Differential unsubscribed users to edges...
Done.
Applying patch 'phabricator:20130201.revisionunsubscribed.sql'...
Applying patch 'phabricator:20130131.conpherencepics.sql'...
Applying patch 'phabricator:20130214.chatlogchannel.sql'...
Applying patch 'phabricator:20130214.chatlogchannelid.sql'...
Applying patch 'phabricator:20130214.token.sql'...
Applying patch 'phabricator:20130215.phabricatorfileaddttl.sql'...
Applying patch 'phabricator:20130217.cachettl.sql'...
Applying patch 'phabricator:20130218.updatechannelid.php'...
Updating channel IDs of previous chatlog events...
Done.
Applying patch 'phabricator:20130218.longdaemon.sql'...
Applying patch 'phabricator:20130219.commitsummary.sql'...
Applying patch 'phabricator:20130219.commitsummarymig.php'...
Backfilling commit summaries...
Done.
Applying patch 'phabricator:20130222.dropchannel.sql'...
Applying patch 'phabricator:20130226.commitkey.sql'...
Applying patch 'phabricator:20131302.maniphestvalue.sql'...
Applying patch 'phabricator:20130304.lintauthor.sql'...
Applying patch 'phabricator:releeph.sql'...
Applying patch 'phabricator:20130319.phabricatorfileexplicitupload.sql'...
Applying patch 'phabricator:20130319.conpherence.sql'...
Applying patch 'phabricator:20130320.phlux.sql'...
Applying patch 'phabricator:20130317.phrictionedge.sql'...
Applying patch 'phabricator:20130321.token.sql'...
Applying patch 'phabricator:20130310.xactionmeta.sql'...
Applying patch 'phabricator:20130322.phortune.sql'...
Applying patch 'phabricator:20130323.phortunepayment.sql'...
Applying patch 'phabricator:20130324.phortuneproduct.sql'...
Applying patch 'phabricator:20130330.phrequent.sql'...
Applying patch 'phabricator:20130403.conpherencecache.sql'...
Applying patch 'phabricator:20130403.conpherencecachemig.php'...
Migrating data from conpherence transactions to conpherence 'cache'...
Done.
Applying patch 'phabricator:20130409.commitdrev.php'...
Migrating differential.revisionPHID to edges...
.
Done.
Applying patch 'phabricator:20130417.externalaccount.sql'...
Applying patch 'phabricator:20130423.updateexternalaccount.sql'...
Applying patch 'phabricator:20130423.phortunepaymentrevised.sql'...
Applying patch 'phabricator:20130423.conpherenceindices.sql'...
Applying patch 'phabricator:20130426.search_savedquery.sql'...
Applying patch 'phabricator:20130502.countdownrevamp1.sql'...
Applying patch 'phabricator:20130502.countdownrevamp2.php'...
Giving countdowns PHIDs
Done.
Applying patch 'phabricator:20130502.countdownrevamp3.sql'...
Applying patch 'phabricator:20130507.releephrqsimplifycols.sql'...
Applying patch 'phabricator:20130507.releephrqmailkey.sql'...
Applying patch 'phabricator:20130507.releephrqmailkeypop.php'...
Populating Releeph requests with mail keys...
Done.
Applying patch 'phabricator:20130508.search_namedquery.sql'...
Applying patch 'phabricator:20130508.releephtransactions.sql'...
Applying patch 'phabricator:20130508.releephtransactionsmig.php'...
Migrating Releeph requests events to transactions...
Done.
Applying patch 'phabricator:20130513.receviedmailstatus.sql'...
Applying patch 'phabricator:20130519.diviner.sql'...
Applying patch 'phabricator:20130521.dropconphimages.sql'...
Applying patch 'phabricator:20130523.maniphest_owners.sql'...
Applying patch 'phabricator:20130524.repoxactions.sql'...
Applying patch 'phabricator:20130529.macroauthor.sql'...
Applying patch 'phabricator:20130529.macroauthormig.php'...
Migrating macro authors...
Done.
Storage is up to date. Use 'storage status' for details.
$
此時回去web再次reload會看到登入畫面.[
][4]
再來設定admin 帳號:
$ ./bin/accountadmin
Enter a username to create a new account or edit an existing account.
Enter a username: admin
There is no existing user account 'admin'.
Do you want to create a new 'admin' account? [Y/n] Y
Enter user real name: SDpower
Enter user email address: xxx@xxxx
Enter a password for this user [blank to leave unchanged]:
Should this user be a system agent? [y/N] y
Should this user be an administrator? [y/N] y
ACCOUNT SUMMARY
OLD VALUE NEW VALUE
Username admin
Real Name admin
Email xxx@xxxx
Password Updated
System Agent N Y
Admin N Y
Save these changes? [Y/n] y
Saved changes.
開啟背景
#系統會提示缺少設定,需先設定
$ ./bin/config set phabricator.base-uri 'http://phabricator.localhost/'
Set 'phabricator.base-uri' in local configuration.
$ ./phd start
Staging launch...
NOTE: Logs will appear in '/var/tmp/phd/log/daemons.log'.
Launching 'PhabricatorRepositoryPullLocalDaemon'...
Launching 'PhabricatorGarbageCollectorDaemon'...
Launching 'PhabricatorTaskmasterDaemon'...
Launching 'PhabricatorTaskmasterDaemon'...
Launching 'PhabricatorTaskmasterDaemon'...
Launching 'PhabricatorTaskmasterDaemon'...
Done.
$