4
4
DIRAC Server Installation
5
5
=========================
6
6
7
+ .. set highlighting to python console input/output
8
+ .. highlight :: console
9
+
10
+
7
11
The procedure described here outlines the installation of the DIRAC components on a host machine, a
8
12
DIRAC server. There are two distinct cases of installations:
9
13
@@ -51,22 +55,22 @@ Requirements
51
55
default range if predefined ports are used, the port on which services are listening can be
52
56
configured by the DIRAC administrator)::
53
57
54
- iptables -I INPUT -p tcp --dport 9130:9200 -j ACCEPT
55
- service iptables save
58
+ $ iptables -I INPUT -p tcp --dport 9130:9200 -j ACCEPT
59
+ $ service iptables save
56
60
57
61
- DIRAC extensions that need specific services which are not an extension of DIRAC used
58
62
should better use ports 9201-9300 in order to avoid confusion. If this happens,
59
63
the procedure above should be repeated to include the new range of ports.
60
64
- For the server hosting the portal, ports 80 and 443 should be open and redirected to ports
61
65
8080 and 8443 respectively, i.e. setting iptables appropriately::
62
66
63
- iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
64
- iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
67
+ $ iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
68
+ $ iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
65
69
66
70
If you have problems with NAT or iptables you can use multipurpose relay *socat *::
67
71
68
- socat TCP4-LISTEN:80,fork TCP4:localhost:8080 &
69
- socat TCP4-LISTEN:443,fork TCP4:localhost:8443 &
72
+ $ socat TCP4-LISTEN:80,fork TCP4:localhost:8080 &
73
+ $ socat TCP4-LISTEN:443,fork TCP4:localhost:8443 &
70
74
71
75
- Grid host certificates in pem format;
72
76
- At least one of the servers of the installation must have updated CAs and CRLs files; if you want to install
@@ -94,39 +98,39 @@ the steps below. This procedure must be followed for the primary server and for
94
98
95
99
- As *root * create a *dirac * user account. This account will be used to run all the DIRAC components::
96
100
97
- adduser -s /bin/bash -d /home/dirac dirac
101
+ $ adduser -s /bin/bash -d /home/dirac dirac
98
102
99
103
- As *root *, create the directory where the DIRAC services will be installed::
100
104
101
- mkdir /opt/dirac
102
- chown -R dirac:dirac /opt/dirac
105
+ $ mkdir /opt/dirac
106
+ $ chown -R dirac:dirac /opt/dirac
103
107
104
108
- As *root *, check that the system clock is exact. Some system components are generating user certificate proxies
105
109
dynamically and their validity can be broken because of the wrong system date and time. Properly configure
106
110
the NTP daemon if necessary.
107
111
108
112
- As *dirac * user, create directories for security data and copy host certificate::
109
113
110
- mkdir -p /opt/dirac/etc/grid-security/
111
- cp hostcert.pem hostkey.pem /opt/dirac/etc/grid-security
114
+ $ mkdir -p /opt/dirac/etc/grid-security/
115
+ $ cp hostcert.pem hostkey.pem /opt/dirac/etc/grid-security
112
116
113
117
In case your host certificate is in the p12 format, you can convert it with::
114
118
115
- openssl pkcs12 -in host.p12 -clcerts -nokeys -out hostcert.pem
116
- openssl pkcs12 -in host.p12 -nocerts -nodes -out hostkey.pem
119
+ $ openssl pkcs12 -in host.p12 -clcerts -nokeys -out hostcert.pem
120
+ $ openssl pkcs12 -in host.p12 -nocerts -nodes -out hostkey.pem
117
121
118
122
Make sure the permissions are set right correctly, such that the hostkey.pem is only readable by the ``dirac`` user.
119
123
- As *dirac * user, create a directory or a link pointing to the CA certificates directory, for example::
120
124
121
- ln -s /etc/grid-security/certificates /opt/dirac/etc/grid-security/certificates
125
+ $ ln -s /etc/grid-security/certificates /opt/dirac/etc/grid-security/certificates
122
126
123
127
(this is only mandatory in one of the servers. Others can be synchronized from this one using DIRAC tools.)
124
128
125
129
- As *dirac * user download the install_site.sh script::
126
130
127
- mkdir /home/dirac/DIRAC
128
- cd /home/dirac/DIRAC
129
- curl -O https://raw.githubusercontent.com/DIRACGrid/management/master/install_site.sh
131
+ $ mkdir /home/dirac/DIRAC
132
+ $ cd /home/dirac/DIRAC
133
+ $ curl -O https://raw.githubusercontent.com/DIRACGrid/management/master/install_site.sh
130
134
131
135
132
136
----------------
@@ -191,9 +195,9 @@ In case the CA certificate is not coming from traditional sources (installed usi
191
195
you need to make sure the hash of that CA certificate is created. Make sure the CA certificate is located under
192
196
``/etc/grid-security/certificates ``, then do the following as root::
193
197
194
- cd /etc/grid-security/certificates
195
- openssl x509 -noout -in cert.pem -hash
196
- ln -s cert.pem hash.0
198
+ $ cd /etc/grid-security/certificates
199
+ $ openssl x509 -noout -in cert.pem -hash
200
+ $ ln -s cert.pem hash.0
197
201
198
202
where the output of the ``openssl `` command gives you the hash of the certificate ``cert.pem ``, and must be used for the
199
203
``hash.0 `` link name. Make sure the ``.0 `` part is present in the name, as this is looked for when starting the web server.
@@ -216,6 +220,10 @@ In addition to the root/admin user(s) the following users must be created, with
216
220
Primary server installation
217
221
---------------------------
218
222
223
+ .. set highlighting to none
224
+ .. highlight :: none
225
+
226
+
219
227
The installation consists of setting up a set of services, agents and databases for the
220
228
required DIRAC functionality. The SystemAdministrator interface can be used later to complete
221
229
the installation by setting up additional components. The following steps should
@@ -331,22 +339,28 @@ be taken based on the Python version you wish to install.
331
339
}
332
340
}
333
341
342
+ .. set highlighting to python console input/output
343
+ .. highlight :: console
344
+
334
345
or You can download the full server installation from::
335
346
336
- curl https://github.com/DIRACGrid/DIRAC/raw/integration/src/DIRAC/Core/scripts/install_full_py3.cfg -o install.cfg
347
+ $ curl https://github.com/DIRACGrid/DIRAC/raw/integration/src/DIRAC/Core/scripts/install_full_py3.cfg -o install.cfg
337
348
338
349
- Run install_site.sh giving the edited configuration file as the argument. The configuration file must have
339
350
.cfg extension (CFG file). While not strictly necessary, it's advised that a version is added with the '-v' switch
340
351
(pick the most recent one, see release notes in https://raw.githubusercontent.com/DIRACGrid/DIRAC/integration/release.notes)::
341
352
342
- ./install_site.sh install.cfg
353
+ $ ./install_site.sh install.cfg
343
354
344
355
Primary server installation (continued)
345
356
---------------------------------------
346
357
347
358
- If the installation is successful, in the end of the script execution you will see the report
348
359
of the status of running DIRAC services, e.g.::
349
360
361
+ .. set highlighting to python console input/output
362
+ .. highlight :: none
363
+
350
364
Name : Runit Uptime PID
351
365
Configuration_Server : Run 41 30268
352
366
Framework_SystemAdministrator : Run 21 30339
@@ -443,7 +457,7 @@ operation is the registration of the new host in the already functional Configur
443
457
444
458
- Now run install_site.sh giving the edited CFG file as the argument:::
445
459
446
- ./install_site.sh install.cfg
460
+ $ ./install_site.sh install.cfg
447
461
448
462
If the installation is successful, the SystemAdministrator service will be up and running on the
449
463
server. You can now set up the required components as described in :ref: `setting_with_CLI `
@@ -453,16 +467,26 @@ server. You can now set up the required components as described in :ref:`setting
453
467
Setting up DIRAC services and agents using the System Administrator Console
454
468
---------------------------------------------------------------------------
455
469
470
+ .. set highlighting to python console input/output
471
+ .. highlight :: console
472
+
473
+
456
474
To use the :ref: `system-admin-console `, you will need first to install the DIRAC Client software on some machine.
457
475
To install the DIRAC Client, follow the procedure described in the User Guide.
458
476
459
477
- Start admin command line interface using administrator DIRAC group::
460
478
461
- dirac-proxy-init -g dirac_admin
462
- dirac-admin-sysadmin-cli --host <HOST_NAME>
479
+ .. set highlighting to python console input/output
480
+ .. highlight :: console
481
+ $ dirac-proxy-init -g dirac_admin
482
+ $ dirac-admin-sysadmin-cli --host <HOST_NAME>
463
483
464
484
where the HOST_NAME is the name of the DIRAC service host
465
485
486
+ .. set highlighting to python console input/output
487
+ .. highlight :: none
488
+
489
+
466
490
- At any time you can use the help command to get further details::
467
491
468
492
dirac.pic.es >help
@@ -507,9 +531,9 @@ To change the components configuration parameters
507
531
508
532
- Use the comand line interface to the Configuration Service::
509
533
510
- $ dirac-configuration-cli
534
+ $ dirac-configuration-cli
511
535
512
536
- In the server all the logs of the services and agents are stored and rotated in
513
537
files that can be checked using the following command::
514
538
515
- tail -f /opt/dirac/startup/<System>_<Service or Agent>/log/current
539
+ $ tail -f /opt/dirac/startup/<System>_<Service or Agent>/log/current
0 commit comments