Phabricator on a subdomain on Digital Ocean

Phabricator is an interesting piece of software if you want to cooperate remotely with a number of programmers.
Blender uses it to coordinate its various efforts.
It's easy enough to get to run on Digital Ocean, which is cheap and fast.

  1. Get an account at Digital Ocean
  2. get a Lamp stack VM, you'll see the option when creating a new VM
  3. gather the bloody password (sometimes it's not very biddable)
  4. ssh to the new VM

On the VM:

  1. apt-get update
  2. follow the secure your vm instructions ( https://www.digitalocean.com/community/articles/initial-server-setup-with-ubuntu-12-04 )
  3. change the mysql password
  4. change root password
  5. add user
  6. put ssh key in user you’ll use cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
  7. move ssh to another port (for security)
  8. ssh -p <ssh_port_you_just_chose> user@ip
  9. give it the subdomain you want
  10. add the subdomain to DNS, give it a VM, leave defaults
    (if you give the wrong one you’ll have to update /etc/host and /etc/hostname , it doesn’t fix itself)
  11. add the dns stuff
  12. get git
  13. get tmux
  14. install fail2ban ( https://www.digitalocean.com/community/articles/how-to-protect-ssh-with-fail2ban-on-ubuntu-12-04 )
  15. install sendmail
  16. setup apache
  17. install various prerequisite ( http://stackoverflow.com/questions/2263404/what-package-i-should-install-for-pcre-devel , http://www.mkfoster.com/2009/01/04/how-to-install-a-php-pecl-extensionmodule-on-ubuntu/ , pecl: You should add "extension=apc.so" to php.ini (sudo pico /etc/php5/apache2/php.ini), enable mo_rewrite: sudo a2enmod rewrite )
  18. clone phabricator ( http://www.phabricator.com/docs/phabricator/article/Installation_Guide.html )
  19. vim /etc/apache2/sites-available/default
  20. also set ServerName to your domain + subdomain in sudo vim /etc/apache2/apache2.conf too (fix: https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts
    nano /etc/hosts

# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
#Virtual Hosts 
12.34.56.789    example.com

The MySQL part:

  1. apt-get install php5-curl
  2. mysql -u root -p
  3. enter pass
  4. SHOW VARIABLES WHERE Variable_name = 'port';
    SHOW VARIABLES WHERE Variable_name = 'hostname';
  5. make new user
    CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
    FLUSH PRIVILEGES;
  6. sudo apt-get install php5-gd
  7. php5 -m | grep -i gd
  8. setup mysql according to Phabricator's instructions
  9. setup user accounts for git

At this point Phabricator should be running and you should be able to follow the documentation on how to use it.

Show Comments