Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

Upgrading? Please visit the page Upgrading Registry.


Info

Information on installation using containers (e.g. Docker) is available here.

Installation Steps

  1. PHP
  2. Web Server
  3. Download and Install Source
  4. Database
  5. Email
  6. Registry Setup Script
  7. Cron
  8. Testing
  9. Setting Up Your First CO

  10. QA and Production Tiers
  11. High availability (HA) considerations

Troubleshooting

  • The directory registry-source/ contains a .htaccess with necessary mod_rewrite directives. Not all Apache configurations by default allow configuration options within .htaccess files. Be sure that your Apache configuration has the necessary AllowOveride configuration to allow that .htaccess file to be processed (this is not the default on Debian Squeeze and other Linux distributions).
  • Following an upgrade, failure to login due to Auth.User.name doesn't exist may be due to caches that need to be cleared.
  • Messages like Warning (2): preg_match(): Compilation failed: unknown option bit(s) set at offset -1 [CORE/Cake/Utility/Validation.php, line 782] are indicative of a bad version of PCRE, described above.

Gears Components

While the architecture of COmanage Gears describes three separate components of COordinate (the backend system), COnsole (the web UI), and the REST COnnectors (for XML and JSON data transfers), the actual implementation is based on an MVC framework called CakePHP. As such, the technical implementation consists of one package, where the boundaries separating these three components is somewhat fuzzy. Roughly speaking, COnsole can be thought of as the HTML views and the REST COnnectors can be thought of as the XML and JSON views. While not strictly correct, this conceptualization is adequate for installation.

Prerequisites

While COmanage Gears is designed to work in a LAMP environment, the only required component is PHP. Other modern operating systems, web servers, and databases should all work. Configuration of these prerequisites is generally beyond the scope of this documentation.

PHP

PHP 5.2 or later is required. No special build options are currently required, other than support for whatever database you plan on using.

Warning
titlePCRE Bug May Cause Problems

There are known issues with earlier versions of the PCRE library that will cause COmanage Gears to be unable to set up its database tables. Version 6.6 and earlier are known to have problems, while versions 8.12 and later are known to work. You can check the version that PHP was built against by running this command:

php -r 'phpinfo();' | grep PCRE

If you are using an old version of PCRE, you'll first need to install a more recent version. Be sure to configure it with the --enable-utf8 --enable-unicode-properties flags. You'll then need to rebuild PHP against the newer version of the PCRE library.

Install Source

Download the COmanage Gears source files to your selected directory.

Code Block

$ svn co http://anonsvn.internet2.edu/svn/gears/tags/0.1a
$ ln -s 0.1a gears

Web Server Setup

The web server should operate under SSL. Make sure the server is capable of rendering PHP.

Install the COmanage Gears directory wherever you like, and configure your web server to deliver it at a suitable URL (such as https://site.edu/gearsImage Removed or https://gears.site.eduImage Removed). Specifically, set the web server to deliver gears/app/webroot as the document root.

You should verify that the web server will not deliver unprocessed files, especially configuration files such as the database configuration file (ie: https://site.edu/gears/app/config/database.phpImage Removed). By default, these files will not be delivered.

You'll most likely want to move the gears/app/tmp directory, since it is bad practice to have writable directories on the file system delivering web content. A reasonable alternative would be /var/cache/gears. The easiest way to do this on a Unix-like system is to create a symlink to the new directory.

Code Block

$ cd gears/app
$ sudo cp -r tmp /var/cache/gears
$ sudo chown -R $HTTPUSER /var/cache/gears
$ sudo chmod 700 /var/cache/gears
$ mv tmp tmp.not
$ ln -s /var/cache/gears tmp

Database Server Setup

If you are using MySQL, use the InnoDB storage engine, not MyISAM. To set this as the default storage engine on a Unix-like system, add the following to /etc/my.cnf and restart mysql before setting up the database tables:

Code Block

# Set default engine to InnoDB
default-storage-engine=InnoDB

(You can also set the storage engine on a per-session or per-table basis.)

Create a new database for COmanage Gears. You can name the new database whatever you like. Set the configuration information, including the password to connect to the database with, in app/config/database.php.

Set up the database schema. You will need permission to write to the tmp directory (set above) to run this command.

Code Block

$ cd cake/console
$ sudo ./cake schema create
...
The following table(s) will be dropped.
...
Are you sure you want to drop the table(s)? (y/n) 
[n] > n

The following table(s) will be created.
...
Are you sure you want to create the table(s)? (y/n) 
[y] > y
...
End create.

Use schema update to update an existing database.

Note

If you get the error message /path/to/app/config/schema/schema.php could not be loaded while trying to create the schema, you are running an old version of the PCRE library. See the warning earlier on this page for more information.

...