Versions Compared

Key

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

...

Now it’s time to run install.sh script. Go to /opt/rr3/

Code Block
./install.sh

What it does is downloading Doctrine, Zend-ACL, Geshi, XMLseclib and exctract them. Then you need to set required config files - you can copy templates and customize them. Stay in /opt/rr3/


Code Block
cp config-default.php -> config.php
cp config_rr-default.php -> config_rr.php
cp database-default.php -> database.php
cp email-default.php -> email.php
cp memcached-default.php -> memcached.php


Next we need to edit the configuration files we just coppied 

config.php

  • base_url

    Code Block
    $config['base_url'] = 'https://yourhost.example.com/rr3/';


  • index_page

    Code Block
    $config['index_page'] = '';


  • log_threshold - you decide what log level

  • log_path - set location for example:

    Code Block
    $config['log_path'] = '/var/log/rr3/';


  • encryption_key - you need to set encryption key. you can generate with

    Code Block
    tr -c -d '0123456789abcdefghijklmnopqrstuvwxyz' </dev/urandom | dd bs=32 count=1 2>/dev/null;echo


  • sess_driver


    Warning If you update jagger please change sess_driver from “native” to “files” as there was some changes in core CI 


    Code Block
    $config['sess_driver']                  = 'files';
    $config['sess_valid_drivers']   = array();
    $config['sess_cookie_name']             = 'ci_session';
    $config['sess_expiration']              = 7200;
    $config['sess_expire_on_close'] = FALSE;
    $config['sess_encrypt_cookie']  = FALSE;
    $config['sess_use_database']    = FALSE;
    $config['sess_table_name']              = 'ci_sessions';
    $config['sess_match_ip']                = FALSE;
    $config['sess_match_useragent'] = TRUE;
    $config['sess_time_to_update']  = 300;
    
    
  • csrf_protection - set to TRUE

    Code Block
    $config['csrf_protection'] = TRUE;
    $config['csrf_token_name'] = 'csrf_test_name';
    $config['csrf_cookie_name'] = 'csrf_cookie_name';
    $config['csrf_expire'] = 7200;
    $config['csrf_regenerate'] = FALSE;
    $config['csrf_exclude_uris'] = array();


  • standardize_newlines - in most cases set to TRUE
$config['standardize_newlines'] = TRUE;
  • enable composer autoloader - it always should be set to TRUE
$config['composer_autoload'] = TRUE;

config_rr.php

As template please use config_rr-default.php, make sure you have the above configurations:


Code Block
$config['pageTitlePref'] = 'Jagger:: ';

$config['syncpass'] = 'randomstring'; #syncpass - please generate strong key. It’s used by synchronization - interfederation tool generate with: tr -c -d '0123456789abcdefghijklmnopqrstuvwxyz' </dev/urandom | dd bs=32 count=1 2>/dev/null;echo

$config['rr_rm_member_from_fed'] = TRUE;

$config['autoregister_federated'] = FALSE; #Need to be TRUE in order to autoregister users from Community Tagging Access

$config['register_defaultrole'] = 'Member';

$config['Shib_required'] = array('Shib_mail','Shib_username');

$config['Shib_username'] = 'uid';

$config['Shib_mail'] = 'mail';

$config['Shib_fname'] = 'givenName';

$config['Shib_fname'] = 'sn';

$config['shibb_updatefullname'] = TRUE;

$config['Shibboleth']['loginapp_uri'] = 'auth/fedauth';
$config['Shibboleth']['logout_uri'] = '/Shibboleth.sso/Logout';
$config['Shibboleth']['enabled'] = TRUE;

$config['metadata_validuntil_days'] = '7';

$config['unsignedmeta_iplimits'] = array('127.0.0.1');

$config['policy_dropdown'] = array('0' => 'never', '1' => 'permit only if required', '2' => 'permit if required or desired');

$config['arp_cache_time'] = 1200;

$config['geocenterpoint'] = array('-9.126273968749956','38.684286647936936');

$config['memcached'] = array(
               'optional'=>array(
                      'hostname'  => 'localhost',
                      'port'      => '11211',
                      'weight'    => '1'
                      )
               );

$config['cacheprefix'] = 'rr3_';


email.php

Make sure you have the above at email.php

Code Block
$config['protocol'] = 'smtp';
$config['smtp_host'] = "SMTP_HOST";
$config['smtp_port'] = 25;
$config['charset'] = 'utf-8';
$config['crlf'] = "\r\n";
$config['newline'] = "\r\n";
$config['wordwrap'] = TRUE;
$config['useragent']='ResourceRegistr3';
$config['smtp_user'] = 'USER';
$config['smtp_pass'] = 'PASS';
$config['smtp_crypto'] = 'tls';


$config['mail_sending_active'] = TRUE;
$config['notify_if_provider_rm_from_fed'] = TRUE;
$config['notify_if_queue_rejected'] = TRUE;
$config['mail_subject_suffix'] = '[JAGGER]';

database.php


Code Block
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'CHANGEME';
$db['default']['password'] = 'CHANGEME';
$db['default']['database'] = 'CHANGEME';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


memcached.php

Code Block
$config = array(
       'default' => array(
               'hostname' => '127.0.0.1',
               'port'     => '11211',
               'weight'   => '1',
       ),
);


When you are done with the config files go to /opt/rr3/application


Populate tables of database 

Code Block
./doctrine orm:schema-tool:create
If you going to run application in production mode then you also need to regenerate proxies:
./doctrine orm:generate-proxies


Final Step

Edit config_rr.php file and set

Code Block
$config['rr_setup_allowed'] = TRUE;


Open page https://yourhost.example.com/rr3/setup and fill the form. This will create the admin user. Make sure to  set  back $config['rr_setup_allowed'] = FALSE; after you submit the admin user