Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved

Chapter 1. Installation

In order to install Tuleap's Command Line Interface (CLI), you must have PHP5 installed on your local machine (CLI won't work with PHP4). The latest PHP 5 version is highly recommended. Also, PHP must be compiled without the --disable-cli parameter in order to create the PHP binaries.

You must check in which directory you have your PHP binary installed. The directory is the prefix that was specified when compiling PHP (if no prefix was defined, it defaults to /usr, so the PHP binary is located in /usr/bin/php).

How to know where PHP binary is located ?

You can check in which directory it is installed by issuing the following command:

# which php
/usr/bin/php
            
In this case, the PHP binary is /usr/bin/php.

If you intend using the CLI for administering a Tuleap installation via an HTTPS connection, you must compile PHP with the CURL extension (using the --with-curl option in the configure script).

Once you have PHP properly installed, you must download and uncompress the CLI to a directory in your local machine.

Once you've uncompressed the CLI, you must edit $PREFIX/tuleap.php (where $PREFIX is the directory in which the CLI was uncompressed) using your favorite editor and change the following:

  1. Change the first line which says:

    #!/usr/bin/php -q
                
    to make it point to the path of the PHP binary in your machine (if it is different from /usr/bin/php)

  2. Find the Configuration section in the script (marked between comments) and change the following constants:

    • CODENDI_CLI_DIR: Points to the directory where the CLI auxiliary files are to be found. It usually is $PREFIX/include/.

    • WSDL_URL (optional): URL of the WSDL of your Tuleap's SOAP server. It is probably located in http://tuleap.net/soap/index.php?wsdl. You can see if the URL is correct by entering it in your browser, you should get an XML file from the server as the result. If this variable isn't set, the CLI will try to use the WSDL specified in the TULEAP_WSDL environment variable.

  3. Make sure the tuleap.php script has execution permissions. If not, set the permission by issuing the following command:

    chmod +x $PREFIX/tuleap.php
                    

After everything is properly set up, you must test the installation works correctly. For this, try logging into the server by issuing a "login" command. For this, change your current working directory to the directory in which you uncompressed the CLI and execute the following:

[mnazaria@linux tuleap-cli]$ ./tuleap.php -v login --username=(your user) --password=(your password)
CodendiSOAP::Connecting to the server http://tuleap.net/soap/index.php?wsdl...
CodendiSOAP::Connected!
CodendiSOAP::Executing command login...
Logged in as user (your user) , using session string MTAyLSotMTEyMzA4Mjg5My0qLTEyNy4wLjAuMS0qLU51U09BUC8wLjYuOSAoMS4xLjEuMSk=824c9f9010931f7872f4b9826c460ed3
Logged in.
            

Example 1. login command

The message you see may vary depending on the configuration of your server. If you get an error like "Fatal error: wsdl error: HTTP ERROR: Couldn't open socket connection to server http://tuleap.net prior to connect().", it means that your computer can't connect to the Tuleap server. In this case, you must make sure the address is written correctly and that you can access the server from your computer.


Copyright © Xerox Corporation, Codendi Team, 2001-2006. All Rights Reserved