Difference between revisions of "CDash:Installation"

From KitwarePublic
Jump to navigationJump to search
(44 intermediate revisions by 9 users not shown)
Line 4: Line 4:
 
   
 
   
 
== System Requirements ==
 
== System Requirements ==
* Apache
 
* SQL database
 
** MySQL database (5.x and higher)
 
** PostgreSQL database (8.3 and higher)
 
* PHP (5.0 and higher)
 
* XSL module for PHP
 
* cURL module for PHP (for site statistics)
 
* GD module for PHP (for regression tests)
 
  
== Downloading CDash ==
+
CDash requires:
 +
*  A web server (Apache, NGINX, IIS) with PHP (5.5.9+) and SSL enabled.
 +
* Access to a MySQL (5.x+) or PostgreSQL (8.3+) database server.
  
The '''current stable release of CDash is 1.2.1''' you can either download it as a zip archive
+
PHP needs to have the following modules enabled:
* [http://www.cdash.org/download/CDash-1.2.1.zip CDash-1.2.1.zip]
+
* bcmath
* or from the [http://subversion.tigris.org/ Subversion] repository:
+
* cURL (for site statistics)
  svn co https://www.kitware.com:8443/svn/CDash/Release-1-2-1 CDash
+
* GD (for regression tests)
 
+
* mbstring
=== SVN Development version ===
+
* pdo-mysql or pdo-postgresql
 +
* XSL
  
CDash is available from the development [http://subversion.tigris.org/ Subversion] repository. Either extract the code into your web server tree, or another directory which will later be copied to the web server:
+
== Downloading CDash ==
 
 
cd /srv/www/htdocs
 
svn co https://www.kitware.com:8443/svn/CDash/trunk CDash
 
 
 
''Note: If this fails ensure any firewall allows outgoing access to port 8443.''
 
 
 
=== Previous versions of CDash ===
 
 
 
* '''1.0''': [http://www.cdash.org/download/CDash-1.0.zip CDash-1.0.zip] or svn co https://www.kitware.com:8443/svn/CDash/Release-1-0 CDash
 
* '''0.8''': [http://www.cdash.org/download/CDash-0.8.zip CDash-0.8.zip] or svn co https://www.kitware.com:8443/svn/CDash/Release-0-8 CDash
 
 
 
== Configuration ==
 
The system configuration is stored in <tt>.../CDash/config.php</tt>, edit this with your favorite ASCII editor.
 
 
 
=== SQL Database ===
 
If you are running the MySQL database on the same server as the Apache web server the defaults should work with no changes:
 
 
 
// Hostname of the MySQL database
 
$CDASH_DB_HOST = 'localhost';
 
 
// Login for MySQL database access
 
$CDASH_DB_LOGIN = 'root';
 
 
// Password for MySQL database access
 
$CDASH_DB_PASS = '';
 
 
// Name of the MySQL database
 
$CDASH_DB_NAME = 'cdash';
 
 
 
If you have just installed MySQL don't forget to start it:
 
 
 
rcmysql start
 
 
 
=== PostgreSQL Database ===
 
If you are running the PostGreSQL database read the previous MySQL section about configuring the database access.
 
You will also need to tell CDash to use PostgreSQL driver:
 
 
 
  // Database type (empty means mysql)
 
  $CDASH_DB_TYPE = 'pgsql';
 
 
 
Here is list of packages necessary on ubuntu
 
 
 
  sudo apt-get install php-pear
 
  sudo pecl install pdo
 
  sudo apt-get install php5-dev
 
  sudo pecl install pdo
 
  sudo pecl install pdo_pgsql
 
 
 
=== Email ===
 
You should probably edit the default email addresses:
 
 
 
// Default from email
 
$CDASH_EMAILADMIN = 'admin@cdash.org';
 
$CDASH_EMAIL_FROM = 'admin@cdash.org';
 
$CDASH_EMAIL_REPLY = 'noreply@cdash.org';
 
 
=== Backup directory ===
 
The backup/log directory by default is placed in <tt>.../CDash/backup</tt>, this must be made writable by the account that you run Apache under (typically wwwrun), you can move the directory via:
 
 
 
// Backup directory
 
$CDASH_BACKUP_DIRECTORY = 'backup';
 
 
 
=== Cookie expiration time ===
 
As of CDash 1.2 the login cookie time can be set in the config.php. The default is set to 1 hour.
 
 
 
// Duration of the cookie session (in seconds)
 
$CDASH_COOKIE_EXPIRATION_TIME = '3600'
 
 
 
This allows the browser to remember the login/password of the user.
 
'''On a public computer it is recommended to always log out'''
 
 
 
=== Google Maps ===
 
CDash can use [http://code.google.com/apis/maps/ Google maps] to display the location of submission sites. CDash comes with Kitware's key code which won't work for your site's URL. Every site that uses Google maps requires its own [http://code.google.com/apis/maps/signup.html Google maps key] which you should obtain from Google (it's free), use this style URL when applying for a key:
 
  
http://mysite.org/CDash
+
=== Stable Release ===
 +
The '''current stable release of CDash is 2.6.0''' you can either download it as a zip archive
 +
* [https://github.com/Kitware/CDash/archive/v2.6.0.zip CDash-2.6.0.zip]
 +
* or as a tag from the [https://github.com/Kitware/CDash.git git repository]:
 +
  git clone https://github.com/Kitware/CDash.git
 +
  git checkout v2.6.0-prebuilt
  
Paste your newly obtained key in place of Kitware's:
+
==== Previous versions of CDash ====
 +
* '''2.4''': [http://public.kitware.com/Wiki/File:CDash-2-4-0.zip CDash-2.4.0.zip] or git checkout v2.4.0
 +
* '''2.2''': [http://www.cdash.org/download/CDash-2.2.2.zip CDash-2.0.2.zip] or git checkout Release-2-2-2
 +
* '''2.0''': [http://www.cdash.org/download/CDash-2.0.2.zip CDash-2.0.2.zip] or git checkout Release-2-0-2
 +
* '''1.8''': [http://www.cdash.org/download/CDash-1.8.2.zip CDash-1.8.2.zip] or git checkout Release-1-8-2
 +
* '''1.6''': [http://www.cdash.org/download/CDash-1.6.4.zip CDash-1.6.4.zip] or git checkout Release-1-6-4
 +
* '''1.4''': [http://www.cdash.org/download/CDash-1.4.1.zip CDash-1.4.2.zip] or git checkout Release-1-4-2
 +
* '''1.2''': [http://www.cdash.org/download/CDash-1.2.1.zip CDash-1.2.1.zip] or git checkout Release-1-2-1
 +
* '''1.0''': [http://www.cdash.org/download/CDash-1.0.zip CDash-1.0.zip] or git checkout Release-1-0-2
 +
* '''0.8''': [http://www.cdash.org/download/CDash-0.8.zip CDash-0.8.zip] or git checkout Release-0-8
  
$CDASH_GOOGLE_MAP_API_KEY['localhost'] = 'paste key here';
+
=== GIT Development version ===
  
If your submission machines use private IP addresses you can add default location information, e.g. for all machines in the 192.x.x.x network (use http://maps.google.com to obtain your location):
+
CDash uses [https://getcomposer.org/ composer] and [https://www.npmjs.com/ npm] to manage its 3rd party dependencies.
  
  $CDASH_DEFAULT_IP_LOCATIONS[] = array("IP" => "192.*","latitude" => "42.6612","longitude" => "-73.7689");
+
We provide two developments branches, <code>master</code> and <code>prebuilt</code>. If you're working with the <code>master</code> branch, then you have to run composer & npm yourself. The <code>prebuilt</code> branch has these dependencies already downloaded for you.
  
Sometimes site location are misreported (e.g. the ISP's location is used), you can override these:
+
==== master ====
  
$CDASH_DEFAULT_IP_LOCATIONS[] = array("IP" => "76.65.240.*","latitude" => "43.667","longitude" => "-79.417");
+
Use the <code>master</code> branch if you'd like to modify CDash or contribute to its development.
 +
git clone https://github.com/Kitware/CDash.git CDash
 +
git checkout master
 +
curl -sS https://getcomposer.org/installer | php
 +
php composer.phar install
 +
npm install
 +
node_modules/.bin/gulp
  
You'll probably want to replace the defaults that are present.
+
==== prebuilt ====
  
Note: If you use the 192.x.x.x address range ensure you update the location information before submitting from any machines in this subnet, as the location is stored in the database on first submission from a site (but can be subsequently edited from the admin web pages).
+
The <code>prebuilt</code> branch is a good choice if you'd like to use new features in CDash on a production server.
 +
git clone https://github.com/Kitware/CDash.git CDash
 +
git checkout prebuilt
  
=== Google Analytics ===
+
== Configuring CDash ==
CDash can use [http://www.google.com/analytics/ Google analytics] to monitor site usage. CDash's main <tt>index.php</tt> contains a reference to a default Kitware Google analytics code:
 
  
$CDASH_DEFAULT_GOOGLE_ANALYTICS='UA-701656-6';
+
Create <code>CDash/config/config.local.php</code> and specify the following database settings.
  
When you configure each project you will have the opportunity to set a per-project Google analytics code.
+
    // Hostname of the database server or name of unix socket
See [[CDash:Administration#Adding_Google_Analytics | Adding GoogleAnalytics]] for more information.
+
    $CDASH_DB_HOST = 'localhost';
 +
    // Login for database access
 +
    $CDASH_DB_LOGIN = 'root';
 +
    // Port for the database (leave empty to use default)
 +
    $CDASH_DB_PORT = '';
 +
    // Password for database access
 +
    $CDASH_DB_PASS = '';
 +
    // Name of the database
 +
    $CDASH_DB_NAME = 'cdash';
 +
    // Database type
 +
    $CDASH_DB_TYPE = 'mysql';
 +
    // Must be one of host, unix_socket
 +
    $CDASH_DB_CONNECTION_TYPE = 'host';
  
== RSS directory ==
+
This allows CDash to connect to your database server.
Ensure that the <tt>.../CDash/rss</tt> (and <tt>.../CDash/backup</tt>) directory is writable by the user account that Apache runs under (typically wwwrun).
 
  
== Apache ==
+
CDash can create a new database for you if you are using MySQL.  For Postgres, you have to create the new database yourself.
Ensure that the <tt>/srv/www/htdocs/CDash</tt> tree is accessible, you may have to add the following to your <tt>/etc/apache2/conf.d</tt> directory:
 
  
<tt>cdash.conf</tt>:
+
See [[CDash:Configuration]] for information about more configuration options.
 
<Directory /srv/www/htdocs/CDash>
 
    Order allow,deny
 
    Allow from all
 
</Directory>
 
  
You may need to restart Apache:
+
== Installing CDash ==
  
  rcapache2 restart
+
Only CDash's <code>public</code> subdirectory should be exposed to the web. There are two main ways to accomplish this:
  
== Creating database ==
+
# Create a symbolic link from <code>DocumentRoot</code> to <code>CDash/public</code>.
Access your website to start the install process:
+
# Configure <code>DocumentRoot</code> to point directly to <code>CDash/public</code>.
  
http://mywebsite.com/CDash
+
See [[CDash:Upgrade#Repository_Reorganization_Aftermath|Repository Reorganization Aftermath]] for more details and information.
  
The first step will confirm the host login and password for the database, the default admin account and password are also displayed, make a note of these as you'll need them later, as its easy to skip past this step missing them (you can always find them in <tt>.../CDash/sql/cdashdata.sql</tt>).
+
=== Permissions ===
  
== See Also ==
+
The web server user needs to have write access to the following directories:
[http://www.cdash.org/install.html The CDash web site's brief install instructions]
+
* CDash/backup
 +
* CDash/log
 +
* CDash/public/rss
 +
* CDash/public/upload

Revision as of 11:36, 20 November 2018

< CDash Main Page

CDash is a LAMP application, running on Apache using PHP to access a MySQL or PostgreSQL database.

System Requirements

CDash requires:

  • A web server (Apache, NGINX, IIS) with PHP (5.5.9+) and SSL enabled.
  • Access to a MySQL (5.x+) or PostgreSQL (8.3+) database server.

PHP needs to have the following modules enabled:

  • bcmath
  • cURL (for site statistics)
  • GD (for regression tests)
  • mbstring
  • pdo-mysql or pdo-postgresql
  • XSL

Downloading CDash

Stable Release

The current stable release of CDash is 2.6.0 you can either download it as a zip archive

 git clone https://github.com/Kitware/CDash.git
 git checkout v2.6.0-prebuilt

Previous versions of CDash

GIT Development version

CDash uses composer and npm to manage its 3rd party dependencies.

We provide two developments branches, master and prebuilt. If you're working with the master branch, then you have to run composer & npm yourself. The prebuilt branch has these dependencies already downloaded for you.

master

Use the master branch if you'd like to modify CDash or contribute to its development.

git clone https://github.com/Kitware/CDash.git CDash
git checkout master
curl -sS https://getcomposer.org/installer | php 
php composer.phar install
npm install
node_modules/.bin/gulp

prebuilt

The prebuilt branch is a good choice if you'd like to use new features in CDash on a production server.

git clone https://github.com/Kitware/CDash.git CDash
git checkout prebuilt

Configuring CDash

Create CDash/config/config.local.php and specify the following database settings.

   // Hostname of the database server or name of unix socket
   $CDASH_DB_HOST = 'localhost';
   // Login for database access
   $CDASH_DB_LOGIN = 'root';
   // Port for the database (leave empty to use default)
   $CDASH_DB_PORT = ;
   // Password for database access
   $CDASH_DB_PASS = ;
   // Name of the database
   $CDASH_DB_NAME = 'cdash';
   // Database type
   $CDASH_DB_TYPE = 'mysql';
   // Must be one of host, unix_socket
   $CDASH_DB_CONNECTION_TYPE = 'host';

This allows CDash to connect to your database server.

CDash can create a new database for you if you are using MySQL. For Postgres, you have to create the new database yourself.

See CDash:Configuration for information about more configuration options.

Installing CDash

Only CDash's public subdirectory should be exposed to the web. There are two main ways to accomplish this:

  1. Create a symbolic link from DocumentRoot to CDash/public.
  2. Configure DocumentRoot to point directly to CDash/public.

See Repository Reorganization Aftermath for more details and information.

Permissions

The web server user needs to have write access to the following directories:

  • CDash/backup
  • CDash/log
  • CDash/public/rss
  • CDash/public/upload