forked from talha433/Jagger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
175 lines (120 loc) · 5.32 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Requirements:
*) mysql > 5.1 (it should work with postgres etc but not tested)
*) PHP >= 5.3 with modules: php-apc, php5-cli, php5-curl, php5-mysql, php5-mcrypt, php-memcached
*) Apache >= 2.2 with enabled modules: rewrite, unique_id
*) Shibboleth-SP >= 2.4 - optional needed for federated access
*) Codeigniter framework 3.0 - it's not official release yet
from https://github.com/bcit-ci/CodeIgniter
please use develop branch or 3.0 if released
*) memcached
*) composer https://getcomposer.org/
*) optional - install gearman-php and gearnam-server
Lets presume you want to install Jagger in /usr/local/www-sites/rr3
1. download Jagger (ResourceRegistry3) repository into /usr/local/www-sites/rr3
2. download codeigniter develop branch from git repository
git://github.com/bcit-ci/CodeIgniter.git
into /opt/codeigniter
3. apache settings:
enabled modules: rewrite, unique_id
==========================================
Alias /rr3 /usr/local/www-sites/rr3
<Directory /usr/local/www-sites/rr3>
RewriteEngine On
RewriteBase /rr3
RewriteCond $1 !^(Shibboleth\.sso|index\.php|logos|signedmetadata|flags|images|app|schemas|fonts|styles|images|js|robots\.txt|pub|includes)
RewriteRule ^(.*)$ /rr3/index.php?/$1 [L]
</Directory>
<Directory /usr/local/www-sites/rr/application>
Order allow,deny
Deny from all
</Directory>
=========================================
php.ini :
memory_limit = 256M
max_execution_time = 60
and reload apache
4. create database in mysql and set permisions
mysql> create database rr CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> grant all on rr.* to rr@'localhost' identified by 'rr12';
mysql> flush privileges;
5. got to main folder run ./install.sh script
script will download third party software
6. go to /usr/local/www-sites/rr3
open application/config/config.php
and chaange
$config['base_url'] to base location like
'https://yousite/rr3'
then open application/config/database.php
and set user/pass/dbname you created
7. Modify /usr/local/www-sites/rr3/index.php
If file doesn't exist then copy it from codeigniter framework
*) you may need to add timezone on the top of file ex.
date_default_timezone_set('Europe/Dublin');
*) find line containing $system_path and set correct path to you system codeigniter
example: $system_path = '/opt/codeigniter/system';
8. Go to application folder and run composer install
It will download third party libs like Doctrine ans Zend-ACL
9. In config.php file don't forget add
$config['composer_autoload'] = TRUE;
10. populate database:
go to /usr/local/www-sites/rr3/application
then run
./doctrine orm:schema-tool:create
above command populate database with tables;
11. you may need to create "Proxies" directory in /usr/local/www-sites/rr3/application/models/
note: if you are RR3 developer, don't commit this directory.
Also if you are in production mode (you can set it in index.php)
Then you need generate proxyEntities from commmand line
go to /usr/local/www-sites/rr3/application
./doctrine orm:generate-proxies
12. populate basic informations:
open your site
https://YOUR_HOST/path_rr/setup
if you get error: Setup is disabled
then you need to open then open application/config/config_rr.php
and find $config['rr_setup_allowed'] and set to TRUE
remember to change back after setup
13. Signing metadata script. To run this script you will need
xmlsectool tool, JAVA installed, cert/key for signing metadata
it will sign circle metadata for each entity and federation and store into
/usr/local/www-sites/rr3/signedmetadata/(federation|provider)/${ENCODED_ENTITY_OR_FEDER}/metadata.xml
you can run this script for specific entity
example:
./script.sh provider encoded_entityID
how entityID is encoded you can find in {RR3}/applications/helpers/url_encoder_helper.php
####################################
#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-6-sun
# optional args
G=$1
H=$2
XMLSECTOOLDIR="/usr/local/tools/xmlsectool-1.1.5"
SIGNCERT="/usr/local/metadata-signer-cert/metadata-signer.crt"
SIGNKEY="/usr/local/metadata-signer-cert/metadata-signer.key"
SIGNPASS="YOUR_STRONG_PASS_FOR_PRV_KEY"
RR3_PATH="/usr/local/www-sites/rr3"
RR3_URL="https://YOUR_SITE/rr3_path/tools/sync_metadata/metadataslist";
Y=`tempfile`
cd ${XMLSECTOOLDIR}
if [ $G == "provider" ]; then
wget --no-check-certificate -O ${Y} ${RR3_URL}/${H}
else
wget --no-check-certificate -O ${Y} ${RR3_URL}
fi
for i in `cat ${Y}`; do
group=`echo $i|awk -F ";" '{ print $1 }'|tr -d ' '`
name=`echo $i|awk -F ";" '{ print $2 }'|tr -d ' '`
srcurl=`echo $i|awk -F ";" '{ print $3 }'|tr -d ' '`
#tempofileoutput="/tmp/${name}"
dstoutput="/opt/mware-shared/www-sites/webapps/rr3/signedmetadata/${group}/${name}"
if [ ! -d "/opt/mware-shared/www-sites/webapps/rr3" ]; then
exit 3
fi
if [ ! -d "$dstoutput" ]; then
mkdir -p $dstoutput
fi
${XMLSECTOOLDIR}/xmlsectool.sh --sign --certificate ${SIGNCERT} --key ${SIGNKEY} --keyPassword ${SIGNPASS} \
--outFile ${dstoutput}/metadata.xml --inUrl ${srcurl}
done
rm ${Y}
##################################