jyby / repositorium

Document bootstrapping database with collective quality control
4 stars 5 forks source link

** Getting the source

Open a console and get the source

=git clone git://github.com/mquezadav/repositorium.git=

** Configuration

Then you’ll have a copy of the source at local.

Create the following folders and give these permissions (some of them already exist):

Copy =database.php.default= to =database.php=, and =core.php.default= to =core.php=, and =bootstrap.php.default= to =bootstrap.php= in =app/config=.

Edit =database.php=:

+BEGIN_SRC php

var $default = array(
    'driver' => 'mysql',
    'persistent' => false,
    'host' => '<HOST>',
    'login' => '<LOGIN>',
    'password' => '<PASSWORD>',
    'database' => '<DBNAME>',
    'prefix' => '',
);

+END_SRC

Change ==, ==, == and == (database name) to the correspoding values in your system

** Initial DB Dump

1) To load the dump file (=repositorium.sql=) with initial data (users: admin and anonymous). It contains no documents and no criteria.

=mysql -u -p < repositorium.sql=

2) Now you have 2 users: anonymous and admin. The admin user has the following atributes

3) Then add a criteria, and then some documents or users.

** Security

At =core.php= file (=app/config/=), at lines 204 and 209, randomly modify some alphanumeric characters of the corresponding Salt and Cypher Seed. Example:

=Configure::write('Security.salt', '');=

This changes’ll avoid keeping the same session at different app clones, and for security sake.