docs/ - Update navigation, file structure, requirements
[civicrm-core.git] / docs / requirements.md
1 # Languages and Services
2
3 * Unix-like environment (Linux, OS X, or a virtual machine)
4 * [PHP v5.3+](http://php.net/)
5 * [MySQL v5.1+](http://mysql.com/)
6 * [NodeJS](https://nodejs.org/)
7 * [Git](https://git-scm.com/)
8 * Recommended: Apache HTTPD v2.2+
9 * Recommended: Ruby/Rake
10
11 # Command Line
12
13 There are many ways to install MySQL, PHP, and other dependencies -- for
14 example, `apt-get` and `yum` can download packages automatically; `php.net`
15 and `mysql.com` provide standalone installers; and MAMP/XAMPP provide
16 bundled installers.
17
18 Civi development should work with most packages -- but there's one proviso:
19 ***the command-line must support standard commands*** (`php`, `mysql`,
20 `node`, `git`, `bash`, etc).
21
22 Some packages are configured properly out-of-the-box. (Linux distributions
23 do a pretty good job of this.) Other packages require extra configuration
24 steps (e.g. [Setup Command Line
25 PHP](http://wiki.civicrm.org/confluence/display/CRMDOC/Setup+Command-Line+PHP)
26 for MAMP).
27
28 In subsequent steps, the download script will attempt to identify
29 misconfigurations and display an appropriate message.
30
31 # Buildkit
32
33 The developer docs reference a large number of developer tools, such as
34 `drush` (the Drupal command line), `civix` (the CiviCRM code-generator), and
35 `karma` (the Javascript tester).
36
37 Many of these tools are commonly used by web developers, so you may have
38 already installed a few. You could install all the tools individually --
39 but that takes a lot of work.
40
41 [civicrm-buildkit](https://github.com/civicrm/civicrm-buildkit) provides
42 a script which downloads the full collection.
43
44 ### - Option #1: Full Stack Ubuntu (Opinionated)
45
46 If you have a new installation of Ubuntu 12.04 or 14.04, then you can download everything -- buildkit and the system
47 requirements (`git`, `php`, `apache`, `mysql`, etc) -- with one command. This command will install buildkit to `~/buildkit`:
48
49 ```bash
50 curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit
51 ```
52
53 Note:
54
55 * When executing the above command, you must ***NOT*** run as `root`. (Doing so will produce incorrect permissions.)
56 Instead, you must have `sudo` permissions.
57 * The `--full` option is opinionated; it specifically installs `php`, `apache`, and `mysql` (rather than `hvm`, `nginx`, `lighttpd`, or `percona`).
58 If you try to mix `--full` with alternative systems, then expect conflicts.
59
60
61 ### - Option #2: Other Systems
62
63 If you already installed the requirements (`git`, `php`, etc), then you can download buildkit to `~/buildkit` with these commands:
64
65 ```bash
66 git clone https://github.com/civicrm/civicrm-buildkit.git buildkit
67 cd buildkit/bin
68 ./civi-download-tools
69 export PATH="$PWD:$PATH"
70 ```
71
72 ### - Option #3: Upgrade
73
74 If you have previously downloaded buildkit and want to update it, run:
75
76 ```bash
77 cd buildkit
78 git pull
79 ./bin/civi-download-tools
80 ```