Updated Installing PHPCI (markdown)
parent
97da4fa5fc
commit
7e729bfe4c
1 changed files with 13 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
####Pre-requisites:
|
||||
##Pre-requisites:
|
||||
* PHP 5.3.8+
|
||||
* A web server. We prefer nginx.
|
||||
* Composer (https://getcomposer.org/download/)
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
* PHPCI needs to be able to run `exec()` and `shell_exec()`, so make sure these functions are not disabled
|
||||
* PHP must have OpenSSL support available and enabled as well as have the mcrypt extension installed.
|
||||
|
||||
#### The installation process:
|
||||
##The installation process:
|
||||
(If you are installing on Mac, see [Vanilla Mac Mavericks Server Installation Guide](https://github.com/Block8/PHPCI/wiki/Vanilla-Mac-Mavericks-Server-Installation-Guide).)
|
||||
* Step 1: `composer create-project block8/phpci testphpci --keep-vcs --no-dev`
|
||||
* Step 2: `./console phpci:install`
|
||||
* Add a virtual host to your web server, pointing to the directory "public" where you cloned PHPCI into.
|
||||
* You'll need to set up rewrite rules to point all non-existent requests to PHPCI.
|
||||
|
||||
**Apache Example (require mod_rewrite installed)**:
|
||||
###Apache Example (require mod_rewrite installed):
|
||||
|
||||
```sh
|
||||
<IfModule mod_rewrite.c>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</IfModule>
|
||||
```
|
||||
|
||||
**Nginx Example**:
|
||||
###Nginx Example:
|
||||
|
||||
```
|
||||
location / {
|
||||
|
|
@ -34,11 +34,11 @@ location / {
|
|||
}
|
||||
```
|
||||
|
||||
**Lighttpd Example (lighttpd >= `1.4.24`):**
|
||||
###Lighttpd Example (lighttpd >= `1.4.24`):
|
||||
|
||||
This example uses the `$HTTP["host"]` conditional block because `$HTTP["url"]` blocks aren't supported with url rewriting in lighttpd <= `1.4.33` (source: [lighttpd docs for mod_rewrite](http://redmine.lighttpd.net/projects/1/wiki/Docs_ModRewrite)). In lighttpd >= `1.4.34` however, [this has been fixed](http://redmine.lighttpd.net/issues/2526).
|
||||
|
||||
**lighttpd <= `1.4.33`**
|
||||
###lighttpd <= `1.4.33`
|
||||
```
|
||||
$HTTP["host"] =~ "^phpci\.example\.com$" {
|
||||
# Rewrite all requests to non-physical files
|
||||
|
|
@ -49,7 +49,7 @@ $HTTP["host"] =~ "^phpci\.example\.com$" {
|
|||
}
|
||||
```
|
||||
|
||||
**lighttpd >= `1.4.34`**
|
||||
###lighttpd >= `1.4.34`
|
||||
```
|
||||
$HTTP["url"] =~ "^\/PHPCI/$" {
|
||||
# Rewrite all requests to non-physical files
|
||||
|
|
@ -62,7 +62,7 @@ $HTTP["url"] =~ "^\/PHPCI/$" {
|
|||
|
||||
If you ~~would like~~ are forced to use lighttpd <= `1.4.24`, [you can use mod_magnet and Lua instead] (http://redmine.lighttpd.net/projects/1/wiki/AbsoLUAtion).
|
||||
|
||||
**Built-in PHP Server Example**:
|
||||
###Built-in PHP Server Example:
|
||||
|
||||
You can use the built-in PHP server `php -S localhost:8080` by adding `public/routing.php`.
|
||||
|
||||
|
|
@ -76,11 +76,11 @@ if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
|
|||
}
|
||||
```
|
||||
|
||||
**Finally**
|
||||
##Finally
|
||||
|
||||
There are a couple ways of running PHPCI builds. If you want to run multiple builds at the same time, but don't mind waiting *up to* 1 minute for a cron job to execute, you should use the cron method.
|
||||
|
||||
**Cron method**
|
||||
###Cron method
|
||||
|
||||
You'll want to set up PHPCI to run as a regular cronjob, so run `crontab -e` and enter the following:
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ You'll want to set up PHPCI to run as a regular cronjob, so run `crontab -e` and
|
|||
|
||||
Obviously, make sure you change the `/path/to/phpci` to the directory in which you installed PHPCI, and update the PHP path if necessary.
|
||||
|
||||
**Daemon method**
|
||||
###Daemon method
|
||||
|
||||
If you only want to run one build at a time or want your builds to run immediately after they're created, you should use the daemonise method. Run the following command, from the root of your PHPCI installation:
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ nohup php daemonise phpci:daemonise > daemon.log &
|
|||
|
||||
Output will be streamed into the `daemon.log` file.
|
||||
|
||||
***Add Composer***
|
||||
##Add Composer
|
||||
|
||||
```bash
|
||||
cd /path/to/phpci
|
||||
|
|
@ -106,7 +106,7 @@ wget https://getcomposer.org/composer.phar
|
|||
chmod +x composer.phar
|
||||
```
|
||||
|
||||
***Permissions***
|
||||
##Permissions
|
||||
|
||||
The user under which your executed `crontab -e` above, should have write permissions to `PHPCI/build` directory.
|
||||
So
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue