Setup Database
COmanage Registry is tested against PostgreSQL and MySQL, but should work against any database supported by CakePHP.
Note |
---|
title | Use InnoDB Storage Engine With MySQL |
---|
|
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: No Format |
---|
# Set default engine to InnoDB
default-storage-engine=InnoDB
|
(You can also set the storage engine on a per-session or per-table basis, see the MySQL documentation for details.) |
Create a new database for COmanage Registry. You can name the new database whatever you like since you will configure the Registry below with the name of the database.
Copy the file registry-source/app/Config/database.php.default
to registry-source/app/Config/database.php
.
Edit this file with your database connection information, including the password needed to connect to the database.
Note |
---|
|
Currently, the prefix value must be set to "cm_ ". (CO-174). |
Code Block |
---|
title | example database.php for MySQL |
---|
borderStyle | solid |
---|
|
var $default = array(
'driver' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'registry_user',
'password' => 'a good password goes here',
'database' => 'registry',
'prefix' => 'cm_',
);
|
Code Block |
---|
title | example database.php for PostgreSQL |
---|
borderStyle | solid |
---|
|
var $default = array(
'driver' => 'Database/Postgres',
'persistent' => false,
'host' => 'localhost',
'login' => 'registry_user',
'password' => 'a good password goes here',
'database' => 'registry',
'prefix' => 'cm_',
);
|
Install Database Schema
Set up the database schema.
Note |
---|
title | Integrating with Grouper? |
---|
|
If you plan to use Grouper as the group data store for Registry or you want to use Registry as a subject source with Grouper you must make configuration edits and execute some scripts now. Return here when finished configuring Registry integration with Grouper. |
Code Block |
---|
$ cd app
$ ./Console/cake database
[...]
Database schema update successful
|
Be careful with file ownerships here. You may need to run this command as the web server user or as root. Make sure the cache directory (wherever app/tmp
points to) and all of its subdirectories and files are writeable by the web server. chown -R
and chgrp -R
may be in order.