Skip to content

Instantly share code, notes, and snippets.

@sunilake
Forked from potench/arcanist.md
Created January 18, 2018 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilake/b38dee560124e9da169d4b55dc95645d to your computer and use it in GitHub Desktop.
Save sunilake/b38dee560124e9da169d4b55dc95645d to your computer and use it in GitHub Desktop.
Install Phabricator on OSX and Install arcanist

OSX Arcanist Installation Guide

Note, please replace "WWW/tools" with where ever you store your web tools.

$ mkdir ~/WWW/tools
$ cd ~/WWW/tools
$ git clone https://github.com/phacility/libphutil.git
$ git clone https://github.com/phacility/arcanist.git

Add Arcanist to your PATH and test it out

  1. Open your ~/.profile or ~/.bashrc or whatever you use
  2. Add the following line
  3. export PATH="$HOME/WWW/tools/arcanist/bin:$PATH"
  4. Save the file
  5. Back in the terminal
  6. Reload your profile/bashrc source ~/.profile
  7. Test out your arc installation arc help

Make a change to a project

cd ~/WWW/prototypes
git clone git@github.dm.nfl.com:charden/ideal-data-models.git
git checkout -b feature/test-branch
# 1. make a change to a file: 
# 2. commit the change:  git commit -am "made a change in order to test phabricator reviews"
# 3. create an archanist dif to send to phabricator
arc dif
# 4. you may need to authenticate first, follow the instructions to authenticate
# 5. you may need to enter a Summary, Test Plan, Reviewers, and Subscribers
   # Summary: "this should have automatically pulled in your commit message"
   # Test Plan: "some example test plan text that tells you how to test this work"
   # Reviewers: charden, (first-initial + last-name)
   # Subscribers: taoki, rrojas, msomo, etc
# 6. follow in-terminal instructions (something something cntrl + x, yes, press-enter)

OSX Phabricator Installation Guide

Create tools foloder and install Dependencies

Note, please replace "WWW/tools" with where ever you store your web tools.

$ mkdir ~/WWW/tools
$ cd ~/WWW/tools
$ git clone https://github.com/phacility/phabricator.git
$ git clone https://github.com/phacility/libphutil.git
$ git clone https://github.com/phacility/arcanist.git

Add Arcanist to your PATH and test it out

  1. Open your ~/.profile or ~/.bashrc or whatever you use
  2. Add the following line
  3. export PATH="$HOME/WWW/tools/arcanist/bin:$PATH"
  4. Save the file
  5. Back in the terminal
  6. Reload your profile/bashrc source ~/.profile
  7. Test it out arc help

Setup Phabricator

First, update the httpd.conf file and hosts file to let Apache find your Phabricator installation.

  1. Edit httpd.conf $ sublime private/etc/apache2/httpd.conf

  2. Add the following rule, changing the DocumentRoot to match location of your Phabricator repo ``` <VirtualHost *> # Change this to the domain which points to your host. ServerName phabricator.local.nfl.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 /Users/christian.harden/WWW/tools/phabricator/webroot  
    
    RewriteEngine on
    RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
    RewriteRule ^/favicon.ico   -                       [L,QSA]
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
    
 </VirtualHost>





 ## Allow access to the entire WWW directory
 <Directory "/Users/christian.harden/WWW">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all
 </Directory>




 ServerName localhost
 ```
  1. Edit your hosts file $ sublime /private/etc/hosts
  2. Add the following
 ```
   127.0.0.1  phabricator.local.nfl.com
 ```
  1. Restart apache $ sudo apachectl -k restart

Finish Phabricator Setup

  1. Point your browser to phabricator.local.nfl.com
  2. If you see errors connecting to MySQL, then:
  3. Make sure you have mysql brew install mysql and follow these directions http://stackoverflow.com/a/6378429/527096
  4. Update Phabricator mysql.config with correct root, user, and pass
    $ cd ~/WWW/tools/phabricator
    $ ./bin/config set mysql.host local.nfl.com
    $ ./bin/config set mysql.user root
    $ ./bin/config set mysql.pass ""
    
  5. Refresh in your browser and continue following instructions

Installing pcntl

Phabricator requires the pcntl php extension.

cd ~/Downloads
# what version of PHP are you running? Replace "5.4.30" with your own php version
php -v 
# Download PHP source
wget -O php-5.4.30.tar.gz http://php.net/get/php-5.4.30.tar.gz/from/this/mirror
# Deflate source 
tar -zxvf php-5.4.30.tar.gz 
# Make + install pcntl 
cd php-5.4.30/ext/pcntl/
phpize && ./configure && make install
# Copy the install into your php extensions directory 
sudo cp modules/pcntl.so /usr/lib/php/extensions/
# Update php.ini with new extension 
sudo echo "extension=pcntl.so" >> /etc/php.ini
# Restart and test
sudo apachectl restart
/usr/bin/php --ri pcntl
# It should say "pcntl support => enabled"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment