forked from eea/land.copernicus.plonebuildout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
175 lines (134 loc) · 6.97 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
==================================================
Plone 4 buildout for http://land.copernicus.eu
==================================================
.. contents ::
Buildout is a tool for easily creating identical development or production
environments. This tool gives you the right versions of Zope, Plone products
and python libraries to ensure that every installation gets exactly the same
configuration.
Everything is installed in a local folder. This prevents conflicts with
already existing python and zope packages. Nothing other than this folder
is touched, so the user doesn't need any special priviliges.
There are two configurations available for running this buildout:
1. one for developers (development)
2. one for production (deployment)
System requirements and preparation
===============================================
The buildout is intended to run on Linux/Unix-based operating systems. The
buildout has been used and tested on *Debian*, *Ubuntu* for development and *CentOS 5* and *CentoOS 6* for production.
The below system libraries must be installed on the server before you run the buildout. These must be globally
installed by the server administrator.
For CentOS, the EPEL and RPMForge repositories need to be configured before installing
the packages, since some of them are not included in the base repo.
All installs will require the basic GNU build and archive tools: gcc, g++, gmake, gnu tar, gunzip, bunzip2 and patch.
On Debian/Ubuntu systems, this requirement will be taken care of by installing build-essential. On RPM systems (RedHat, Fedora, CentOS), you'll need the gcc-c++ (installs most everything needed as a dependency) and patch RPMs.
================= =================== =============================
Debian/Ubuntu CentOS dependency for
================= =================== =============================
python 2.6 python 2.6 buildout
python-dev python-devel buildout
wget wget buildout
lynx lynx buildout
tar tar buildout
gcc gcc buildout
git > 1.8.3 git > 1.8.3 buildout
libc6-dev glibc-devel buildout
libxml2-dev libxml2-devel buildout
libxslt-dev libxslt-devel buildout
libsvn-dev subversion-devel buildout
libaprutil1-dev apr-util-devel buildout
wv wv http://wvware.sourceforge.net
poppler-utils poppler-utils pdftotext
libjpeg-dev libjpeg-devel Pillow
libsasl2-dev cyrus-sasl-devel OpenLDAP
readline-dev readline-devel buildout
build-essential make buildout
libz-dev which buildout
libssl-dev openssl-devel buildout
-- patch buildout
-- gcc-c++ buildout
================= =================== =============================
Additional info to install git for CentOS::
$ wget http://puias.math.ias.edu/data/puias/computational/6/x86_64/git-1.8.3.1-1.sdl6.x86_64.rpm
$ wget http://puias.math.ias.edu/data/puias/computational/6/i386/perl-Git-1.8.3.1-1.sdl6.noarch.rpm
$ yum update git-1.8.3.1-1.sdl6.x86_64.rpm perl-Git-1.8.3.1-1.sdl6.noarch.rpm
Run buildout for development
----------------------------
The first time you want to use this buildout you first have to get
all software from subversion and then run a few commands::
$ git clone [email protected]:eea/land.copernicus.plonebuildout.git
$ cd land.copernicus.plonebuildout
$ ./install.sh
$ ./bin/buildout -c development.cfg
This first three steps only have to be done the first time you use this
buildout. When you later want to update the site because people have committed
changes you do::
$ cd land.copernicus.plonebuildout
$ git pull -u
$ ./bin/develop rb
To start the application with ZEO support::
$ ./bin/zeoserver start
$ ./bin/www1 start
... and without ZEO support::
$ ./bin/instance start
Now we will have a running Plone buildout. The development buildout by default install ZEO
and two ZEO clients (*./bin/www1* and *./bin/www2*) plus one Zope instance that can be
used without ZEO support (*./bin/instance*).
Run buildout for production (deployment)
----------------------------------------
Some preliminary preparations must be done by system administrators on the deployment server:
* a user and user group called 'zope' should be created having neccesary rights
* the project folder must be created under /var/local/land.copernicus.plonebuildout with group owner zope and 2775 (rwxrwxr-x) mode
* add under /etc/profile:
::
if [ "`id -gn`" = "zope" ]; then
umask 002
fi
The first time you want to use the copernicus plonebuildout you have to run a
few commands (as user zope)::
$ cd /var/local
$ git clone [email protected]:eea/land.copernicus.plonebuildout.git
$ cd land.copernicus.plonebuildout
$ ./install.sh
$ ./bin/buildout -c deployment.cfg
$ chmod -R g+rw .
The above installation process will install and configure, in addition to
Zope and ZEO, the following:
* *Apache* basic configuration
* *Pound* for load balancing ZEO clients
* *Memcache*
* Daemon for sending *emails*
* *ZEO clients* - 2 instances
* *ZEO server*
Processes on production should be started with sudo, e.g::
$ sudo ./bin/memcached start
$ sudo ./bin/zeoserver start
$ sudo ./bin/www1 start
$ sudo ./bin/www2 start
$ sudo ./bin/poundctl start
For the application stack to be restarted when server reboot, the system
administrator should add under /etc/init.d the script from
/var/local/land.copernicus.plonebuildout/etc/rc.d/restart-portal, e.g.::
$ cd /var/local/land.copernicus.plonebuildout/etc/rc.d
$ ln -s `pwd`/restart-portal /etc/init.d/restart-portal
$ chkconfig --add restart-portal
$ service restart-portal start
Apache configuration file should be symlinked from
/var/local/land.copernicus.plonebuildout/etc/apache-vh.conf under
/etc/httpd/conf.d, this operation should be done by system
administrators, e.g.::
$ ln -s /var/local/land.copernicus.plonebuildout/etc/apache-vh.conf /etc/httpd/conf.d/land-copernicus-apache-vh.conf
User permissions
~~~~~~~~~~~~~~~~
On production server, system administrators should setup:
* umask 002 for all users
* all users members of 'zope' group
Database packing
~~~~~~~~~~~~~~~~
Packing is a vital regular maintenance procedure The Plone database does not automatically prune deleted content. You must periodically pack the database to reclaim space.
Data.fs should be packed daily via a cron job::
01 2 * * * /var/local/land.copernicus.plonebuildout/bin/zeopack
Portal Property for Google Maps Api Key
---------------------------------------
In ZMI -> portal_properties add a plone property sheet called geographical_properties and inside it add a new string property called google_key.
In this property you have to paste the API KEY, what you can generate at https://developers.google.com/maps/documentation/javascript/v2/introduction#Obtaining_Key