| 1 |
_________________________ |
|---|
| 2 |
P H I N G |
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
Welcome to Phing! |
|---|
| 6 |
----------------- |
|---|
| 7 |
|
|---|
| 8 |
In this file you find a quick installation guide for PHING. For a more |
|---|
| 9 |
details regarding the setup procedure see the usersguide pdf or html |
|---|
| 10 |
in docs/. |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
Prerequisites |
|---|
| 14 |
------------- |
|---|
| 15 |
|
|---|
| 16 |
At this point we assume you have a running Linux or other UNIX dialect with |
|---|
| 17 |
a properly installed release of PHP5.0.1+. You need the CLI version of PHP, |
|---|
| 18 |
since there is no WEB-Application for Phing provided, and the ISAPI module |
|---|
| 19 |
will not work on command line. The PHP binary must have compiled-in XML |
|---|
| 20 |
support and optionally XSLT support if you want to use XSLT |
|---|
| 21 |
transformation |
|---|
| 22 |
|
|---|
| 23 |
We also assume you have shell-access to your system and your are logged in |
|---|
| 24 |
with the bash2 shell. If you're using tcsh, csh or other shells please refer |
|---|
| 25 |
to your shells' manpage for the syntax on how to set environment variables. |
|---|
| 26 |
|
|---|
| 27 |
PEAR Installation |
|---|
| 28 |
----------------- |
|---|
| 29 |
|
|---|
| 30 |
NOTE: As of Phing 2.0.0b1, Phing is available as a PEAR package. This |
|---|
| 31 |
makes installing Phing a million times easier than it already was (and |
|---|
| 32 |
most people say that it wasn't too hard in the first place). Visit |
|---|
| 33 |
http://phing.info to either download the latest Phing PEAR-installable |
|---|
| 34 |
package or to learn how to install directly over the network. |
|---|
| 35 |
|
|---|
| 36 |
If you are reading this document, then you are probably wanting to do |
|---|
| 37 |
the custom install, though, so read on ... |
|---|
| 38 |
|
|---|
| 39 |
Custom Installation |
|---|
| 40 |
------------------- |
|---|
| 41 |
|
|---|
| 42 |
+---------------------------------------------------------------------+ |
|---|
| 43 |
| Note: for the sake of simple instructions, we will assume you are | |
|---|
| 44 |
| installing PHING to /opt/phing -- of course your installation path | |
|---|
| 45 |
| will probably be different. | |
|---|
| 46 |
+---------------------------------------------------------------------+ |
|---|
| 47 |
|
|---|
| 48 |
First download a matching PHING distribution from binarycloud.com/phing and |
|---|
| 49 |
untar/gzip it to the desired install directory and optionally create a |
|---|
| 50 |
symlink for convinience: |
|---|
| 51 |
|
|---|
| 52 |
% cd /opt |
|---|
| 53 |
% tar xfz /path/to/phing-x.x.x.tar.gz |
|---|
| 54 |
% ln -s phing-x.x.x phing |
|---|
| 55 |
|
|---|
| 56 |
The shell script used to launch phing (bin/phing.sh) will attempt to guess |
|---|
| 57 |
most settings if you do not provide them explicitly. At this point you may |
|---|
| 58 |
want to try running Phing to see how you fare: |
|---|
| 59 |
|
|---|
| 60 |
% /opt/phing/bin/phing -version |
|---|
| 61 |
|
|---|
| 62 |
If that worked, then no further setup is necessary; however, you probably |
|---|
| 63 |
want to add a symlink /opt/phing/bin/phing to a location on your path: |
|---|
| 64 |
|
|---|
| 65 |
% ln -s /opt/phing/bin/phing /usr/local/bin/phing |
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
More Detailed Install Instruction |
|---|
| 69 |
--------------------------------- |
|---|
| 70 |
|
|---|
| 71 |
If Phing did not run out-of-the-box, then you will probably need to set some |
|---|
| 72 |
environment variables so that Phing knows where to find the PHP executable, |
|---|
| 73 |
necessary classes, etc. |
|---|
| 74 |
|
|---|
| 75 |
Now you have to set the PHP_COMMAND environment variable that points to |
|---|
| 76 |
the cli binary of php. For instance, Redhat Linux uses /usr/bin/php, and a |
|---|
| 77 |
compile from source installs by default in /usr/local/bin/php. We assume |
|---|
| 78 |
/usr/bin/php here. Execute the following command on the shell: |
|---|
| 79 |
|
|---|
| 80 |
% export PHP_COMMAND=/usr/bin/php |
|---|
| 81 |
|
|---|
| 82 |
Set the PHING_HOME to point to the installation directory of phing. If you |
|---|
| 83 |
are installing phing system wide, this is usually /opt/phing. |
|---|
| 84 |
|
|---|
| 85 |
% export PHING_HOME=/opt/phing |
|---|
| 86 |
|
|---|
| 87 |
Set the PHP_CLASSPATH variable to include $PHING_HOME/classes (optional) |
|---|
| 88 |
|
|---|
| 89 |
% export PHP_CLASSPATH="$PHING_HOME/classes" |
|---|
| 90 |
|
|---|
| 91 |
You can make additional classpath entries if there's a need for them. I.e. |
|---|
| 92 |
adding $BCHOME if you want to access binarycloud packages. |
|---|
| 93 |
|
|---|
| 94 |
Now you can add the phing executable to your PATH environment or add a |
|---|
| 95 |
symlink to it somewere in your path. We suggest adding a symlink in the |
|---|
| 96 |
bin/ dir and also add it to the path: |
|---|
| 97 |
|
|---|
| 98 |
% cd $PHING_HOME/bin |
|---|
| 99 |
% ln -s phing.sh phing |
|---|
| 100 |
% chmod +x phing |
|---|
| 101 |
% export PATH=$PATH:$PHING_HOME/bin |
|---|
| 102 |
|
|---|
| 103 |
You should now be able to execute Phing from everywhere in your system. |
|---|
| 104 |
Try it by changing back to your home and type: |
|---|
| 105 |
|
|---|
| 106 |
% phing -version |
|---|
| 107 |
|
|---|
| 108 |
Congratulations, you successfully installed Phing. |
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
Tips & Tricks |
|---|
| 112 |
------------- |
|---|
| 113 |
|
|---|
| 114 |
If you're using phing frequently consider adding the environment variables |
|---|
| 115 |
to you .bash_profile, .bashrc, etc. |
|---|
| 116 |
|
|---|
| 117 |
Another commonly used practice for advanced users is to create a build.sh |
|---|
| 118 |
file that sets all required variables and executes phing for your project. |
|---|
| 119 |
If you do so, you can savely override the bin/phing.sh file and use |
|---|
| 120 |
bin/phing.php directly without checking for environment. If you do so, |
|---|
| 121 |
there is basically only one varibale you have to set in your environment: |
|---|
| 122 |
PHING_HOME. See bin/phing.sh for details working with the phing.php script. |
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
--$Id: INSTALL.UNIX,v 1.8 2005/03/15 23:02:17 mrook Exp $ |
|---|