_________________________ P H I N G Welcome to Phing! ----------------- In this file you find a quick installation guide for PHING. For a more details regarding the setup procedure see the usersguide pdf or html in docs/. Prerequisites ------------- At this point we assume you have a running Linux or other UNIX dialect with a properly installed release of PHP5.0.1+. You need the CLI version of PHP, since there is no WEB-Application for Phing provided, and the ISAPI module will not work on command line. The PHP binary must have compiled-in XML support and optionally XSLT support if you want to use XSLT transformation We also assume you have shell-access to your system and your are logged in with the bash2 shell. If you're using tcsh, csh or other shells please refer to your shells' manpage for the syntax on how to set environment variables. PEAR Installation ----------------- NOTE: As of Phing 2.0.0b1, Phing is available as a PEAR package. This makes installing Phing a million times easier than it already was (and most people say that it wasn't too hard in the first place). Visit http://phing.info to either download the latest Phing PEAR-installable package or to learn how to install directly over the network. If you are reading this document, then you are probably wanting to do the custom install, though, so read on ... Custom Installation ------------------- +---------------------------------------------------------------------+ | Note: for the sake of simple instructions, we will assume you are | | installing PHING to /opt/phing -- of course your installation path | | will probably be different. | +---------------------------------------------------------------------+ First download a matching PHING distribution from binarycloud.com/phing and untar/gzip it to the desired install directory and optionally create a symlink for convinience: % cd /opt % tar xfz /path/to/phing-x.x.x.tar.gz % ln -s phing-x.x.x phing The shell script used to launch phing (bin/phing.sh) will attempt to guess most settings if you do not provide them explicitly. At this point you may want to try running Phing to see how you fare: % /opt/phing/bin/phing -version If that worked, then no further setup is necessary; however, you probably want to add a symlink /opt/phing/bin/phing to a location on your path: % ln -s /opt/phing/bin/phing /usr/local/bin/phing More Detailed Install Instruction --------------------------------- If Phing did not run out-of-the-box, then you will probably need to set some environment variables so that Phing knows where to find the PHP executable, necessary classes, etc. Now you have to set the PHP_COMMAND environment variable that points to the cli binary of php. For instance, Redhat Linux uses /usr/bin/php, and a compile from source installs by default in /usr/local/bin/php. We assume /usr/bin/php here. Execute the following command on the shell: % export PHP_COMMAND=/usr/bin/php Set the PHING_HOME to point to the installation directory of phing. If you are installing phing system wide, this is usually /opt/phing. % export PHING_HOME=/opt/phing Set the PHP_CLASSPATH variable to include $PHING_HOME/classes (optional) % export PHP_CLASSPATH="$PHING_HOME/classes" You can make additional classpath entries if there's a need for them. I.e. adding $BCHOME if you want to access binarycloud packages. Now you can add the phing executable to your PATH environment or add a symlink to it somewere in your path. We suggest adding a symlink in the bin/ dir and also add it to the path: % cd $PHING_HOME/bin % ln -s phing.sh phing % chmod +x phing % export PATH=$PATH:$PHING_HOME/bin You should now be able to execute Phing from everywhere in your system. Try it by changing back to your home and type: % phing -version Congratulations, you successfully installed Phing. Tips & Tricks ------------- If you're using phing frequently consider adding the environment variables to you .bash_profile, .bashrc, etc. Another commonly used practice for advanced users is to create a build.sh file that sets all required variables and executes phing for your project. If you do so, you can savely override the bin/phing.sh file and use bin/phing.php directly without checking for environment. If you do so, there is basically only one varibale you have to set in your environment: PHING_HOME. See bin/phing.sh for details working with the phing.php script. --$Id: INSTALL.UNIX,v 1.8 2005/03/15 23:02:17 mrook Exp $