Setting-Up Xinc

The goal of this chapter is to help you obtain and correctly setup and execute Xinc on your operating system. Once you setup Xinc properly you shouldn't need to revisit this chapter, unless you're re-installing or moving your installation to another platform.

System Requirements

Xinc requires PHP 5.2.6+ to be installed as well as PEAR 1.4.0+

Operating Systems

Xinc is supposed to work with *nix as well as Windows systems.

However the Windows support is not the main focus of the current development. If you detect windows specific bugs, please report them.

Xinc is developed on Ubuntu 11.10 and being tested on ArchLinux.

Software Dependencies

For a detailed list of required sofware and libraries, refer to the following table of Software dependencies

Software Dependencies
Software Required for Source
PHP 5.2.7+ Execution http://www.php.net
Phing 2.4.0 Execution http://www.phing.info
PhpUnit2 3.5.0+ Additional functionality http://www.phpunit.de
PhpDocumentor 1.4.0 Additional functionality http://www.phpdoc.org
Xdebug 2.0.0+ Additional functionality http://www.xdebug.org
Base 1.4.1+ ezComponents Graphic functionality http://components.ez.no
Graph 1.2.1+ ezComponents Graphic functionality http://components.ez.no

Obtaining Xinc

Xinc is free software distributed under the terms of the LGPL.

Distribution Files

Xinc is obtainable through the pear channel or directly from code.google.com/p/xinc

PEAR Install

pear channel-discover pear.elektrischeslicht.de
pear channel-discover pear.phing.info
pear channel-discover components.ez.no
pear install Xinc/xinc

Post Installation Configuration

To get xinc ready for execution you need to run a configuration script:

pear run-scripts xinc/Xinc

This script will configure special directories as needed by Xinc as well as set up your Xinc Web Interface.

 1. Directory to keep the Xinc config files                    : /etc/xinc
 2. Directory to keep the Xinc Projects and Status information : /var/xinc
 3. Directory to keep the Xinc log files                       : /var/log
 4. Directory to install the Xinc start/stop daemon            : /etc/init.d
 5. Do you want to install the SimpleProject example           : yes
 6. Directory to install the Xinc web-application              : /var/www/xinc
 7. IP of Xinc web-application                                 : 127.0.0.1
 8. Port of Xinc web-application                               : 8080

1-8, 'all', 'abort', or Enter to continue: 
Postinstall Configuration Options
Item Description
1. Here Xinc will keep all configuration files:

DIR/system.xml - System Configuration
DIR/conf.d/*.xml - Project Configurations
2. Here Xinc will keep project data, the working copies of svn repositories and status information about the builds:

DIR/projects - Project / Working copies
DIR/status - Build status information
3. Xinc will create a logfile in this directory:

DIR/xinc.log
4. Xinc will install a daemon script in:

DIR/xinc

This daemon script currently "should" support:
  • Ubuntu
  • Debian
  • Fedora

Installation success Linux

Xinc installation complete.
- Please include /etc/xinc/www.conf in your apache virtual hosts.
- Please enable mod-rewrite.
- To add projects to Xinc, copy the project xml to /etc/xinc/conf.d
- To start xinc execute: sudo /etc/init.d/xinc start
UNINSTALL instructions:
- pear uninstall xinc/Xinc
- run: /usr/bin/xinc-uninstall to cleanup installed files
Install scripts complete

Installation success Windows

Xinc installation complete.
- Please include C:\xinc\etc/www.conf in your apache virtual hosts.
- Please enable mod-rewrite.
- To add projects to Xinc, copy the project xml to C:\xinc\etc\conf.d
- To start xinc execute: winserv start Xinc
UNINSTALL instructions:
- pear uninstall xinc/Xinc
- run: C:\xampp\php/xinc-uninstall to cleanup installed files
[OK] Saved ini settings
Install scripts complete

Preferred Way: Including Xinc www.conf in Apache2

$ sudo ln -s /etc/xinc/www.conf /etc/apache2/sites-enabled/
$ sudo apache2ctl restart

Alternative Way: Including Xinc www.conf in Apache main config

To add the Xinc apache config file to apache, add the following line in your httpd.conf:

Include /etc/xinc/www.conf

Preferred Way: Enabling Mod Rewrite in Apache2

$ ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/

Alternative Way: Enabling Mod Rewrite in Apache main config

To add the mod-rewrite module, add the following line in your httpd.conf:

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

 

Xinc Ini Configuration

Xinc lets you configure some settings, which determine GUI behaviour and/or Plugin behaviour. The following is a sample configuration:

[xinc]
version = 2.0.0b150
etc = /etc/xinc
etc_conf_d = /etc/xinc/conf.d
dir = /var/xinc
status_dir = /var/xinc/status
project_dir = /var/xinc/projects
www_dir = /var/www/xinc
www_port = 8080
www_ip = 127.0.0.1
log_dir = /var/log

[web]
title = "My Xinc Server"
logo = "/images/myServerLogo.png"
ohloh = 1

[googleanalytics]
trackerCode = UA-1346205-4

[phing]
path = /my/alternative/path/to/phing

[svn]
path = /my/alternative/path/to/svn

A simple administration script lets you read and modify these settings:
Usage:
xinc-settings [options]

xinc-settings options
Option Description
list-all Lists all the configuration options per section
list [section] Lists configuration options for [section]
get [section] [name] Gets the configuration option [name] of [section]
set [section] [name] [value] Sets the configuration option [name] with [value] in [section]

Sample Usage

Disabling the ohloh badge

$ xinc-settings set web ohloh 0

Setting your own google analytics code

$ xinc-settings set googleanalytics trackerCode MYGOOGLECODE

Setting your own title for the web interface

$ xinc-settings set web title "My Xinc Server"

 

Running Xinc

After configuration you are ready to execute the Xinc daemon

Execution on *nix systems

Xinc comes with an init-script, which is known to work with Ubuntu / Debian / Fedora.

$ /etc/init.d/xinc start

-OR-

$ service xinc start

If you detect that the daemon script is not working properly on your system and you would like to contribute a working init script, submit a ticket.

Execution on Windows systems

Xinc comes with winserv, which installs Xinc as a windows service.

C:\winserv start Xinc

You can execute Xinc in run-once mode as well as start it in the foreground. For Command Line Arguments see Appendix A.