NetDRMS Installation » History » Version 350
Pablo Alingery, 31/01/2017 16:34
1 | 50 | Herve Ballans | {{toc}} |
---|---|---|---|
2 | 1 | Herve Ballans | |
3 | 322 | Pablo Alingery | h1. NetDRMS 8.11 Installation |
4 | 1 | Herve Ballans | |
5 | 276 | Herve Ballans | h2. Preliminary note |
6 | 275 | Herve Ballans | |
7 | 275 | Herve Ballans | In the following sections, when there is a command line : |
8 | 324 | Herve Ballans | <pre>#</pre>means that command is executed into _root_ user |
9 | 324 | Herve Ballans | <pre>$</pre>means that command is executed into _production_ user |
10 | 275 | Herve Ballans | |
11 | 333 | Herve Ballans | h2. Environment |
12 | 333 | Herve Ballans | |
13 | 343 | Herve Ballans | Server : DELL PowerEdge R730 |
14 | 343 | Herve Ballans | RAM : 64.00GB |
15 | 343 | Herve Ballans | CPU : 32 CPUs Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz |
16 | 345 | Herve Ballans | |
17 | 345 | Herve Ballans | Storage Configuration : |
18 | 344 | Herve Ballans | * 264 GB mounted in / (2 X 278.88 GB SAS 12G disks in RAID1) |
19 | 344 | Herve Ballans | * 1,7 TB mounted in /var/lib/postgresql (7 X 278.88 GB SAS 12G disks in RAID5 configuration) |
20 | 344 | Herve Ballans | * 1 global spare for both RAID |
21 | 344 | Herve Ballans | * DDP storage mounted in /SUM* |
22 | 343 | Herve Ballans | |
23 | 343 | Herve Ballans | Guest OS : Debian 8.4 |
24 | 343 | Herve Ballans | Kernel : Linux sdo-new 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) x86_64 GNU/Linux |
25 | 343 | Herve Ballans | |
26 | 1 | Herve Ballans | h2. Requirements |
27 | 1 | Herve Ballans | |
28 | 47 | Pablo Alingery | h3. Configuring production environment |
29 | 1 | Herve Ballans | |
30 | 284 | Herve Ballans | Adding user production |
31 | 47 | Pablo Alingery | |
32 | 1 | Herve Ballans | <pre> |
33 | 1 | Herve Ballans | # adduser production |
34 | 1 | Herve Ballans | # addgroup ias |
35 | 1 | Herve Ballans | # adduser production ias |
36 | 1 | Herve Ballans | </pre> |
37 | 1 | Herve Ballans | |
38 | 49 | Herve Ballans | h3. Configure /home/production/.profile |
39 | 1 | Herve Ballans | |
40 | 49 | Herve Ballans | Adding environment variables |
41 | 1 | Herve Ballans | |
42 | 1 | Herve Ballans | <pre> |
43 | 122 | Herve Ballans | #Modif Herve.B Pablo.A 12/05/2016 |
44 | 122 | Herve Ballans | |
45 | 1 | Herve Ballans | PATH="/usr/local/netdrms_current/bin/linux_x86_64:$PATH" |
46 | 49 | Herve Ballans | PATH="/usr/local/netdrms_current/scripts:$PATH" |
47 | 122 | Herve Ballans | PATH="/usr/local/jmd/bin:$PATH" |
48 | 122 | Herve Ballans | PATH="/usr/local/jmd/scripts:$PATH" |
49 | 141 | Pablo Alingery | #The following is not needed as installed with 'apt-get install' |
50 | 141 | Pablo Alingery | #PATH="/usr/local/pgsql/bin:$PATH" |
51 | 122 | Herve Ballans | PATH="/usr/local/netdrms-tools/scripts:$PATH" |
52 | 49 | Herve Ballans | #2014-12-17 Avec Herve et Pablo on pense que la ligne suivante est intutile as it is f.. install in /usr/local/lib |
53 | 140 | Pablo Alingery | PATH="/usr/local/cfitsio:$PATH" |
54 | 1 | Herve Ballans | #Done |
55 | 49 | Herve Ballans | |
56 | 122 | Herve Ballans | DERBY_HOME=/usr/local/jmd/databases/derby/derbyBD |
57 | 49 | Herve Ballans | export DERBY_HOME |
58 | 49 | Herve Ballans | |
59 | 49 | Herve Ballans | export CVSROOT=:pserver:anonymous@solarch.tuc.noao.edu:2401/vtarc1/vso/cvsroot |
60 | 49 | Herve Ballans | </pre> |
61 | 49 | Herve Ballans | |
62 | 162 | Pablo Alingery | h3. Configure /varl/lib/postgres/.profile |
63 | 161 | Pablo Alingery | |
64 | 163 | Pablo Alingery | Add to $PATH so postgres can exeute command like initdb |
65 | 161 | Pablo Alingery | |
66 | 161 | Pablo Alingery | <pre> |
67 | 161 | Pablo Alingery | #Modif Herve.B Pablo.A 19/05/2016 |
68 | 161 | Pablo Alingery | PATH="/usr/lib/postgresql/9.4/bin:$PATH" |
69 | 161 | Pablo Alingery | </pre> |
70 | 161 | Pablo Alingery | |
71 | 125 | Pablo Alingery | h3. Setting privileges for SUMS_MANAGER |
72 | 87 | Herve Ballans | |
73 | 126 | Pablo Alingery | Please modify file /etc/sudoers so user 'production' will be able to execute 'sum_chown' that we will locate in the dir : /usr/local/bin . See below |
74 | 125 | Pablo Alingery | Add to /etc/sudoers the following line : |
75 | 1 | Herve Ballans | production host=NOPASSWD:/usr/local/bin/sum_chmown |
76 | 1 | Herve Ballans | |
77 | 127 | Pablo Alingery | h3. Set passwords file for db postgres |
78 | 1 | Herve Ballans | |
79 | 127 | Pablo Alingery | Please create file .pgpass with the following information for user 'production" so he will be able to connect without password as 'production' or 'postgres' to 2 db that we will create later ias_sdo and ias_sdo_sums. |
80 | 1 | Herve Ballans | |
81 | 1 | Herve Ballans | |
82 | 1 | Herve Ballans | .pgpass content : |
83 | 1 | Herve Ballans | <pre> |
84 | 128 | Pablo Alingery | #hostname:5432:ias_sdo:production: |
85 | 128 | Pablo Alingery | #hostname:5434:ias_sdo_sums:production: |
86 | 128 | Pablo Alingery | #hostname:5432:ias_sdo:postgres: |
87 | 128 | Pablo Alingery | #hostname:5434:ias_sdo_sums:postgres |
88 | 1 | Herve Ballans | </pre> |
89 | 128 | Pablo Alingery | |
90 | 129 | Pablo Alingery | where #hostname is the name of your server |
91 | 129 | Pablo Alingery | |
92 | 129 | Pablo Alingery | |
93 | 131 | Pablo Alingery | %{color:red}WARNING : change hostname when migrate sdo-new to sdo% |
94 | 1 | Herve Ballans | |
95 | 133 | Pablo Alingery | h3. Install missing libraries |
96 | 1 | Herve Ballans | |
97 | 293 | Herve Ballans | * libreadline-dev (but already installed with postgresql) |
98 | 293 | Herve Ballans | * libssl-dev |
99 | 293 | Herve Ballans | * libpam0g-dev |
100 | 293 | Herve Ballans | * libperl-dev |
101 | 293 | Herve Ballans | * libnet-ssh-perl |
102 | 293 | Herve Ballans | * libstring-shellquote-perl |
103 | 296 | Herve Ballans | * libdbi-perl |
104 | 296 | Herve Ballans | * libdbd-pg-perl |
105 | 1 | Herve Ballans | |
106 | 133 | Pablo Alingery | NB : Already done in Debian 8.4 Jessy |
107 | 1 | Herve Ballans | <pre> |
108 | 1 | Herve Ballans | # apt-get install $library_name |
109 | 1 | Herve Ballans | </pre> |
110 | 1 | Herve Ballans | where |
111 | 1 | Herve Ballans | _$library_name_ is the name of library |
112 | 19 | Pablo Alingery | |
113 | 1 | Herve Ballans | Then to update path on libraries, please type : |
114 | 1 | Herve Ballans | <pre> |
115 | 19 | Pablo Alingery | # ldconfig |
116 | 1 | Herve Ballans | </pre> |
117 | 1 | Herve Ballans | |
118 | 1 | Herve Ballans | h3. Reconfigure locale |
119 | 1 | Herve Ballans | |
120 | 1 | Herve Ballans | <pre> |
121 | 1 | Herve Ballans | # dpkg-reconfigure locales |
122 | 1 | Herve Ballans | </pre> |
123 | 1 | Herve Ballans | |
124 | 1 | Herve Ballans | select fr_FR.UTF8 UTF8 and unselect en_US.UTF-8 |
125 | 1 | Herve Ballans | |
126 | 1 | Herve Ballans | localedef -i en_US -f UTF-8 en_US.UTF-8 |
127 | 1 | Herve Ballans | |
128 | 1 | Herve Ballans | (see here : [[http://www.thomas-krenn.com/en/wiki/Perl_warning_Setting_locale_failed_in_Debian]]) |
129 | 1 | Herve Ballans | |
130 | 134 | Pablo Alingery | h3. Install gfortran packages |
131 | 1 | Herve Ballans | |
132 | 1 | Herve Ballans | <pre> |
133 | 1 | Herve Ballans | # apt-get install gfortran swig |
134 | 1 | Herve Ballans | </pre> |
135 | 1 | Herve Ballans | |
136 | 1 | Herve Ballans | h3. Installation of cfitsio library |
137 | 1 | Herve Ballans | |
138 | 135 | Pablo Alingery | In /usr/local dir |
139 | 135 | Pablo Alingery | |
140 | 135 | Pablo Alingery | Version 3.39 (currently on sdo : 3.24) |
141 | 1 | Herve Ballans | <pre> |
142 | 135 | Pablo Alingery | # wget ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3390.tar.gz |
143 | 1 | Herve Ballans | </pre> |
144 | 137 | Pablo Alingery | Untar and decompression |
145 | 1 | Herve Ballans | <pre> |
146 | 136 | Pablo Alingery | # tar -xzvf cfitsio3390.tar.gz |
147 | 1 | Herve Ballans | </pre> |
148 | 1 | Herve Ballans | |
149 | 139 | Pablo Alingery | Go into /usr/local and type |
150 | 1 | Herve Ballans | |
151 | 1 | Herve Ballans | su - root and : |
152 | 1 | Herve Ballans | <pre> |
153 | 1 | Herve Ballans | # ./configure --prefix=/usr/local |
154 | 1 | Herve Ballans | # make |
155 | 1 | Herve Ballans | # make install |
156 | 135 | Pablo Alingery | </pre> |
157 | 118 | Pablo Alingery | |
158 | 237 | Herve Ballans | h3. Installation des libraries libtar-dev, libcurl3-dev et libecpg-dev |
159 | 237 | Herve Ballans | |
160 | 237 | Herve Ballans | <pre> |
161 | 237 | Herve Ballans | apt-get install libtar libtar-dev |
162 | 237 | Herve Ballans | </pre> |
163 | 237 | Herve Ballans | |
164 | 238 | Pablo Alingery | Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev' |
165 | 238 | Pablo Alingery | libcurl4-openssl-dev is already the newest version |
166 | 237 | Herve Ballans | <pre> |
167 | 237 | Herve Ballans | apt-get install libcurl3-dev |
168 | 237 | Herve Ballans | </pre> |
169 | 237 | Herve Ballans | |
170 | 237 | Herve Ballans | <pre> |
171 | 237 | Herve Ballans | apt-get install libecpg-dev |
172 | 237 | Herve Ballans | </pre> |
173 | 237 | Herve Ballans | |
174 | 144 | Pablo Alingery | h3. Installation of apache2 and lib perl |
175 | 118 | Pablo Alingery | |
176 | 118 | Pablo Alingery | <pre> |
177 | 118 | Pablo Alingery | # apt-get install apache2 |
178 | 118 | Pablo Alingery | |
179 | 118 | Pablo Alingery | # apt-get install libjson-perl |
180 | 118 | Pablo Alingery | |
181 | 118 | Pablo Alingery | # apt-get install libapache2-mod-perl2 |
182 | 118 | Pablo Alingery | </pre> |
183 | 1 | Herve Ballans | |
184 | 183 | Herve Ballans | h3. Installation of postgresql |
185 | 1 | Herve Ballans | |
186 | 145 | Pablo Alingery | Into 'root' |
187 | 145 | Pablo Alingery | |
188 | 145 | Pablo Alingery | <pre> |
189 | 147 | Pablo Alingery | apt-get install postgresql-9.4 postgresql-client-9.4 |
190 | 145 | Pablo Alingery | </pre> |
191 | 145 | Pablo Alingery | |
192 | 213 | Herve Ballans | h3. Installation of python3 |
193 | 209 | Pablo Alingery | |
194 | 209 | Pablo Alingery | Into 'root' |
195 | 209 | Pablo Alingery | |
196 | 209 | Pablo Alingery | <pre> |
197 | 209 | Pablo Alingery | apt-get install python3 |
198 | 1 | Herve Ballans | </pre> |
199 | 210 | Pablo Alingery | |
200 | 211 | Pablo Alingery | Add some modules psycopg2 (postgres connector) and pySmartDL (Download manager) |
201 | 210 | Pablo Alingery | |
202 | 210 | Pablo Alingery | <pre> |
203 | 210 | Pablo Alingery | apt-get install python3-psycopg2 |
204 | 210 | Pablo Alingery | </pre> |
205 | 210 | Pablo Alingery | |
206 | 210 | Pablo Alingery | <pre> |
207 | 210 | Pablo Alingery | apt-get install python3-psycopg2 |
208 | 210 | Pablo Alingery | </pre> |
209 | 210 | Pablo Alingery | |
210 | 210 | Pablo Alingery | Add python3-pip for modules within python3 |
211 | 210 | Pablo Alingery | |
212 | 210 | Pablo Alingery | <pre> |
213 | 210 | Pablo Alingery | apt-get install python3-pip |
214 | 1 | Herve Ballans | </pre> |
215 | 212 | Pablo Alingery | |
216 | 212 | Pablo Alingery | <pre> |
217 | 212 | Pablo Alingery | pip3 install pySmartDL |
218 | 212 | Pablo Alingery | </pre> |
219 | 1 | Herve Ballans | |
220 | 213 | Herve Ballans | Both python2.7 and 3.4 versions are installed on the system. |
221 | 213 | Herve Ballans | By default, the python2.7 is used. |
222 | 213 | Herve Ballans | In order to change in 3.4 by default, type : |
223 | 213 | Herve Ballans | <pre> |
224 | 213 | Herve Ballans | update-alternatives --config python |
225 | 213 | Herve Ballans | </pre> |
226 | 209 | Pablo Alingery | |
227 | 1 | Herve Ballans | h3. Installation of sdo_scripts |
228 | 218 | Pablo Alingery | |
229 | 219 | Pablo Alingery | Install monitoring scripts for sdo |
230 | 218 | Pablo Alingery | |
231 | 218 | Pablo Alingery | <pre> |
232 | 268 | Pablo Alingery | rsync -av scripts production@sdo-new:/home/production/netdrms-tools/ |
233 | 218 | Pablo Alingery | </pre> |
234 | 218 | Pablo Alingery | |
235 | 349 | Herve Ballans | h3. lib64 symbolic link |
236 | 349 | Herve Ballans | |
237 | 349 | Herve Ballans | Creating lib64 link (lib64 does not exist on debian 8) |
238 | 349 | Herve Ballans | <pre> |
239 | 349 | Herve Ballans | # cd /usr |
240 | 349 | Herve Ballans | # ln -s lib/ lib64 |
241 | 349 | Herve Ballans | </pre> |
242 | 349 | Herve Ballans | |
243 | 349 | Herve Ballans | |
244 | 1 | Herve Ballans | h2. NetDRMS databases |
245 | 1 | Herve Ballans | |
246 | 156 | Pablo Alingery | into /var/lib/postgresql (hard mount point separated, 7 disks 15000 tr/min in raid5 in order to distribute read and write) |
247 | 1 | Herve Ballans | |
248 | 1 | Herve Ballans | <pre> |
249 | 158 | Pablo Alingery | # cd /var/lib/postgresql |
250 | 157 | Pablo Alingery | # mkdir data data_sums data_monitor |
251 | 157 | Pablo Alingery | # chown -R postgres:postgres * |
252 | 1 | Herve Ballans | </pre> |
253 | 1 | Herve Ballans | |
254 | 160 | Pablo Alingery | h3. Initialize 3 servers data, data_sums, data_monitor |
255 | 1 | Herve Ballans | |
256 | 159 | Pablo Alingery | Into postgres |
257 | 1 | Herve Ballans | <pre> |
258 | 1 | Herve Ballans | # su - postgres |
259 | 1 | Herve Ballans | |
260 | 1 | Herve Ballans | $ initdb --locale=C -D data -A md5 -W |
261 | 1 | Herve Ballans | (no password) |
262 | 2 | Herve Ballans | |
263 | 2 | Herve Ballans | Success. You can now start the database server using: |
264 | 2 | Herve Ballans | |
265 | 2 | Herve Ballans | postgres -D data |
266 | 2 | Herve Ballans | or |
267 | 2 | Herve Ballans | pg_ctl -D data -l logfile start |
268 | 2 | Herve Ballans | |
269 | 1 | Herve Ballans | |
270 | 1 | Herve Ballans | $ initdb --locale=C -D data_sums -A md5 -W |
271 | 2 | Herve Ballans | (no password) |
272 | 2 | Herve Ballans | |
273 | 2 | Herve Ballans | Success. You can now start the database server using: |
274 | 2 | Herve Ballans | |
275 | 2 | Herve Ballans | postgres -D data_sums |
276 | 2 | Herve Ballans | or |
277 | 2 | Herve Ballans | pg_ctl -D data_sums -l logfile start |
278 | 8 | Pablo Alingery | |
279 | 8 | Pablo Alingery | $ initdb --locale=C -D data_monitor -A md5 -W |
280 | 8 | Pablo Alingery | (no password) |
281 | 8 | Pablo Alingery | |
282 | 8 | Pablo Alingery | Success. You can now start the database server using: |
283 | 8 | Pablo Alingery | |
284 | 8 | Pablo Alingery | postgres -D data_monitor |
285 | 8 | Pablo Alingery | or |
286 | 8 | Pablo Alingery | pg_ctl -D data_monitor -l logfile start |
287 | 2 | Herve Ballans | </pre> |
288 | 2 | Herve Ballans | |
289 | 1 | Herve Ballans | |
290 | 1 | Herve Ballans | |
291 | 1 | Herve Ballans | Edition des fichiers postgresql.conf pour configurer les bons ports d'écoute : |
292 | 1 | Herve Ballans | listen_addresses = '*' |
293 | 1 | Herve Ballans | data -> port 5432 |
294 | 10 | Pablo Alingery | data_sums -> port 5434 |
295 | 1 | Herve Ballans | data_monitor -> port 5436 |
296 | 10 | Pablo Alingery | |
297 | 165 | Pablo Alingery | Edit files data*/pg_hba.conf : replace 'md5' by 'trust' |
298 | 1 | Herve Ballans | <pre> |
299 | 1 | Herve Ballans | #"local" |
300 | 1 | Herve Ballans | local all all trust |
301 | 1 | Herve Ballans | #"IPv4" |
302 | 1 | Herve Ballans | host all all trust |
303 | 1 | Herve Ballans | </pre> |
304 | 166 | Pablo Alingery | |
305 | 166 | Pablo Alingery | h3. Tunning postgres |
306 | 166 | Pablo Alingery | |
307 | 166 | Pablo Alingery | In file postgres.conf ( according to https://www.qwant.com/?q=Tunning+postgres+server+9.4+&client=firefox ) |
308 | 166 | Pablo Alingery | |
309 | 168 | Pablo Alingery | shared_buffer=4096MB %{color:red}So 1/12 of the total RAM memory available% |
310 | 1 | Herve Ballans | |
311 | 169 | Pablo Alingery | work_mem = 24MB |
312 | 168 | Pablo Alingery | |
313 | 168 | Pablo Alingery | maintenance_work_mem = 4096MB |
314 | 1 | Herve Ballans | |
315 | 169 | Pablo Alingery | wal_buffers = 16MB |
316 | 169 | Pablo Alingery | |
317 | 169 | Pablo Alingery | checkpoint_segments = 32 |
318 | 169 | Pablo Alingery | |
319 | 169 | Pablo Alingery | checkpoint_completion_target = 0.9 |
320 | 169 | Pablo Alingery | |
321 | 169 | Pablo Alingery | random_page_cost = 1.0 |
322 | 169 | Pablo Alingery | |
323 | 169 | Pablo Alingery | effective_cache_size = 16384MB so 1/4 of the max memory |
324 | 169 | Pablo Alingery | |
325 | 170 | Pablo Alingery | |
326 | 170 | Pablo Alingery | |
327 | 170 | Pablo Alingery | #log |
328 | 169 | Pablo Alingery | logging_collector = on |
329 | 169 | Pablo Alingery | log_directory = 'pg_log' |
330 | 169 | Pablo Alingery | log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, |
331 | 169 | Pablo Alingery | log_truncate_on_rotation = on # If on, an existing log file with the |
332 | 169 | Pablo Alingery | log_rotation_age = 1d # Automatic rotation of logfiles will |
333 | 170 | Pablo Alingery | client_min_messages = error |
334 | 170 | Pablo Alingery | log_min_messages = error |
335 | 170 | Pablo Alingery | log_min_duration_statement = 0 |
336 | 170 | Pablo Alingery | |
337 | 170 | Pablo Alingery | log_connections = on |
338 | 170 | Pablo Alingery | log_disconnections = on |
339 | 170 | Pablo Alingery | log_duration = off |
340 | 170 | Pablo Alingery | log_hostname = on |
341 | 170 | Pablo Alingery | log_line_prefix = '%t [%p]: %u@%h - %d :' |
342 | 170 | Pablo Alingery | |
343 | 170 | Pablo Alingery | track_counts = on |
344 | 170 | Pablo Alingery | autovacuum = on |
345 | 170 | Pablo Alingery | |
346 | 170 | Pablo Alingery | extra_float_digits = 3 |
347 | 170 | Pablo Alingery | |
348 | 177 | Pablo Alingery | h3. Start the 3 databases : |
349 | 1 | Herve Ballans | |
350 | 1 | Herve Ballans | <pre> |
351 | 1 | Herve Ballans | # su - postgres |
352 | 196 | Herve Ballans | $ cd /var/lib/postgresql |
353 | 172 | Pablo Alingery | $ pg_ctl -D data start |
354 | 172 | Pablo Alingery | $ pg_ctl -D data_sums start |
355 | 172 | Pablo Alingery | $ pg_ctl -D data_monitor start |
356 | 1 | Herve Ballans | </pre> |
357 | 174 | Pablo Alingery | |
358 | 1 | Herve Ballans | h3. Create the 3 databases : |
359 | 181 | Pablo Alingery | |
360 | 178 | Pablo Alingery | Into user 'postgres' |
361 | 1 | Herve Ballans | |
362 | 179 | Pablo Alingery | * createdb --locale C -E LATIN1 -T template0 ias_sdo |
363 | 179 | Pablo Alingery | * createdb --locale C -E LATIN1 -T template0 -p 5434 ias_sdo_sums |
364 | 179 | Pablo Alingery | * createdb --locale C -E LATIN1 -T template0 -p 5436 ias_sdo_monitor |
365 | 54 | Herve Ballans | |
366 | 182 | Herve Ballans | h3. Automatic startup |
367 | 182 | Herve Ballans | |
368 | 182 | Herve Ballans | Add following lines in the /etc/rc.local file : |
369 | 182 | Herve Ballans | |
370 | 182 | Herve Ballans | <pre> |
371 | 197 | Herve Ballans | su -l -c "/usr/lib/postgresql/9.4/bin/pg_ctl -D /var/lib/postgresql/data start" postgres |
372 | 197 | Herve Ballans | su -l -c "/usr/lib/postgresql/9.4/bin/pg_ctl -D /var/lib/postgresql/data_sums start" postgres |
373 | 197 | Herve Ballans | su -l -c "/usr/lib/postgresql/9.4/bin/pg_ctl -D /var/lib/postgresql/data_monitor start" postgres |
374 | 182 | Herve Ballans | </pre> |
375 | 182 | Herve Ballans | |
376 | 325 | Pablo Alingery | h3. Install additional modules |
377 | 327 | Pablo Alingery | |
378 | 326 | Pablo Alingery | We need dblink for triggers between db so let's install postgresql-contrib-9.4 |
379 | 325 | Pablo Alingery | |
380 | 325 | Pablo Alingery | <pre> |
381 | 326 | Pablo Alingery | root@sdo-new:~# apt-get install postgresql-contrib-9.4 |
382 | 325 | Pablo Alingery | </pre> |
383 | 325 | Pablo Alingery | |
384 | 328 | Pablo Alingery | Create extension dblink for each db |
385 | 328 | Pablo Alingery | ias_sdo |
386 | 325 | Pablo Alingery | <pre> |
387 | 328 | Pablo Alingery | root@sdo-new:$ psql ias_sdo -p5432 -U postgres |
388 | 328 | Pablo Alingery | psql (9.4.6) |
389 | 325 | Pablo Alingery | Type "help" for help. |
390 | 1 | Herve Ballans | |
391 | 328 | Pablo Alingery | ias_sdo=# CREATE EXTENSION dblink ; |
392 | 1 | Herve Ballans | CREATE EXTENSION |
393 | 328 | Pablo Alingery | </pre> |
394 | 1 | Herve Ballans | |
395 | 328 | Pablo Alingery | ias_sdo_sums |
396 | 328 | Pablo Alingery | <pre> |
397 | 328 | Pablo Alingery | root@sdo-new:$ psql ias_sdo -p5434 -U postgres |
398 | 328 | Pablo Alingery | psql (9.4.6) |
399 | 328 | Pablo Alingery | Type "help" for help. |
400 | 328 | Pablo Alingery | |
401 | 328 | Pablo Alingery | ias_sdo=# CREATE EXTENSION dblink ; |
402 | 328 | Pablo Alingery | CREATE EXTENSION |
403 | 328 | Pablo Alingery | </pre> |
404 | 328 | Pablo Alingery | |
405 | 328 | Pablo Alingery | ias_sdo_monitor |
406 | 328 | Pablo Alingery | <pre> |
407 | 328 | Pablo Alingery | root@sdo-new:$ psql ias_sdo -p5436 -U postgres |
408 | 328 | Pablo Alingery | psql (9.4.6) |
409 | 328 | Pablo Alingery | Type "help" for help. |
410 | 328 | Pablo Alingery | |
411 | 328 | Pablo Alingery | ias_sdo=# CREATE EXTENSION dblink ; |
412 | 328 | Pablo Alingery | CREATE EXTENSION |
413 | 325 | Pablo Alingery | </pre> |
414 | 325 | Pablo Alingery | |
415 | 330 | Pablo Alingery | To check the list of installed extensions type : |
416 | 330 | Pablo Alingery | <pre> |
417 | 330 | Pablo Alingery | ias_sdo=\dx |
418 | 332 | Herve Ballans | List of installed extensions |
419 | 332 | Herve Ballans | Name | Version | Schema | Description |
420 | 332 | Herve Ballans | ---------+---------+------------+-------------------------------------------------------------- |
421 | 332 | Herve Ballans | dblink | 1.1 | public | connect to other PostgreSQL databases from within a database |
422 | 332 | Herve Ballans | plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language |
423 | 332 | Herve Ballans | (2 rows) |
424 | 330 | Pablo Alingery | |
425 | 330 | Pablo Alingery | </pre> |
426 | 332 | Herve Ballans | |
427 | 332 | Herve Ballans | |
428 | 325 | Pablo Alingery | |
429 | 184 | Herve Ballans | h2. System tuning |
430 | 1 | Herve Ballans | |
431 | 187 | Herve Ballans | Current configuration : |
432 | 185 | Herve Ballans | <pre> |
433 | 185 | Herve Ballans | # sysctl -a |
434 | 185 | Herve Ballans | </pre> |
435 | 1 | Herve Ballans | |
436 | 187 | Herve Ballans | In the following file : |
437 | 185 | Herve Ballans | <pre> |
438 | 185 | Herve Ballans | # vi /etc/sysctl.conf |
439 | 185 | Herve Ballans | </pre> |
440 | 1 | Herve Ballans | |
441 | 188 | Herve Ballans | we change some values (default values are commented with '#') |
442 | 194 | Herve Ballans | |
443 | 195 | Herve Ballans | (resources links [[Links|here]]) |
444 | 194 | Herve Ballans | |
445 | 185 | Herve Ballans | <pre> |
446 | 191 | Herve Ballans | # Semaphore is a object that is used to control utilization of a particular process. |
447 | 191 | Herve Ballans | # kernel.sem = SEMMSL SEMMNS SEMOPM SEMMNI |
448 | 191 | Herve Ballans | # SEMMSL maximum number of semaphores per array (min 128) |
449 | 191 | Herve Ballans | # SEMMNS maximum semaphores system-wide |
450 | 191 | Herve Ballans | # SEMOPM maximum operations per semop call |
451 | 191 | Herve Ballans | # SEMMNI maximum arrays |
452 | 191 | Herve Ballans | #semop incresed from 32 (default value)operation to 100 (3rd value ) |
453 | 191 | Herve Ballans | # kernel.sem = 250 32000 32 128 |
454 | 191 | Herve Ballans | kernel.sem = 250 32000 100 128 |
455 | 191 | Herve Ballans | |
456 | 191 | Herve Ballans | In order to apply changes :#This sets the OS receive buffer size for all types of connections (default value 212992) |
457 | 191 | Herve Ballans | #net.core.rmem_default = 212992 |
458 | 191 | Herve Ballans | #net.core.rmem_max = 212992 |
459 | 191 | Herve Ballans | net.core.rmem_default = 33554432 |
460 | 191 | Herve Ballans | net.core.rmem_max = 33554432 |
461 | 191 | Herve Ballans | |
462 | 191 | Herve Ballans | #This is the OS send buffer size for all types of connections (212992 default value) |
463 | 191 | Herve Ballans | #net.core.wmem_default = 212992 |
464 | 191 | Herve Ballans | #net.core.wmem_max = 212992 |
465 | 191 | Herve Ballans | net.core.wmem_default = 33554432 |
466 | 191 | Herve Ballans | net.core.wmem_max = 33554432 |
467 | 191 | Herve Ballans | |
468 | 193 | Pablo Alingery | #TCP Autotuning setting. "The first value tells the kernel the minimum receive buffer for each TCP connection, and this buffer is always |
469 | 193 | Pablo Alingery | # allocated to a TCP socket, even under high pressure on the system. ... The second value specified tells the kernel the default receive |
470 | 193 | Pablo Alingery | # buffer allocated for each TCP socket. This value overrides the /proc/sys/net/core/rmem_default value used by other protocols. ... |
471 | 192 | Pablo Alingery | # The third and last value specified in this variable specifies the maximum receive buffer that can be allocated for a TCP socket." |
472 | 1 | Herve Ballans | #net.ipv4.tcp_rmem = 4096 87380 6291456 |
473 | 1 | Herve Ballans | net.ipv4.tcp_rmem = 10240 87380 33554432 |
474 | 1 | Herve Ballans | |
475 | 193 | Pablo Alingery | #TCP Autotuning setting. "This variable takes 3 different values which holds information on how much TCP sendbuffer memory space |
476 | 193 | Pablo Alingery | # each TCP socket has to use. Every TCP socket has this much buffer space to use before the buffer is filled up. Each of the three |
477 | 193 | Pablo Alingery | #values are used under different conditions. ... The first value in this variable tells the minimum TCP send buffer space available |
478 | 193 | Pablo Alingery | # for a single TCP socket. ... The second value in the variable tells us the default buffer space allowed for a single TCP socket to use. ... |
479 | 193 | Pablo Alingery | #The third value tells the kernel the maximum TCP send buffer space." |
480 | 191 | Herve Ballans | #net.ipv4.tcp_wmem = 4096 16384 4194304 |
481 | 191 | Herve Ballans | net.ipv4.tcp_wmem = 10240 87380 33554432 |
482 | 191 | Herve Ballans | |
483 | 191 | Herve Ballans | #Disable cache metrics so the initial conditions of the closed connections will not be saved to be used in near future connections |
484 | 191 | Herve Ballans | #net.ipv4.tcp_no_metrics_save = 0 |
485 | 191 | Herve Ballans | net.ipv4.tcp_no_metrics_save = 1 |
486 | 191 | Herve Ballans | |
487 | 1 | Herve Ballans | # Increase number of incoming connections backlog |
488 | 1 | Herve Ballans | # net.core.netdev_max_backlog = 1000 |
489 | 1 | Herve Ballans | net.core.netdev_max_backlog = 5000 |
490 | 1 | Herve Ballans | |
491 | 1 | Herve Ballans | # The tcp_mem variable defines how the TCP stack should behave when it comes to memory usage. ... |
492 | 192 | Pablo Alingery | #The first value specified in the tcp_mem variable tells the kernel the low threshold. |
493 | 192 | Pablo Alingery | #Below this point, the TCP stack do not bother at all about putting any pressure on the memory usage by different TCP sockets. ... |
494 | 193 | Pablo Alingery | #The second value tells the kernel at which point to start pressuring memory usage down. ... The final value tells the kernel how many |
495 | 193 | Pablo Alingery | # memory pages it may use maximally |
496 | 1 | Herve Ballans | # net.ipv4.tcp_mem = 1543347 2057796 3086694 |
497 | 191 | Herve Ballans | net.ipv4.tcp_mem = 786432 1048576 26777216 |
498 | 191 | Herve Ballans | |
499 | 192 | Pablo Alingery | # local port range that is used by TCP and UDP traffic to choose the local port. You will see in the parameters of this file two numbers: |
500 | 192 | Pablo Alingery | # The first number is the first local port allowed for TCP and UDP traffic on the server, the second is the last local port number. |
501 | 191 | Herve Ballans | # net.ipv4.ip_local_port_range = 32768 61000 |
502 | 191 | Herve Ballans | net.ipv4.ip_local_port_range = 1024 65535 |
503 | 191 | Herve Ballans | |
504 | 191 | Herve Ballans | # maximum number of sockets in TIME-WAIT to be held simultaneously. |
505 | 191 | Herve Ballans | # net.ipv4.tcp_max_tw_buckets = 262144 |
506 | 191 | Herve Ballans | net.ipv4.tcp_max_tw_buckets = 360000 |
507 | 1 | Herve Ballans | </pre> |
508 | 185 | Herve Ballans | |
509 | 191 | Herve Ballans | Then we run the following command to make our change take effect: |
510 | 191 | Herve Ballans | |
511 | 185 | Herve Ballans | <pre> |
512 | 185 | Herve Ballans | # sysctl -p |
513 | 185 | Herve Ballans | </pre> |
514 | 176 | Pablo Alingery | |
515 | 216 | Pablo Alingery | h2. JMD Installation |
516 | 215 | Herve Ballans | |
517 | 217 | Pablo Alingery | Download new JMD package build by Niles Oien 2016-04-07 following thoses actions : |
518 | 215 | Herve Ballans | |
519 | 215 | Herve Ballans | <pre> |
520 | 215 | Herve Ballans | cd /urs/local |
521 | 215 | Herve Ballans | |
522 | 215 | Herve Ballans | [oien@spsc-nso19-12 ~]$ ftp gong2.nso.edu |
523 | 215 | Herve Ballans | Name (gong2.nso.edu:oien): anonymous |
524 | 215 | Herve Ballans | Password: <---------------- use your email as the password |
525 | 215 | Herve Ballans | ftp> cd outgoing/oien |
526 | 215 | Herve Ballans | ftp> get pablo_jmd.tar.gz |
527 | 215 | Herve Ballans | ftp> quit |
528 | 215 | Herve Ballans | </pre> |
529 | 215 | Herve Ballans | |
530 | 215 | Herve Ballans | Install new JMD package following thoses actions |
531 | 215 | Herve Ballans | |
532 | 215 | Herve Ballans | <pre> |
533 | 215 | Herve Ballans | [oien@spsc-nso19-12 ~]$ gunzip -vf pablo_jmd.tar.gz |
534 | 215 | Herve Ballans | pablo_jmd.tar.gz: 8.3% -- replaced with pablo_jmd.tar |
535 | 215 | Herve Ballans | [oien@spsc-nso19-12 ~]$ tar xf pablo_jmd.tar |
536 | 215 | Herve Ballans | [oien@spsc-nso19-12 ~]$ cd pablo_jmd |
537 | 338 | Pablo Alingery | [oien@spsc-nso19-12 pablo_jmd]$ less README.txt |
538 | 215 | Herve Ballans | cd .. |
539 | 215 | Herve Ballans | mv jmd jmd_old |
540 | 215 | Herve Ballans | mv pablo_jmd jmd |
541 | 215 | Herve Ballans | </pre> |
542 | 215 | Herve Ballans | |
543 | 340 | Pablo Alingery | url provided by jsoc to download last JMD version http://vso.tuc.noao.edu/VSO/downloads/JMD |
544 | 339 | Pablo Alingery | |
545 | 266 | Herve Ballans | h2. Apache Configuration for JMD |
546 | 215 | Herve Ballans | |
547 | 215 | Herve Ballans | Configure webserver to request jsoc_fetch |
548 | 215 | Herve Ballans | (following the mail from nilesoien@gmail.com) |
549 | 215 | Herve Ballans | |
550 | 222 | Pablo Alingery | %{color:red}WARNING : change hostname when migrate sdo-new to sdo% |
551 | 222 | Pablo Alingery | |
552 | 220 | Pablo Alingery | config d 'apache2 fichier sdo-new.ias.u-psud.fr |
553 | 215 | Herve Ballans | <pre> |
554 | 215 | Herve Ballans | |
555 | 215 | Herve Ballans | <VirtualHost *:80> |
556 | 220 | Pablo Alingery | ServerName sdo-new.ias.u-psud.fr |
557 | 215 | Herve Ballans | ServerAdmin pablo.alingery@ias.u-psud.fr |
558 | 215 | Herve Ballans | #ErrorLog /var/log/apache2/error.log |
559 | 215 | Herve Ballans | DocumentRoot /var/www |
560 | 215 | Herve Ballans | |
561 | 215 | Herve Ballans | # Possible values include: debug, info, notice, warn, error, crit, |
562 | 215 | Herve Ballans | # alert, emerg. |
563 | 215 | Herve Ballans | LogLevel debug |
564 | 215 | Herve Ballans | |
565 | 215 | Herve Ballans | #CustomLog /var/log/apache2/VSO/access.log combined |
566 | 215 | Herve Ballans | |
567 | 215 | Herve Ballans | Alias /VSO/DRMS/cgi-bin/ "/home/production/netdrms-tools/scripts/cgi-bin/" |
568 | 215 | Herve Ballans | |
569 | 215 | Herve Ballans | <Location /VSO/DRMS/cgi-bin> |
570 | 215 | Herve Ballans | SetHandler perl-script |
571 | 215 | Herve Ballans | PerlResponseHandler ModPerl::Registry |
572 | 215 | Herve Ballans | PerlOptions +ParseHeaders |
573 | 215 | Herve Ballans | Options +ExecCGI |
574 | 215 | Herve Ballans | Order allow,deny |
575 | 215 | Herve Ballans | Allow from all |
576 | 215 | Herve Ballans | </Location> |
577 | 215 | Herve Ballans | </VirtualHost> |
578 | 215 | Herve Ballans | |
579 | 215 | Herve Ballans | </pre> |
580 | 215 | Herve Ballans | |
581 | 223 | Herve Ballans | Activate the new virtualhost and disable the default one : |
582 | 223 | Herve Ballans | <pre> |
583 | 225 | Herve Ballans | # a2ensite sdo-new.ias.u-psud.fr.conf |
584 | 225 | Herve Ballans | # a2dissite 000-default.conf |
585 | 225 | Herve Ballans | # service apache2 restart |
586 | 225 | Herve Ballans | </pre> |
587 | 225 | Herve Ballans | |
588 | 225 | Herve Ballans | Allow symlink for the cgi scripts dierctory in apache2.conf : |
589 | 225 | Herve Ballans | <pre> |
590 | 225 | Herve Ballans | <Directory /home/production/netdrms-tools/scripts/> |
591 | 225 | Herve Ballans | Options FollowSymLinks |
592 | 225 | Herve Ballans | AllowOverride None |
593 | 225 | Herve Ballans | Require all granted |
594 | 225 | Herve Ballans | </Directory> |
595 | 225 | Herve Ballans | </pre> |
596 | 225 | Herve Ballans | |
597 | 225 | Herve Ballans | <pre> |
598 | 225 | Herve Ballans | # service apache2 restart |
599 | 223 | Herve Ballans | </pre> |
600 | 223 | Herve Ballans | |
601 | 226 | Pablo Alingery | %{color:red}To be added futher to test cgi% |
602 | 1 | Herve Ballans | Execution test cgi with URL : |
603 | 226 | Pablo Alingery | |
604 | 226 | Pablo Alingery | make sure my $hostname=in the cgi file vso_jsoc_fetch.cgi is correct and test |
605 | 224 | Pablo Alingery | http://sdo-new.ias.u-psud.fr/VSO/DRMS/cgi-bin/vso_jsoc_fetch.cgi |
606 | 215 | Herve Ballans | |
607 | 215 | Herve Ballans | expected result : |
608 | 215 | Herve Ballans | <pre> |
609 | 215 | Herve Ballans | { |
610 | 215 | Herve Ballans | "wait" : 0, |
611 | 215 | Herve Ballans | "requestid" : "", |
612 | 215 | Herve Ballans | "data" : {}, |
613 | 215 | Herve Ballans | "method" : "url_quick", |
614 | 215 | Herve Ballans | "size" : 0, |
615 | 215 | Herve Ballans | "errormsg" : "Empty query", |
616 | 215 | Herve Ballans | "protocol" : "as-is", |
617 | 215 | Herve Ballans | "status" : 1, |
618 | 215 | Herve Ballans | "space_ratio" : 0.1, |
619 | 215 | Herve Ballans | "load_ratio" : 0.066875, |
620 | 215 | Herve Ballans | "dir" : "", |
621 | 215 | Herve Ballans | "count" : 0 |
622 | 215 | Herve Ballans | } |
623 | 215 | Herve Ballans | </pre> |
624 | 215 | Herve Ballans | |
625 | 267 | Herve Ballans | h2. JMD configuration |
626 | 267 | Herve Ballans | |
627 | 291 | Herve Ballans | Modify the file [[/usr/local/jmd/cfg/JMD.cfg]] |
628 | 267 | Herve Ballans | |
629 | 267 | Herve Ballans | |
630 | 271 | Herve Ballans | %{color:red}Warning : when migrate production server, change _sdo-new_ by _sdo_% |
631 | 271 | Herve Ballans | |
632 | 1 | Herve Ballans | h2. NetDRMS tool Install |
633 | 23 | Pablo Alingery | |
634 | 199 | Pablo Alingery | The following installed is based on : [[http://inf-redmine.ias.u-psud.fr/redmine/attachments/download/114/Netdrms_First_Install.odt]] |
635 | 1 | Herve Ballans | |
636 | 207 | Pablo Alingery | The sources are in : http://jsoc.stanford.edu/netdrms/dist/ |
637 | 207 | Pablo Alingery | Locally on sdo-new in : /home/production/sources |
638 | 1 | Herve Ballans | |
639 | 199 | Pablo Alingery | Symbolic link created 'netdrms_current' that corresponds to the last release |
640 | 350 | Pablo Alingery | <pre> |
641 | 350 | Pablo Alingery | ln -s netdrms_8.12/ netdrms_current |
642 | 350 | Pablo Alingery | </pre> |
643 | 199 | Pablo Alingery | Edit file config.local |
644 | 27 | Pablo Alingery | <pre> |
645 | 1 | Herve Ballans | cp config.local.template config.local |
646 | 1 | Herve Ballans | </pre> |
647 | 29 | Pablo Alingery | |
648 | 350 | Pablo Alingery | %{color:red}Warning WEB_DBUSER apache we think that it should value www maybe , to be checked testing the cgi% |
649 | 1 | Herve Ballans | %{color:red}So check the cgi to figure out which user is used to connect to bd% |
650 | 32 | Herve Ballans | |
651 | 199 | Pablo Alingery | Create 2 followings dirs : |
652 | 1 | Herve Ballans | <pre> |
653 | 350 | Pablo Alingery | mkdir /usr/local/netdrms_8.12/logs/SUM -p |
654 | 350 | Pablo Alingery | mkdir /usr/local/netdrms_8.12/logs/slony -p |
655 | 27 | Pablo Alingery | </pre> |
656 | 1 | Herve Ballans | |
657 | 205 | Pablo Alingery | %{color:red}Warning config.local from line 150 =>222 Remote config to provide data, series to externals% |
658 | 205 | Pablo Alingery | %{color:red}To be checked for PLATO% |
659 | 1 | Herve Ballans | |
660 | 1 | Herve Ballans | Création d'un alias netdrms dans /root/.bashrc |
661 | 27 | Pablo Alingery | <pre> |
662 | 1 | Herve Ballans | alias netdrms='cd /usr/local/netdrms_current' |
663 | 1 | Herve Ballans | </pre> |
664 | 31 | Pablo Alingery | |
665 | 1 | Herve Ballans | h3. Prepare compiling |
666 | 1 | Herve Ballans | |
667 | 252 | Herve Ballans | Into _production_ profile |
668 | 1 | Herve Ballans | |
669 | 246 | Herve Ballans | <pre> |
670 | 252 | Herve Ballans | $ ./configure |
671 | 246 | Herve Ballans | </pre> |
672 | 246 | Herve Ballans | |
673 | 347 | Pablo Alingery | |
674 | 350 | Pablo Alingery | Modification du fichier /usr/local/netdrms_current/build/jsoc_machine.csh (Same issue in NetDrms 8.12 ) |
675 | 347 | Pablo Alingery | |
676 | 347 | Pablo Alingery | ligne 28 : |
677 | 347 | Pablo Alingery | |
678 | 347 | Pablo Alingery | case "x86_64": |
679 | 347 | Pablo Alingery | echo linux_x86_64 |
680 | 347 | Pablo Alingery | breaksw |
681 | 347 | Pablo Alingery | |
682 | 347 | Pablo Alingery | Overwriting the existing files in the right place (base/sums/libs/pg) & modif in jsoc_machine.csh |
683 | 347 | Pablo Alingery | => the command 'make' works well. |
684 | 347 | Pablo Alingery | |
685 | 113 | Pablo Alingery | h3. Compilation |
686 | 113 | Pablo Alingery | |
687 | 249 | Herve Ballans | <pre> |
688 | 253 | Herve Ballans | $ make |
689 | 253 | Herve Ballans | $ make sums |
690 | 113 | Pablo Alingery | </pre> |
691 | 113 | Pablo Alingery | |
692 | 255 | Herve Ballans | h2. SSH-HPN install |
693 | 255 | Herve Ballans | |
694 | 258 | Herve Ballans | Intallation de openssh 7.2p2 car le dernier patch hpn dispo est 7.2hpn14.V10 |
695 | 255 | Herve Ballans | |
696 | 258 | Herve Ballans | web site for open ssh : http://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz |
697 | 258 | Herve Ballans | patch hpn : https://sourceforge.net/projects/hpnssh/files/HPN-SSH%2014v10%207.2p2/openssh-7_2_P2-hpn-14.10.diff |
698 | 255 | Herve Ballans | |
699 | 256 | Pablo Alingery | In the dir /home/production/sources into 'root' |
700 | 255 | Herve Ballans | |
701 | 255 | Herve Ballans | <pre> |
702 | 258 | Herve Ballans | # tar -xzvf openssh-7.2p2.tar.gz |
703 | 258 | Herve Ballans | # cd openssh-7.2p2/ |
704 | 258 | Herve Ballans | # cat ../openssh-7_2_P2-hpn-14.10.diff |patch -p1 |
705 | 255 | Herve Ballans | # ./configure --prefix=/usr/local/hpn-ssh --with-pam --with-md5-passwords --without-zlib-version-check --with-tcp-wrappers |
706 | 255 | Herve Ballans | # make |
707 | 255 | Herve Ballans | # make install |
708 | 255 | Herve Ballans | </pre> |
709 | 255 | Herve Ballans | |
710 | 255 | Herve Ballans | Depuis sdo : |
711 | 255 | Herve Ballans | <pre> |
712 | 255 | Herve Ballans | # cd /usr/local/hpn-ssh/etc/ |
713 | 259 | Herve Ballans | # rsync -av *key* production@sdo-new:/home/production/ |
714 | 255 | Herve Ballans | </pre> |
715 | 255 | Herve Ballans | |
716 | 273 | Herve Ballans | Following the link : http://vso.stanford.edu/netdrms/rmtsums.html |
717 | 1 | Herve Ballans | <pre> |
718 | 274 | Herve Ballans | $ cd /home/production/ |
719 | 273 | Herve Ballans | $ ssh-agent -c > ~/.ssh-agent_rs |
720 | 285 | Pablo Alingery | </pre> |
721 | 286 | Pablo Alingery | NB : correct file ~/.ssh-agent_rs it should look like : |
722 | 285 | Pablo Alingery | <pre> |
723 | 285 | Pablo Alingery | #!/bin/csh |
724 | 285 | Pablo Alingery | export SSH_AUTH_SOCK=/tmp/ssh-9POrTXobhLR4/agent.74272; |
725 | 285 | Pablo Alingery | export SSH_AGENT_PID=74273; |
726 | 285 | Pablo Alingery | echo Agent pid 74273; |
727 | 285 | Pablo Alingery | </pre> |
728 | 285 | Pablo Alingery | |
729 | 285 | Pablo Alingery | <pre> |
730 | 273 | Herve Ballans | $ source ~/.ssh-agent_rs |
731 | 273 | Herve Ballans | $ ssh-add ~/.ssh/id_rsa |
732 | 269 | Herve Ballans | </pre> |
733 | 269 | Herve Ballans | |
734 | 259 | Herve Ballans | Sur sdo-new : |
735 | 255 | Herve Ballans | <pre> |
736 | 260 | Herve Ballans | # mv /home/production/*key* /usr/local/hpn-ssh/etc/ |
737 | 255 | Herve Ballans | </pre> |
738 | 255 | Herve Ballans | |
739 | 255 | Herve Ballans | We have to configure the port number to 55000 |
740 | 255 | Herve Ballans | <pre> |
741 | 255 | Herve Ballans | # vi ssh_config |
742 | 255 | Herve Ballans | </pre> |
743 | 255 | Herve Ballans | |
744 | 255 | Herve Ballans | and add : |
745 | 255 | Herve Ballans | <pre> |
746 | 255 | Herve Ballans | #Port 22 |
747 | 255 | Herve Ballans | Port 55000 |
748 | 255 | Herve Ballans | </pre> |
749 | 255 | Herve Ballans | |
750 | 255 | Herve Ballans | We configure also the server hpn (even we don't use it yet) |
751 | 255 | Herve Ballans | <pre> |
752 | 255 | Herve Ballans | # vi sshd_config |
753 | 255 | Herve Ballans | </pre> |
754 | 255 | Herve Ballans | |
755 | 255 | Herve Ballans | and add : |
756 | 255 | Herve Ballans | <pre> |
757 | 255 | Herve Ballans | #Port 22 |
758 | 255 | Herve Ballans | Port 55000 |
759 | 255 | Herve Ballans | |
760 | 255 | Herve Ballans | #PidFile /var/run/sshd.pid |
761 | 255 | Herve Ballans | PidFile /var/run/sshd.55000.pid |
762 | 255 | Herve Ballans | |
763 | 255 | Herve Ballans | # allow the use of the none cipher |
764 | 255 | Herve Ballans | #NoneEnabled no |
765 | 255 | Herve Ballans | NoneEnabled yes |
766 | 255 | Herve Ballans | </pre> |
767 | 255 | Herve Ballans | |
768 | 265 | Herve Ballans | In order to force the use of SSH-hpn by JMD : |
769 | 265 | Herve Ballans | |
770 | 265 | Herve Ballans | <pre> |
771 | 265 | Herve Ballans | $ vi /usr/local/jmd/cfg/JMD.cfg |
772 | 265 | Herve Ballans | </pre> |
773 | 265 | Herve Ballans | |
774 | 265 | Herve Ballans | and replace the path of scp binary : |
775 | 265 | Herve Ballans | |
776 | 265 | Herve Ballans | <pre> |
777 | 265 | Herve Ballans | SCPCommand=/usr/local/hpn-ssh/bin/scp -o NoneSwitch=yes -o NoneEnabled=yes |
778 | 265 | Herve Ballans | </pre> |
779 | 265 | Herve Ballans | |
780 | 262 | Herve Ballans | h2. Private key Public key generation |
781 | 262 | Herve Ballans | |
782 | 262 | Herve Ballans | JSOC need your public key to directly connect to your netdrms server. In order to generate your RSA public/private key pair : |
783 | 262 | Herve Ballans | |
784 | 262 | Herve Ballans | <pre> |
785 | 262 | Herve Ballans | $ ssh-keygen -t rsa |
786 | 262 | Herve Ballans | </pre> |
787 | 262 | Herve Ballans | |
788 | 263 | Pablo Alingery | Not necessary in our case cause we recover the ssh keys of the current server 'sdo'. |
789 | 262 | Herve Ballans | |
790 | 262 | Herve Ballans | However, we have to retrieve the private key of production account on sdo-new |
791 | 262 | Herve Ballans | |
792 | 262 | Herve Ballans | From sdo : |
793 | 262 | Herve Ballans | <pre> |
794 | 262 | Herve Ballans | rsync -av id_rsa production@sdo-new:/home/production/.ssh/ |
795 | 262 | Herve Ballans | </pre> |
796 | 262 | Herve Ballans | |
797 | 300 | Herve Ballans | In order to test the connection : |
798 | 300 | Herve Ballans | <pre> |
799 | 300 | Herve Ballans | $ ssh jsocexp@jsocport.stanford.edu -p55000 |
800 | 300 | Herve Ballans | </pre> |
801 | 300 | Herve Ballans | |
802 | 301 | Herve Ballans | Note : the IP of the server has to be declared to the jsoc |
803 | 301 | Herve Ballans | |
804 | 299 | Pablo Alingery | h2. NetDRMS Replication Config |
805 | 112 | Herve Ballans | |
806 | 319 | Herve Ballans | %{color:red}To be check if we keep that here or not% |
807 | 311 | Pablo Alingery | To prevent from deleting files |
808 | 307 | Pablo Alingery | <pre> |
809 | 307 | Pablo Alingery | cd logs/SUM ; scp production@sdo:/usr/local/netdrms/install-config-files/sum_rm.cfg . |
810 | 112 | Herve Ballans | </pre> |
811 | 1 | Herve Ballans | |
812 | 1 | Herve Ballans | Create tmp dir in netdrms working directory (/usr/local/netdrms_current) |
813 | 112 | Herve Ballans | <pre> |
814 | 315 | Herve Ballans | $ mkdir tmp |
815 | 112 | Herve Ballans | </pre> |
816 | 112 | Herve Ballans | |
817 | 308 | Pablo Alingery | Create config file from template |
818 | 112 | Herve Ballans | <pre> |
819 | 315 | Herve Ballans | $ cd base/drms/replication/etc |
820 | 313 | Pablo Alingery | cp repclient.template.cfg ias.repclient.cfg |
821 | 307 | Pablo Alingery | </pre> |
822 | 91 | Herve Ballans | |
823 | 316 | Herve Ballans | Define node in file : [[/usr/local/netdrms_current/base/drms/replication/etc/ias.repclient.cfg]] |
824 | 1 | Herve Ballans | |
825 | 309 | Pablo Alingery | In our case : |
826 | 94 | Herve Ballans | <pre> |
827 | 1 | Herve Ballans | node=IASprod |
828 | 319 | Herve Ballans | </pre> |
829 | 319 | Herve Ballans | |
830 | 341 | Pablo Alingery | There are 4 new fields in the new version of repclient (see Art mail June 11, 2016) |
831 | 335 | Herve Ballans | |
832 | 319 | Herve Ballans | <pre> |
833 | 320 | Herve Ballans | #kRSBaseURL=<base URL for all Slony services> |
834 | 334 | Herve Ballans | kRSBaseURL=http://jsoc.stanford.edu/cgi-bin/ajax |
835 | 320 | Herve Ballans | #kSubService=<URL of the subscription service> |
836 | 334 | Herve Ballans | kSubService=${kRSBaseURL}/request-subs.py |
837 | 320 | Herve Ballans | #kPubListService=<URL of the publication-list service> |
838 | 334 | Herve Ballans | kPubListService=${kRSBaseURL}/publist.py |
839 | 320 | Herve Ballans | #kSubXfer=<URL of the file transfer directory> |
840 | 334 | Herve Ballans | kSubXfer=http://jsoc.stanford.edu/subscription |
841 | 106 | Pablo Alingery | </pre> |
842 | 321 | Pablo Alingery | |
843 | 321 | Pablo Alingery | h2. NetDRMS Subsribe list Config |
844 | 321 | Pablo Alingery | |
845 | 321 | Pablo Alingery | Create config subscribe file from template |
846 | 321 | Pablo Alingery | <pre> |
847 | 321 | Pablo Alingery | $ cd base/drms/replication/etc |
848 | 321 | Pablo Alingery | cp subscribe_list.template.cfg ias.subscribe_list.cfg |
849 | 321 | Pablo Alingery | </pre> |
850 | 321 | Pablo Alingery | |
851 | 292 | Pablo Alingery | h2. TO BE DONE BEFORE MIGRATION |
852 | 1 | Herve Ballans | |
853 | 152 | Pablo Alingery | %{color:red} configure sytem taille buffer% |
854 | 152 | Pablo Alingery | |
855 | 155 | Pablo Alingery | %{color:red} swap désactivé ? discussion Stephane et Gilles% |
856 | 1 | Herve Ballans | |
857 | 1 | Herve Ballans | %{color:red}Test ssh connection to JSOC , NSO CFA before subcription and just after name sdo-new into sdo% |
858 | 317 | Pablo Alingery | %{color:red}Take old counter and place it in the same dir before migration% |