4 echo "Press RETURN to continue, or ^C to cancel.";
8 INSTALL_URI
=" https://phurl.io/u/install"
13 echo "Installation has failed."
14 echo "Text above this message might be useful to understanding what exactly failed."
16 echo "Please follow this guide to manually complete installation:"
20 echo "We apologize for the inconvenience."
24 ISSUE
=`cat /etc/issue`
25 if [[ $ISSUE != Ubuntu
* ]]
27 echo "This script is intended for use on Ubuntu, but this system appears";
28 echo "to be something else. Your results may vary.";
33 echo "PHABRICATOR UBUNTU INSTALL SCRIPT";
34 echo "This script will install Apache, Phabricator and its core dependencies.";
35 echo "Run it from the directory you want to install into.";
38 echo "Testing sudo..."
42 echo "ERROR: You must be able to sudo to run this script.";
46 echo 'Testing Ubuntu version...'
48 VERSION
=`lsb_release -rs`
49 MAJOR
=`expr match "$VERSION" '\([0-9]*\)'`
51 if [ "$MAJOR" -lt 16 ]
53 echo 'This script is intented to install on modern operating systems; Your '
54 echo 'operating system is too old for this script.'
55 echo 'You can still install Phabricator manually - please consult the installation'
56 echo 'guide to see how:'
63 # Ubuntu 16.04 LTS only has php 7.0 in their repos, so they need this extra ppa.
64 # Ubuntu 17.4 and up have official 7.2 builds.
65 if [ "$MAJOR" -eq 16 ]
67 echo 'This version of Ubuntu requires additional resources in order to install'
68 echo 'and run Phabricator.'
69 echo 'We will now add a the following package repository to your system:'
70 echo ' https://launchpad.net/~ondrej/+archive/ubuntu/php'
72 echo 'This repository is generally considered safe to use.'
75 sudo add-apt-repository
-y ppa
:ondrej
/php || failed
79 echo "Phabricator will be installed to: ${ROOT}.";
82 echo "Installing dependencies: git, apache, mysql, php...";
84 sudo apt-get
-qq update
85 sudo apt-get
install \
86 git mysql-server apache2 libapache2-mod-php \
87 php php-mysql php-gd php-curl php-apcu php-cli php-json php-mbstring \
90 echo "Enabling mod_rewrite in Apache..."
92 sudo a2enmod rewrite || failed
94 echo "Downloading Phabricator and dependencies..."
98 git clone https
://github.com
/phacility
/libphutil.git
100 (cd libphutil
&& git pull
--rebase)
105 git clone https
://github.com
/phacility
/arcanist.git
107 (cd arcanist
&& git pull
--rebase)
110 if [ ! -e phabricator
]
112 git clone https
://github.com
/phacility
/phabricator.git
114 (cd phabricator
&& git pull
--rebase)
119 echo "Install probably worked mostly correctly. Continue with the 'Configuration Guide':";
121 echo " https://secure.phabricator.com/book/phabricator/article/configuration_guide/";
123 echo 'Next step is "Configuring Apache webserver".'