forked from gem/oq-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
82 lines (63 loc) · 3.61 KB
/
README
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
==== Requirements ====
* Operative System: GNU-Linux Ubuntu 12.04 (codename: Precise Pangolin)
* a user account within 'admin' group
* the 'git' package installed on the machine
* an internet connection
* an IP address or a public FQDN that will be use to address the machine from
the extern (we will call it <SITE_HOST>).
==== Installation ====
* open a terminal as normal user
* create a directory where download all repositories, for example: "geonode_stuff".
$ mkdir geonode_stuff
[ if you have private data csv file for instrumental catalog then create a directory
named 'private_data' into your 'geonode_stuff' directory and copy it as 'isc_data.csv' file ]
[ if you have a previous installation and you want migrate users to the new installation
you need to run on the previous installation as root:
$ sudo <oq-platform_repo>//oq-ui-api/bin/export-users.sh >users_data.json
and copy the 'users_data.json' file to your new machine into your 'geonode_stuff/private_data' directory. ]
* clone the oq-platform repository and move into the new repository with commands:
$ git clone git://github.com/gem/oq-platform.git
$ cd oq-platform
* checkout the required version of the script with the command
$ git checkout <version_name>
where <version_name> is the version that you want to install
* copy the oq-ui-api/bin/oq-platform-install.sh file into the previous created 'stuff' dir:
$ cp oq-ui-api/bin/oq-platform-install.sh ../geonode_stuff
* go into 'stuff' directory and run the installation script:
$ cd ../geonode_stuff
$ ./oq-platform-install.sh
NOTE: to run some parts the script require root access so it will ask your
password to
* the script will ask you:
+ "Public site url or public IP address ..."; you must
answer with the public name of the machine (see above) <SITE_HOST>
+ username for django administrator
+ password for django administrator
+ email for django administrator
* after the installation you can browse to "http://<SITE_HOST>" url to see
the local geonode homepage, to "http://<SITE_HOST>/geoserver" to see local geoserver
homepage.
**NOTE** the script will takes few minutes to finish, if you continuously see
new lines of log on the display you can fill safe.
==== Automatization ====
For development reasons is possible put all required informations for
the installation into a config file.
It must be located into the home directory of the installer user, the name must be
.oq-platform-install.conf and must be readable by the user only (use: chmod 600 <filename>).
The file must include SITE_HOST, GEM_DJANGO_SUSER, GEM_DJANGO_SPASS, GEM_DJANGO_SMAIL
variables assignments.
==== Enhance security with HTTPS protocol ====
After the installation you can increase your security using https instead of http protocol.
We provide a simple script to perform this task (and return to http, if required).
=== Requirements ===
* a folder named 'private_data'
* an ssl Certification Authority certificate 'oq-platform_CA.pem' into the 'private_data' folder
* an ssl key named 'oq-platform.key' into the 'private_data' folder
* an ssl certificate named 'oq-platform.crt' signed with te CA cert into the 'private_data' folder
NOTE: into your common name (CN) or into an "alternative name" must appear your machine name.
=== Howto ===
* cd into the parent directory of 'private-data'
* run sudo <oq-platform directory>/oq-ui-api/bin/oq-platform2https.sh http2https
=== Revert ===
To return to the previous http protocol:
* run sudo <oq-platform directory>/oq-ui-api/bin/oq-platform2https.sh revert