安装phabricatorphp
一、git clone https://github.com/phacility/phabricator.gitmysql
git clone https://github.com/facebook/libphutil.gitnginx
git clone https://github.com/facebook/arcanist.git git
注意他们第三个放在同一级目录如 /wwwgithub
二、cd phabricator/web
三、git pull sql
注:项目使用Apache服务器,若是阁下为nginx服务器,请自行参考官方文档配置。数据库
vim http.conf vim
添加服务器
<Directory "/www/phabricator/webroot">
Order Deny,Allow
Allow from all
</Directory>
vim httpd-vhost.conf
添加虚拟机
<VirtualHost *:80>
ServerName phabricator.henosteven.com
DocumentRoot /www/phabricator/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>
将php添加到PATH中,方便phabricator的脚本须要自行
vim /etc/profile
export PATH=$PATH:/usr/local/php/bin
为phabricator配置数据库
注意此处使用的mysql用户须要具备建立数据库权限,通常使用
(grant all on *.* to user@'db.host' identified by 'password')
cd /www/phabricator
./bin/config set mysql.host value
./bin/config set mysql.port value
./bin/config set mysql.user value
./bin/config set mysql.pass value
配置完毕运行
./bin/storage upgrade
此时数据库就配置而且建立完毕了。
接下来登陆页面建立管理员帐户(上面配置的phabricator.henosteven.com, 没有域名请自行配置host)
配置邮件
./bin/config set phpmailer.smtp-host smtp.ym.163.com
./bin/config set phpmailer.smtp-user pha@hotkeypower.com
./bin/config set phpmailer.smtp-password 123123
测试邮件是否好用
./bin/mail --help
看看里面的命令就知道使用了, 比较简单。
./bin/mail send-test --to heno --subject hi </tmp/henosteven
查收邮件。
注意若是没有收到邮件,你须要登陆页面
config>mail>matemta.default-address 配置须要跟上面的phpmailer.smtp-user 保持一致
若是你使用 ./bin/mail send-test 但是收到邮件,可是页面发送收不到, 你应该重启服务
./bin/phd restart
注意: 这个须要须要安装php pcntl 扩展
容许用户登陆注册
若是你的管理员用户退出来了,提示下面的信息了
This Phabricator install is not configured with any enabled authentication providers which can be used to log in. If you have accidentally locked yourself out by disabling all providers, you can use `phabricator/bin/auth recover <username>` to recover access to an administrative account.
你应该运行命令
./bin/auth recover henosteven(管理员帐号)
根据提示进行操做
Use this link to recover access to the "steven" account from the web interface:
/login/once/recover/1/nstgjvga2knauxzeemah5jfmfa44iy5a/
After logging in, you can use the "Auth" application to add or restore authentication providers and allow normal logins to succeed.
容许用户登陆注册
管理员登陆页面 进入 Auth 进行配置就好。
到此为止,phabricator就安装完毕了,下面须要安装就是 配置arcanist了。
----------------------------------------------------------------------------
配置 arcanist
将命令添加到 PATH中
vim /etc/profile
export PATH=$PATH:/home/steven/soft/arcanist/bin/
进入代码创库
vim .arcconfig
{
"project.name" : "henosteven-pro",
"phabricator.uri" : "http://phabricator.henosteven.com/"
}
运行 arc install-certificate, 按要求访问地址, 将地址中的字符串粘贴回来便可
而后就是
运行 arc diff
若是提示
Please set EDITOR environment variable
那么你还须要将编辑器添加到PATH(若是你有vim的话,你能够向下面这样)
export EDITOR=$(which vim)
而后就好了~~~~
------------------------------------------------------------------------------------
一个项目管理神器就这样开始了~~~~