NetDRMS Installation » History » Version 8
Pablo Alingery, 03/08/2015 16:21
1 | 1 | Herve Ballans | {{>toc}} |
---|---|---|---|
2 | 1 | Herve Ballans | |
3 | 1 | Herve Ballans | h1. NetDRMS Installation |
4 | 1 | Herve Ballans | |
5 | 1 | Herve Ballans | h2. Requirements |
6 | 1 | Herve Ballans | |
7 | 1 | Herve Ballans | h3. Adding user production |
8 | 1 | Herve Ballans | |
9 | 1 | Herve Ballans | <pre> |
10 | 1 | Herve Ballans | # adduser production |
11 | 1 | Herve Ballans | # addgroup ias |
12 | 1 | Herve Ballans | # adduser production ias |
13 | 1 | Herve Ballans | </pre> |
14 | 1 | Herve Ballans | |
15 | 1 | Herve Ballans | h3. Configuring production environment |
16 | 1 | Herve Ballans | |
17 | 1 | Herve Ballans | TBD |
18 | 1 | Herve Ballans | |
19 | 1 | Herve Ballans | h3. sshagent to JSOC |
20 | 1 | Herve Ballans | |
21 | 1 | Herve Ballans | TBD |
22 | 1 | Herve Ballans | |
23 | 1 | Herve Ballans | h3. Mise en place de Privilèges pour le SUMS_MANAGER |
24 | 1 | Herve Ballans | |
25 | 1 | Herve Ballans | Veuillez modifier le fichier /etc/sudoers afin que le user 'production' puisse exécuter le programme sum_chown que nous placerons plus loin dans le répertoire :usr/local/bin. |
26 | 1 | Herve Ballans | Cela se fait en ajoutant au fichier la ligne suivante : |
27 | 1 | Herve Ballans | production host=NOPASSWD:/usr/local/bin/sum_chmown |
28 | 1 | Herve Ballans | |
29 | 1 | Herve Ballans | h3. Mise en place du fichier de mot de passe pour la base postgres |
30 | 1 | Herve Ballans | |
31 | 1 | Herve Ballans | Veuillez créer le fichier .pgpass contenant les informations nécessaires au user 'production" afin qu'il se connecte sans mot de passe, en tant que 'production' ou 'postgres' aux 2 bases que l'on créera plus loin ias_sdo et ias_sdo_sums. |
32 | 1 | Herve Ballans | |
33 | 1 | Herve Ballans | |
34 | 1 | Herve Ballans | .pgpass content : |
35 | 1 | Herve Ballans | <pre> |
36 | 1 | Herve Ballans | sol-sdo1:5432:ias_sdo:production: |
37 | 1 | Herve Ballans | sol-sdo1:5434:ias_sdo_sums:production: |
38 | 1 | Herve Ballans | sol-sdo1:5432:ias_sdo:postgres: |
39 | 1 | Herve Ballans | sol-sdo1:5434:ias_sdo_sums:postgres |
40 | 1 | Herve Ballans | </pre> |
41 | 1 | Herve Ballans | |
42 | 1 | Herve Ballans | h3. Install missing libraries |
43 | 1 | Herve Ballans | |
44 | 1 | Herve Ballans | • libreadline-dev (but already installed with postgresql) |
45 | 1 | Herve Ballans | • libssl-dev |
46 | 1 | Herve Ballans | • libpam0g-dev |
47 | 1 | Herve Ballans | • libperl-dev |
48 | 1 | Herve Ballans | |
49 | 1 | Herve Ballans | <pre> |
50 | 1 | Herve Ballans | # apt-get install $library_name |
51 | 1 | Herve Ballans | </pre> |
52 | 1 | Herve Ballans | where |
53 | 1 | Herve Ballans | _$library_name_ is the name of library |
54 | 1 | Herve Ballans | |
55 | 1 | Herve Ballans | Then : |
56 | 1 | Herve Ballans | <pre> |
57 | 1 | Herve Ballans | # ldconfig |
58 | 1 | Herve Ballans | </pre> |
59 | 1 | Herve Ballans | |
60 | 1 | Herve Ballans | |
61 | 1 | Herve Ballans | h3. Reconfigure locale |
62 | 1 | Herve Ballans | |
63 | 1 | Herve Ballans | <pre> |
64 | 1 | Herve Ballans | # dpkg-reconfigure locales |
65 | 1 | Herve Ballans | </pre> |
66 | 1 | Herve Ballans | |
67 | 1 | Herve Ballans | select fr_FR.UTF8 UTF8 and unselect en_US.UTF-8 |
68 | 1 | Herve Ballans | |
69 | 1 | Herve Ballans | localedef -i en_US -f UTF-8 en_US.UTF-8 |
70 | 1 | Herve Ballans | |
71 | 1 | Herve Ballans | (see here : [[http://www.thomas-krenn.com/en/wiki/Perl_warning_Setting_locale_failed_in_Debian]]) |
72 | 1 | Herve Ballans | |
73 | 1 | Herve Ballans | h3. Install missing packages |
74 | 1 | Herve Ballans | |
75 | 1 | Herve Ballans | <pre> |
76 | 1 | Herve Ballans | # apt-get install gfortran swig |
77 | 1 | Herve Ballans | </pre> |
78 | 1 | Herve Ballans | |
79 | 1 | Herve Ballans | h3. Installation of cfitsio library |
80 | 1 | Herve Ballans | |
81 | 1 | Herve Ballans | Vesrion 3.37 (currently on sdo : 3.24) |
82 | 1 | Herve Ballans | <pre> |
83 | 1 | Herve Ballans | # wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3370.tar.gz |
84 | 1 | Herve Ballans | </pre> |
85 | 1 | Herve Ballans | |
86 | 1 | Herve Ballans | Dés-archivage et décompression |
87 | 1 | Herve Ballans | <pre> |
88 | 1 | Herve Ballans | # tar -xzvf cfitsio3370.tar.gz |
89 | 1 | Herve Ballans | </pre> |
90 | 1 | Herve Ballans | |
91 | 1 | Herve Ballans | Placez vous dans le répertoire /home/production/cftisio |
92 | 1 | Herve Ballans | |
93 | 1 | Herve Ballans | su - root and : |
94 | 1 | Herve Ballans | <pre> |
95 | 1 | Herve Ballans | # ./configure --prefix=/usr/local |
96 | 1 | Herve Ballans | # make |
97 | 1 | Herve Ballans | # make install |
98 | 1 | Herve Ballans | </pre> |
99 | 1 | Herve Ballans | |
100 | 1 | Herve Ballans | h2. Installation of postgresql |
101 | 1 | Herve Ballans | |
102 | 1 | Herve Ballans | See the section : [[Test_Environment_-_Virtual_Machine_description#Manual-install-of-postgresql]] |
103 | 1 | Herve Ballans | |
104 | 1 | Herve Ballans | h2. NetDRMS databases |
105 | 1 | Herve Ballans | |
106 | 1 | Herve Ballans | on /DATABASES |
107 | 1 | Herve Ballans | |
108 | 1 | Herve Ballans | (Note : section 2.4 dans doc netdrms first install) |
109 | 1 | Herve Ballans | |
110 | 1 | Herve Ballans | <pre> |
111 | 1 | Herve Ballans | # mkdir data |
112 | 1 | Herve Ballans | # mkdir data_sums |
113 | 7 | Pablo Alingery | # mkdir data_monitor |
114 | 1 | Herve Ballans | # chown postgres:postgres data |
115 | 1 | Herve Ballans | # chown postgres:postgres data_sums |
116 | 7 | Pablo Alingery | # chown postgres:postgres data_monitor |
117 | 1 | Herve Ballans | </pre> |
118 | 1 | Herve Ballans | |
119 | 1 | Herve Ballans | h3. Initialisation des 2 serveurs data et data_sums |
120 | 1 | Herve Ballans | |
121 | 1 | Herve Ballans | En tant qu'utilisateur postgres |
122 | 1 | Herve Ballans | <pre> |
123 | 1 | Herve Ballans | # su - postgres |
124 | 1 | Herve Ballans | |
125 | 1 | Herve Ballans | $ initdb --locale=C -D data -A md5 -W |
126 | 1 | Herve Ballans | (no password) |
127 | 1 | Herve Ballans | |
128 | 2 | Herve Ballans | Success. You can now start the database server using: |
129 | 2 | Herve Ballans | |
130 | 2 | Herve Ballans | postgres -D data |
131 | 2 | Herve Ballans | or |
132 | 2 | Herve Ballans | pg_ctl -D data -l logfile start |
133 | 2 | Herve Ballans | |
134 | 2 | Herve Ballans | |
135 | 1 | Herve Ballans | $ initdb --locale=C -D data_sums -A md5 -W |
136 | 1 | Herve Ballans | (no password) |
137 | 2 | Herve Ballans | |
138 | 2 | Herve Ballans | Success. You can now start the database server using: |
139 | 2 | Herve Ballans | |
140 | 2 | Herve Ballans | postgres -D data_sums |
141 | 2 | Herve Ballans | or |
142 | 2 | Herve Ballans | pg_ctl -D data_sums -l logfile start |
143 | 2 | Herve Ballans | |
144 | 8 | Pablo Alingery | $ initdb --locale=C -D data_monitor -A md5 -W |
145 | 8 | Pablo Alingery | (no password) |
146 | 8 | Pablo Alingery | |
147 | 8 | Pablo Alingery | Success. You can now start the database server using: |
148 | 8 | Pablo Alingery | |
149 | 8 | Pablo Alingery | postgres -D data_monitor |
150 | 8 | Pablo Alingery | or |
151 | 8 | Pablo Alingery | pg_ctl -D data_monitor -l logfile start |
152 | 8 | Pablo Alingery | |
153 | 2 | Herve Ballans | |
154 | 1 | Herve Ballans | </pre> |
155 | 2 | Herve Ballans | |
156 | 2 | Herve Ballans | |
157 | 1 | Herve Ballans | |
158 | 1 | Herve Ballans | Edition des fichiers postgresql.conf pour configurer les bons ports d'écoute : |
159 | 1 | Herve Ballans | listen_addresses = '*' |
160 | 1 | Herve Ballans | data -> port 5432 |
161 | 1 | Herve Ballans | data_sums -> port 5434 |
162 | 1 | Herve Ballans | |
163 | 1 | Herve Ballans | Edition des fichiers data*/pg_hba.conf : remplacer md5 par trust |
164 | 1 | Herve Ballans | <pre> |
165 | 1 | Herve Ballans | #"local" |
166 | 1 | Herve Ballans | local all all trust |
167 | 1 | Herve Ballans | #"IPv4" |
168 | 1 | Herve Ballans | host all all trust |
169 | 1 | Herve Ballans | </pre> |
170 | 1 | Herve Ballans | |
171 | 1 | Herve Ballans | Démarrage des 2 bases : |
172 | 1 | Herve Ballans | |
173 | 1 | Herve Ballans | <pre> |
174 | 1 | Herve Ballans | # su - postgres |
175 | 1 | Herve Ballans | $ cd /DATABASES |
176 | 3 | Herve Ballans | $ pg_ctl -D data -l PG_LOGS/data start |
177 | 3 | Herve Ballans | $ pg_ctl -D data_sums -l PG_LOGS/data_sums start |
178 | 1 | Herve Ballans | </pre> |
179 | 1 | Herve Ballans | |
180 | 1 | Herve Ballans | createdb --locale C -E LATIN1 -T template0 ias_sdo |
181 | 1 | Herve Ballans | createdb --locale C -E LATIN1 -T template0 -p 5434 ias_sdo_sums |
182 | 1 | Herve Ballans | |
183 | 1 | Herve Ballans | h2. Installation de l'outil NetDRMS |
184 | 1 | Herve Ballans | |
185 | 1 | Herve Ballans | On se base sur la doc dipsonible ici : |
186 | 1 | Herve Ballans | |
187 | 1 | Herve Ballans | |
188 | 1 | Herve Ballans | Les sources sont dans : |
189 | 4 | Herve Ballans | /usr/local/netdrms_8.8/ |
190 | 1 | Herve Ballans | |
191 | 1 | Herve Ballans | (Pour comparaison avec le serveur en production, on copie également le dossier netdrms_2.4 de sdo) |
192 | 1 | Herve Ballans | |
193 | 1 | Herve Ballans | on créé un lien symbolique netdrms_current qui pointe sur la dernière release |
194 | 4 | Herve Ballans | ln -s netdrms_8.8/ netdrms_current |
195 | 1 | Herve Ballans | |
196 | 1 | Herve Ballans | Comparaison du fichier config.local.template avec le fichier config.local de la version 2.4 |
197 | 1 | Herve Ballans | |
198 | 1 | Herve Ballans | |
199 | 1 | Herve Ballans | Création d'un alias netdrms dans /root/.bashrc |
200 | 1 | Herve Ballans | <pre> |
201 | 1 | Herve Ballans | alis netdrms='cd /usr/local/netdrms_current' |
202 | 1 | Herve Ballans | </pre> |
203 | 1 | Herve Ballans | |
204 | 1 | Herve Ballans | h3. Modification du fichier /usr/local/netdrms_current/configure |
205 | 1 | Herve Ballans | |
206 | 1 | Herve Ballans | <pre> |
207 | 1 | Herve Ballans | # The system configuration for configure script |
208 | 1 | Herve Ballans | set PERLBIN = "/usr/bin/perl" |
209 | 1 | Herve Ballans | set PYBIN = "/usr/bin/python" |
210 | 1 | Herve Ballans | </pre> |
211 | 1 | Herve Ballans | |
212 | 1 | Herve Ballans | |
213 | 1 | Herve Ballans | h3. Modification du fichier /usr/local/netdrms_current/build/jsoc_machine.csh |
214 | 1 | Herve Ballans | |
215 | 1 | Herve Ballans | ligne 28 : |
216 | 1 | Herve Ballans | |
217 | 1 | Herve Ballans | <pre> |
218 | 1 | Herve Ballans | case "x86_64": |
219 | 1 | Herve Ballans | echo linux_x86_64 |
220 | 1 | Herve Ballans | </pre> |
221 | 1 | Herve Ballans | |
222 | 1 | Herve Ballans | |
223 | 1 | Herve Ballans | |
224 | 1 | Herve Ballans | h3. Copier /usr/local/netdrms_2.4_release/base/drms/apps/serverdefs.h dans /usr/local/netdrms_current/base/drms/apps |
225 | 1 | Herve Ballans | |
226 | 1 | Herve Ballans | |
227 | 1 | Herve Ballans | |
228 | 1 | Herve Ballans | h3. Modification du fichier /usr/local/netdrms_current/configure |
229 | 1 | Herve Ballans | |
230 | 1 | Herve Ballans | au lieu de $? en csh on va mettre plutot $status |
231 | 1 | Herve Ballans | |
232 | 1 | Herve Ballans | ligne 110 : |
233 | 1 | Herve Ballans | |
234 | 1 | Herve Ballans | <pre> |
235 | 1 | Herve Ballans | if ($status==0) |
236 | 1 | Herve Ballans | </pre> |
237 | 1 | Herve Ballans | |
238 | 4 | Herve Ballans | et ligne 123 : |
239 | 1 | Herve Ballans | |
240 | 1 | Herve Ballans | <pre> |
241 | 1 | Herve Ballans | if ($status==0) |
242 | 1 | Herve Ballans | </pre> |
243 | 1 | Herve Ballans | |
244 | 4 | Herve Ballans | Lancement : |
245 | 4 | Herve Ballans | <pre> |
246 | 4 | Herve Ballans | ./configure |
247 | 4 | Herve Ballans | </pre> |
248 | 1 | Herve Ballans | |
249 | 1 | Herve Ballans | |
250 | 1 | Herve Ballans | h3. Installation des libraries libtar-dev, libcurl3-dev et libecpg-dev |
251 | 1 | Herve Ballans | |
252 | 1 | Herve Ballans | <pre> |
253 | 4 | Herve Ballans | apt-get install libtar libtar-dev |
254 | 1 | Herve Ballans | </pre> |
255 | 1 | Herve Ballans | |
256 | 1 | Herve Ballans | <pre> |
257 | 1 | Herve Ballans | apt-get install libcurl3-dev |
258 | 1 | Herve Ballans | </pre> |
259 | 1 | Herve Ballans | |
260 | 1 | Herve Ballans | <pre> |
261 | 1 | Herve Ballans | apt-get install libecpg-dev |
262 | 1 | Herve Ballans | </pre> |
263 | 1 | Herve Ballans | |
264 | 1 | Herve Ballans | |
265 | 1 | Herve Ballans | h3. #H4ck 2 Malade #PabloR0cks# |
266 | 1 | Herve Ballans | |
267 | 1 | Herve Ballans | Modification du fichier /usr/include/stdint.h |
268 | 1 | Herve Ballans | |
269 | 1 | Herve Ballans | ligne 56 : long int remplacé par long long int |
270 | 1 | Herve Ballans | |
271 | 1 | Herve Ballans | "Allo Linus ?!?.." |
272 | 1 | Herve Ballans | |
273 | 1 | Herve Ballans | h3. Compilation |
274 | 1 | Herve Ballans | |
275 | 1 | Herve Ballans | <pre> |
276 | 1 | Herve Ballans | # make |
277 | 1 | Herve Ballans | # make sums |
278 | 1 | Herve Ballans | </pre> |
279 | 1 | Herve Ballans | |
280 | 5 | Pablo Alingery | NB : lib64 does not exist on debian 8. so ln -s /usr/lib lib64 |
281 | 1 | Herve Ballans | |
282 | 6 | Pablo Alingery | |
283 | 6 | Pablo Alingery | h2. make sums KO |
284 | 6 | Pablo Alingery | |
285 | 6 | Pablo Alingery | Solution found : Take old lib libcrypto instead libssl |
286 | 6 | Pablo Alingery | |
287 | 6 | Pablo Alingery | dans le fichier base/sums/apps/Rules.mk ligne 50 |
288 | 6 | Pablo Alingery | replace -lssl by -lcrypto LD flag |
289 | 6 | Pablo Alingery | |
290 | 6 | Pablo Alingery | |
291 | 6 | Pablo Alingery | |
292 | 1 | Herve Ballans | h2. TO BE DONE FURTHER |
293 | 6 | Pablo Alingery | |
294 | 6 | Pablo Alingery | |
295 | 6 | Pablo Alingery | |
296 | 1 | Herve Ballans | |
297 | 1 | Herve Ballans | h3. Modification du fichir config.local pour la souscription au jsoc |
298 | 1 | Herve Ballans | |
299 | 1 | Herve Ballans | <pre> |
300 | 1 | Herve Ballans | # NetDRMS users can request subdirectories from the Stanford proj directories |
301 | 1 | Herve Ballans | # (e.g., JSOC/proj/util). These users will need to contact Stanford and obtain |
302 | 1 | Herve Ballans | # the source subdirectories desired. They will then place these subdirectories |
303 | 1 | Herve Ballans | # in the JSOC/proj directory of their NetDRMS release. To properly build |
304 | 1 | Herve Ballans | # targets in these subdirectories, using the JSOC make system, the user needs |
305 | 1 | Herve Ballans | # to add entries to this configuration file - one entry for each subdirectory |
306 | 1 | Herve Ballans | # that contains source code to be compiled. Each entry is a space-separated pair |
307 | 1 | Herve Ballans | # of strings: the string "PROJDIR" followed by a subdirectory (of the proj |
308 | 1 | Herve Ballans | # directory). For example: |
309 | 1 | Herve Ballans | # |
310 | 1 | Herve Ballans | # PROJDIR util/apps |
311 | 1 | Herve Ballans | # PROJDIR util/libs |
312 | 1 | Herve Ballans | # |
313 | 1 | Herve Ballans | # NOTE: It is not sufficient to list only a parent directory, like util. Source code |
314 | 1 | Herve Ballans | # in child directories will not automatically be compiled. |
315 | 1 | Herve Ballans | </pre> |