You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 35 Next »

Renaming In Progress

COmanage Gears is being renamed to COmanage Registry. Some paths have not yet been changed, and so you may still see some references to /gears.

Prerequisites

While COmanage Registry 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.

PCRE Bug May Cause Problems

There are known issues with earlier versions of the PCRE library that will cause COmanage Registry to be unable to set up its database tables. Version 6.6 and earlier are known to have problems, while versions 8.02 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.

Alternately, you may be able to rebuild PHP using its own internal copy of PCRE.

Web Server Setup

  • The web server should be configured to deliver content over HTTPS (via TLS/SSL).
  • Make sure the server is capable of rendering PHP
  • Make sure that the mod_rewrite module is enabled.

Checkout Source

Checkout the COmanage Registry source files somewhere into the file system. The location you put the files does not have to be the location from where the files are served by the web server. Create a symlink from the tag to registry-source:

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

Deploy

Deploy the COmanage Registry directory wherever you like. Note that the user that the web server runs as needs to be able to read all the files.

Configure your web server to deliver the registry at a suitable URL such as https://some-vo.org/registry. A simple strategy to accomplish this when running under the Apache web server is to create a symlink in the DocumentRoot named registry that points to the directory .../registry-source/app/webroot:

$ cd /var/www
$ ln -s /path/to/registry-source/app/webroot registry

You should verify that the web server will not deliver unprocessed files, especially configuration files such as the database configuration file (ie: https://some-vo.org/registry/app/config/database.php). By default, these files will not be delivered.

You'll most likely want to move the registry-source/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/registry. The easiest way to do this on a Unix-like system is to create a symlink to the new directory.

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

In order to integrate COmanage Registry with your authentication system, configure your Web server to protect the directory registry/app/webroot/auth/login. For example, under Apache your configuration may look something like

DocumentRoot /var/www
<Directory /var/www/registry/auth/login>
  AuthType shibboleth
  ShibRequestSetting requireSession 1
  require valid-user
</Directory>

Database Server Setup

COmanage Registry is tested against Postgres and MySQL, but should work against any database supported by CakePHP.

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:

# 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 Registry. You can name the new database whatever you like.

Make a copy of the file registry-source/app/config/database.php.default in that same directory named database.php. Set the configuration information, including the password to connect to the database with, in registry-source/app/config/database.php.

You will also need to configure the 'prefix' => option to be "cm_" until this has been fixed.

For COmanage Registry 0.3 and later

Set up the database schema.

$ cd cake/console
$ ./cake database
[...]
Database schema update successful

Upgrading From 0.1 to 0.3

Upgrading from 0.1 to 0.3 or later is not supported.

Upgrading Database Schemas Past 0.3

When upgrading the database schema (past 0.3) on Postgres, you may see "Possibly failed to update database schema" instead. This is probably OK. (CO-165)

For COmanage Registry 0.1 and 0.2

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

$ cd cake/console
$ sudo ./cake schema create -s 4
...
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.

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.

Upgrading from 0.1 to 0.2

Upgrading from 0.1 to 0.2 is not supported due to a structural change in the data model.

Initial Configuration

Run the initial configuration script. Be sure to enter the username that will be returned by your web server's authentication engine. For example, under Apache this corresponds to $REMOTE_USER.

$ cd cake/console
$ ./cake setup
Enter administrator's given name
> Pat
Enter administrator's family name
> Lee
Enter administrator's login username
> plee@university.edu

setup is intended to be run once. After you run it, you should be able to login via the web interface and make whatever changes you need that way. If you need to run it again, the easiest approach is to drop the database and start over.

  • No labels