Mac OS 下基於XAMPP的Phabricator 安裝

一、簡介php

  Phabricator是Facebook開發的可視化代碼審查平臺,源代碼託管在GitHub上。mysql

二、依賴環境git

  Apachegithub

  MySQLweb

  PHPsql

2.一、安裝依賴環境瀏覽器

  安裝XAMPP可視化工具dom

三、安裝Phabricatoride

  Git上clone如下內容工具

  https://github.com/phacility/libphutil.git

  https://github.com/phacility/arcanist.git

  https://github.com/phacility/phabricator.git

四、開啓虛擬主機功能

  打開/Applications/XAMPP/xamppfiles/etc/httpd.conf,將

  # Virtual hosts

  #Include etc/extra/httpd-vhosts.conf

  更改爲(實際上就是將httpd-vhosts.conf文件的註釋去掉)

  # Virtual hosts

  Include etc/extra/httpd-vhosts.conf

五、在httpd-vhosts.conf這個文件裏建立本身的虛擬機

  5.1註釋掉全部的其餘內容

  5.2添加

<VirtualHost *>
  # Change this to the domain which points to your host.
  ServerName 192.168.199.104

  # 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 /Users/shoonfu/Desktop/Phabricator/phabricator/webroot<Directory "/Users/shoonfu/Desktop/Phabricator/phabricator/webroot">
      Options Indexes FollowSymLinks Includes execCGI
      AllowOverride All
      Require all granted
  </Directory>

  RewriteEngine on
  RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
  RewriteRule ^/favicon.ico   -                       [L,QSA]
  RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
</VirtualHost>

  須要注意的是ServerName,DocumentRoot,Directory按照註釋內容填寫

六、驗證是否能夠訪問,用瀏覽器打開本身的IP地址

  6.1 若是出現403的錯誤,說明尚未權限的,回到httpd.conf這個文件找到

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
</IfModule>

  找到User 按照要求修改爲本身電腦登陸時候的用戶名  而後重啓再次用瀏覽器打開本身的IP地址,若是出現Setup MySQL Schema 說明前面的已經成功了。

七、按照提示配置MySQL

  7.1.進入phabricator 後執行 ./bin/storage upgrade

  7.2.第一次會失敗,按照終端提示輸入如下命令

  phabricator/ $ ./bin/config set mysql.host localhost   (因爲mysql安裝在本機,這裏的mysql.host可填localhost或127.0.0.1或本機實際IP)

  phabricator/ $ ./bin/config set mysql.port 3396          (終端提示沒有這行,可是經測試不設置端口一直就不行,不知道爲何,知道的請留言回覆)

  phabricator/ $ ./bin/config set mysql.user root          (mysql默認用戶名是root,密碼爲空)

  phabricator/ $ ./bin/config set mysql.pass ""

  7.3.後再次執行 ./bin/storage upgrade

八、瀏覽器打開本身的IP地址,能夠看到Welcome to Phabricator,此時根據提示建立管理帳戶

九、Phabricator使用了一些daemons來處理一些例如郵件這樣的服務,須要確保這些服務能使用

  ./bin/phd start

此時Phabricator基本上就已經初步的可使用了,其餘服務例如郵件等須要按照提示一一配置。

參考文章:

Mac OS下基於XAMPP搭建Phabricator

相關文章
相關標籤/搜索