This is the installation documentation for the registry software.
Prerequisites
PHP 5.1+ (5.2+ is better since we don't test using PHP 5.1 anymore). No 'unusual' modules are needed beyond the ones needed to support the database you're using, but you'll need mod_rewrite enabled for sure.
MySQL 5.0+ (All databases supported by Creole and Propel are theoretically supported, but we've only tested MySQL 5.0)
The Registry is currently running on shared hosting at Dreamhost. You can take a look at their PHP/Apache configuration to see what works for sure (definitely more modules than you need).
If you don't have immediate access to an Apache/MySQL/PHP setup and want to get started in a hurry, you can install WampServer or XAMPP for Windows. On the Mac, MAMP will get you a no-fuss self-contained install (assuming that you don't want to mess with Leopard's native Apache/PHP). These options have all been tested. There are also a few memory stick options that we haven't tested but should work: WOS (Webserver On a Stick) and The Uniform Server.
Installation
Checkout the project from the subversion repository.
The repository trunk is liable to be somewhat unstable, but we tag a release to production. You can check for the latest production tag here and install that into a subfolder in your webserver's docroot. We'll install into a subfolder called 'registry' throughout these instructions, but you can call it anything you want:
$ cd [docroot] $ svn co http://svn.metadataregistry.org/registry/registry/tags/01.080710 registry $ cd registry
Or you can just install the latest trunk:
$ cd [docroot] $ svn co http://svn.metadataregistry.org/registry/registry registry $ cd registry
Configuration
At this point, you should create an empty database in your MySQL instance. Throughout these instructions we'll be using swregistry for the name of the database.
There are 4 configuration files in two folders that must be renamed and edited to configure the Registry for your database:
registry/config/databases.yml-dist registry/config/propel.ini-dist registry/config/properties.ini-dist registry/apps/frontend/config/app.yml-dist
Rename each of these files to remove the '-dist' from the end.
You'll find a more detailed explanation of editing the database-related configuration files in the Symfony book's database configuration section
Edit databases.yml
Edit the following lines to match the database that you have setup:
host: localhost phptype: mysql username: LOGIN password: PASSWORD
Rename each of the lines containing the name of the database to match your database (by default swregistry).
Note that there are a number of possible running environments and each can have it's own database. By default, the system uses the prod environment:
prod:
propel:
param:
database: swregistry
Like Python, indentation in YML files is significant.
Edit propel.ini
Edit the following lines to match the database that you have setup, and the full path to your {{[docroot]/registry}}} folder:
propel.database.createUrl = mysql://localhost/ propel.database.url = mysql://login:password@localhost/swregistry ... ; directories propel.output.dir = %PATH_TO_YOUR_REGISTRY_INSTANCE_ROOT%
Edit properties.ini
This file doesn't need to be edited.
Edit app.yml
This file contains some site-specific configurations, and a few of these need to be edited before loading the database.
Edit the following lines:
admin_email: sysadmin@metadataregistry.org mysql_command: mysql db_load_filename: swregistry.sql
- admin_email should be set to the system contact email address
- mysql_command should be set to the path to the MySQL executable. If it's on your path, you can probably leave this as is.
- db_load_filename This is the name of the file that will create the database. There are two files: swregistry.sql and swregistry2.sql. swregistry.sql is a skeleton file that contains minimal data. swregistry2.sql is our full test file and is basically a copy of an early version of the complete Registry dataset. The default is the minimal set, so this may not need to be changed.
Initialize the Database
From the Registry's main folder run the following:
$ php symfony fix-perms $ php batch/load_test_db.php $ php symfony cc
This will fix the file permissions, init the database (NOTE: this will crudely overwrite the existing data), and clear the symfony cache.
Setup Web Server
Setup a virtual web server pointing to the registry/web folder as its root. For an Apache webserver, edit your httpd.conf file and add a virtual host:
NameVirtualHost *
<VirtualHost *>
ServerName registry
DocumentRoot "/[full path to]/registry/web"
DirectoryIndex index.php
<Directory "/[full path to]/registry/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Edit hosts
Edit your /etc/hosts file and add an entry for registry, pointing to your local IP address (127.0.0.1 for localhost). On Windows, this file will be probably be located at c:\windows\system32\drivers\etc\hosts.
Run It
Restart your webserver and point your browser to http://registry. You should see the front page of the Registry just as it looks at http://metadataregistry.org. Click on the 'Resource Owners' link and you should see an owner named 'Joe Admin', who is setup as the default administrator.
Add a New Admin
You can then login/create a new user for yourself, logout, login as Joe by using login:joeadmin, password:admin and make yourself a site administrator. The list of users is normally a bit hidden but is located at http://registry.dev/user/list.html and you'll need to go there to have Joe find your user profile to edit your status. This process could obviously be improved.
Add some stuff
If you installed the minimal database, there are no vocabularies, so you can go ahead and add some stuff.
The Code
If you want to modify the code, it will help if you spend some time with the symfony project. And if you'd like to commit code back to the project, we'd be delighted to have the help. Drop us an email so we can discuss.
Legalese
Much of the code is covered under one or more licenses but mostly under the broad and friendly symfony License. If you'd like to use the Registry code for commercial purposes, we would need to talk about that. Otherwise... This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
And of course...
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
