1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/docs/installation_guide.diviner

140 lines
4.7 KiB
Text
Raw Normal View History

@title Installation Guide
@group intro
This document contains basic install instructions to get Phabricator up and
running.
= Installation Requirements =
Phabricator is a LAMP application suite, so you basically need LAMP:
- **Linux**: Some flavor of Linux is required. Mac OS X is an acceptable
flavor of Linux. Windows is not an acceptable flavor of Linux. Phabricator
will not install or work properly on Windows. (If you want it to, send
patches.) Phabricator has active contributors running it on Mac OS X, Amazon
Linux, Ubuntu, RHEL and CentOS; if you run into issues on other flavors,
send patches or complaints.
- **Apache** (or nginx): You need Apache (or nginx). You might be able to use
something else, but you're on your own.
- **MySQL**: You need MySQL.
- **PHP**: You need PHP 5.2 or newer.
NOTE: The command line interface to Phabricator, "Arcanist", //does// work on
Windows. For instructions, see @{article:Arcanist User Guide: Windows}.
You'll probably also need a **domain name** and you'll certainly need
**a computer** with a connection to **the internet**.
= Installing Required Components =
If you are installing on Ubuntu or an RedHat derivative, there are install
scripts available which should handle most of the things discussed in this
document for you:
- **RedHat Derivatives**: <http://www.phabricator.com/rsrc/install/install_rhel-derivs.sh>
- **Ubuntu**: <http://www.phabricator.com/rsrc/install/install_ubuntu.sh>
If those work for you, you can skip directly to the
@{article:Configuration Guide}. These scripts are also available in the
##scripts/install## directory in the project itself.
Otherwise, here's a general description of what you need to install:
- git (usually called "git" in package management systems)
- Apache (usually "httpd" or "apache2") (or nginx)
- MySQL Server (usually "mysqld" or "mysql-server")
- PHP (usually "php")
- Required PHP extensions: mbstring, iconv, mysql, curl, pcntl (these might be
something like "php-mysql" or "php5-mysql")
- Optional PHP extensions: gd, apc (special instructions for APC are available
2011-06-26 20:21:25 +02:00
below if you have difficulty installing it), xhprof (instructions below,
you only need this if you are developing Phabricator)
If you already have LAMP setup, you've probably already got everything you need.
It may also be helpful to refer to the install scripts above, even if they don't
work for your system.
Now that you have all that stuff installed, grab Phabricator and its
dependencies:
$ cd somewhere/ # pick some install directory
somewhere/ $ git clone git://github.com/facebook/libphutil.git
somewhere/ $ git clone git://github.com/facebook/arcanist.git
somewhere/ $ git clone git://github.com/facebook/phabricator.git
somewhere/ $ cd phabricator
somewhere/phabricator/ $ git submodule update --init
= Installing APC (Optional) =
Like everything else written in PHP, Phabricator will run much faster with APC
installed. You likely need to install "pcre-devel" first:
sudo yum install pcre-devel
Then you have two options. Either install via PECL (try this first):
sudo yum install php-pear
sudo pecl install apc
**If that doesn't work**, grab the package from PECL directly and follow the
build instructions there:
http://pecl.php.net/package/APC
Installing APC is optional but **strongly recommended**, especially on
production hosts.
Once APC is installed, test that it is available by running:
php -i | grep apc
If it doesn't show up, add:
extension=apc.so
..to "/etc/php.d/apc.ini" or the "php.ini" file indicated by "php -i".
2011-06-26 20:21:25 +02:00
= Installing XHProf (Optional) =
XHProf is a PHP profiling tool. You don't need to install it unless you are
developing Phabricator and making performance changes.
You can install xhprof with:
2011-06-26 20:21:25 +02:00
$ pecl install xhprof
2011-06-26 20:21:25 +02:00
If you have a PEAR version prior to 1.9.3, you may run into a `phpize` failure.
If so, you can download the source and build it with:
$ cd extension/
$ phpize
$ ./configure
$ make
$ sudo make install
You may also need to add "##extension=xhprof.so#" to your php.ini.
See <https://bugs.php.net/bug.php?id=59747> for more information.
2011-06-26 20:21:25 +02:00
= Updating Phabricator =
Make SQL patch management DAG-based and provide namespace support Summary: This addresses three issues with the current patch management system: # Two people developing at the same time often pick the same SQL patch number, and then have to go rename it. The system catches this, but it's silly. # Second/third-party developers can't use the same system to manage auxiliary storage they may want to add. # There's no way to build mock databases for unit tests that need to do reads. To resolve these things, you can now name your patches whatever you want and conflicts are just merge conflicts, which are less of a pain to fix than filename conflicts. Dependencies are now a DAG, with implicit dependencies created on the prior patch if no dependencies are specified. Developers can add new concrete subclasses of `PhabricatorSQLPatchList` to add storage management, and define the dependency branchpoint of their patches so they apply in the correct order (although, generally, they should not depend on the mainline patches, presumably). The commands `storage upgrade --namespace test1234` and `storage destroy --namespace test1234` will allow unit tests to build and destroy MySQL storage. A "quickstart" mode allows an upgrade from scratch in ~1200ms. Destruction takes about 200ms. These seem like fairily reasonable costs to actually use in tests. Building from scratch patch-by-patch takes about 6000ms. Test Plan: - Created new databases from scratch with and without quickstart in a separate test namespace. Pointed the webapp at the test namespaces, browsed around, everything looked good. - Compared quickstart and no-quickstart dump states, they're identical except for mysqldump timestamps and a few similar things. - Upgraded a legacy database to the new storage format. - Destroyed / dumped storage. Reviewers: edward, vrana, btrahan, jungejason Reviewed By: btrahan CC: aran, nh Maniphest Tasks: T140, T345 Differential Revision: https://secure.phabricator.com/D2323
2012-04-30 16:54:00 +02:00
Since Phabricator is under active development, you should update frequently. To
update Phabricator:
- Stop the webserver.
- Run `git pull && git submodule update --init` in `libphutil/`,
`arcanist/` and `phabricator/`.
- Run `phabricator/bin/storage upgrade`.
- Restart the webserver.
For more details, see @{article:Configuration Guide}. You can use a script
similar to this one to automate the process:
http://www.phabricator.com/rsrc/install/update_phabricator.sh
= Next Steps =
Continue by:
- configuring Phabricator with the @{article:Configuration Guide}.