• Mac OS 下基于XAMPP的Phabricator 安装


    1、简介

      Phabricator是Facebook开发的可视化代码审查平台,源代码托管在GitHub上。

    2、依赖环境

      Apache

      MySQL

      PHP

    2.1、安装依赖环境

      安装XAMPP可视化工具

    3、安装Phabricator

      Git上clone以下内容

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

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

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

    4、开启虚拟主机功能

      打开/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

    5、在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按照注释内容填写

    6、验证是否可以访问,用浏览器打开自己的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 说明前面的已经成功了。

    7、按照提示配置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

    8、浏览器打开自己的IP地址,可以看到Welcome to Phabricator,此时根据提示创建管理账户

    9、Phabricator使用了一些daemons来处理一些例如邮件这样的服务,需要确保这些服务能使用

      ./bin/phd start

    此时Phabricator基本上就已经初步的可以使用了,其他服务例如邮件等需要按照提示一一配置。

    参考文章:

    Mac OS下基于XAMPP搭建Phabricator

  • 相关阅读:
    vue-cli构建的项目手动添加eslint配置
    给通过canvas生成的二维码添加logo
    webpack打包时候去掉console.log配置
    gist.github.com 被墙无法访问解决办法
    axios.js 在测试机ios7.1的iphone4中不能发送http请求解决方案
    linux 系统的7个运行级别
    今天遇到了不能创建mysql函数
    今天测试大商创,遇到了 upstream sent too big header while reading response header from upstream
    mysql5.7 datetime 默认值为‘0000-00-00 00:00:00'值无法创建问题解决
    IE浏览器中判断IE版本
  • 原文地址:https://www.cnblogs.com/fusheng-it/p/7742998.html
Copyright © 2020-2023  润新知