-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
2401 lines (1803 loc) · 75.1 KB
/
index.html
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>GridDB Quick Start Guide</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="title" content="GridDB Quick Start Guide"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2016-02-23T16:11+0900"/>
<meta name="author" content="root"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<STYLE type="text/css">
html { font-family: Verdana, Meiryo, sans-serif; font-size: 10pt; }
h2 { border-left: 7px solid #00C; padding: 0 0 0 7px; }
h3 { border-left: 5px solid #00A; padding: 0 0 0 5px; }
h4 { border-left: 3px solid #008; padding: 0 0 0 3px; }
pre {
font-family: courier, monospace;
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
width:auto;
overflow-x:auto;
overflow-y:hidden;
}
code {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #cacaea;
background-color: #f0f0ff;
border-radius: 3px;
}
a { text-decoration: none; color: #2233AA; }
a:visited { text-decoration: none; color: #2233AA; }
a:hover { text-decoration: underline; color: #2288FF; }
table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
margin-bottom: 6px;
}
th, tr, td {
vertical-align: top;
padding: 5px;
border-collapse: collapse;
}
tr > td:first-child {
white-space: nowrap;
}
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
#table-of-contents {
width: 23%;
height: 100%;
top: 0px;
left: 0px;
font-size: 70%;
position: fixed;
overflow: auto;
}
#table-of-contents ul {
margin: 1pt 0 1pt 1.5em;
padding: 0;
list-style-type: none;
}
#table-of-contents li {
margin: 1pt 0;
}
#content {
width: 76%;
float: right;
}
#postamble {
display: none;
}
.revision {
text-align: right;
font-size: 8pt;
}
@media print {
#table-of-contents {
width:100%;
font-size: 100%;
position: static;
overflow: visible;
}
#content {
padding: 0px;
width:100%;
float: none;
}
}
</STYLE>
</head>
<body>
<div id="preamble">
</div>
<div id="content">
<h1 class="title">GridDB Quick Start Guide</h1>
<p>
<p class="revision">Revision: revision-number</p>
</p>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Introduction</a>
<ul>
<li><a href="#sec-1-1">1.1 The Purpose and Structure of This Document</a></li>
<li><a href="#sec-1-2">1.2 What is GridDB</a>
<ul>
<li><a href="#sec-1-2-1">1.2.1 Overview</a></li>
<li><a href="#sec-1-2-2">1.2.2 Features</a></li>
</ul>
</li>
<li><a href="#sec-1-3">1.3 Description of Terms</a></li>
</ul>
</li>
<li><a href="#sec-2">2 System Design and Configuration</a>
<ul>
<li><a href="#sec-2-1">2.1 Make sure that required resources are available.</a>
<ul>
<li><a href="#sec-2-1-1">2.1.1 Total Memory Usage</a></li>
<li><a href="#sec-2-1-2">2.1.2 Number of Nodes Constituting a Cluster</a></li>
<li><a href="#sec-2-1-3">2.1.3 Disk Usage</a></li>
</ul>
</li>
<li><a href="#sec-2-2">2.2 Install and set up GridDB.(Node)</a>
<ul>
<li><a href="#sec-2-2-1">2.2.1 Confirming the Environment</a></li>
<li><a href="#sec-2-2-2">2.2.2 Installing a Node</a></li>
<li><a href="#sec-2-2-3">2.2.3 Confirmation After Installation</a></li>
<li><a href="#sec-2-2-4">2.2.4 Setting up an administrator user (Mandatory)</a></li>
</ul>
</li>
<li><a href="#sec-2-3">2.3 Configure environment-dependent parameters.</a>
<ul>
<li><a href="#sec-2-3-1">2.3.1 Configuration of the Network Environment (Mandatory)</a></li>
<li><a href="#sec-2-3-2">2.3.2 Setting the cluster name (mandatory)</a></li>
</ul>
</li>
<li><a href="#sec-2-4">2.4 configure tuning parameters.</a>
<ul>
<li><a href="#sec-2-4-1">2.4.1 Configuring Tuning Parameters</a></li>
<li><a href="#sec-2-4-2">2.4.2 Parameters Related to Performance and Availability</a></li>
<li><a href="#sec-2-4-3">2.4.3 Other Parameters</a></li>
</ul>
</li>
<li><a href="#sec-2-5">2.5 Distribute the definition file to each node</a></li>
<li><a href="#sec-2-6">2.6 Installing and Setting Up GridDB (Client)</a>
<ul>
<li><a href="#sec-2-6-1">2.6.1 Confirming the Environment</a></li>
<li><a href="#sec-2-6-2">2.6.2 Installing a client library</a></li>
<li><a href="#sec-2-6-3">2.6.3 Confirmation After Installation</a></li>
<li><a href="#sec-2-6-4">2.6.4 Setting Up Libraries</a></li>
<li><a href="#sec-2-6-5">2.6.5 Setting Up a Client</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-3">3 Operations</a>
<ul>
<li><a href="#sec-3-1">3.1 Operations from Starting to Stopping</a>
<ul>
<li><a href="#sec-3-1-1">3.1.1 Basic Flow</a></li>
<li><a href="#sec-3-1-2">3.1.2 Starting Each Node</a></li>
<li><a href="#sec-3-1-3">3.1.3 Configuring a Cluster</a></li>
<li><a href="#sec-3-1-4">3.1.4 Using a Service</a></li>
<li><a href="#sec-3-1-5">3.1.5 Stopping a Cluster</a></li>
<li><a href="#sec-3-1-6">3.1.6 Restarting a Stopped Cluster</a></li>
</ul>
</li>
<li><a href="#sec-3-2">3.2 Obtaining Various Information</a>
<ul>
<li><a href="#sec-3-2-1">3.2.1 Obtaining Cluster Information</a></li>
</ul></li>
</ul>
</li>
<li><a href="#sec-4">4 Notice</a></li>
<li><a href="#sec-5">5 Annex</a>
<ul>
<li><a href="#sec-5-1">5.1 Parameter List</a>
<ul>
<li><a href="#sec-5-1-1">5.1.1 Node definition file(gs_node.json)</a></li>
<li><a href="#sec-5-1-2">5.1.2 Cluster definition file(gs_cluster.json)</a></li>
</ul>
</li>
<li><a href="#sec-5-2">5.2 Build/execution method</a></li>
</ul>
</li>
<li><a href="#sec-6">6 Trademark</a></li>
</ul>
</div>
</div>
<DIV class="break"></DIV><BR>
<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Introduction</h2>
<div class="outline-text-2" id="text-1">
</div>
<div id="outline-container-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> The Purpose and Structure of This Document</h3>
<div class="outline-text-3" id="text-1-1">
<p>
<span style="text-decoration:underline;">This document describes basic operational procedures for GridDB(TM).</span>
</p>
<p>
This is intended for engineers working on system development using GridDB and administrators in charge of operations and maintenance of GridDB.
</p>
<p>
This document contains the following:
</p>
<ul>
<li><a href="#chap_system">System design and configuration</a>
<ul>
<li>Covers how to install and set up GridDB to make a basic environment.
</li>
</ul>
</li>
<li><a href="#chap_operation">Operations</a>
<ul>
<li>Covers basic operations, such as starting and stopping GridDB, management operations while running GridDB, and essential actions to be taken in the event of a failure.
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-1-2" class="outline-3">
<h3 id="sec-1-2"><span class="section-number-3">1.2</span> What is GridDB</h3>
<div class="outline-text-3" id="text-1-2">
</div>
<div id="outline-container-1-2-1" class="outline-4">
<h4 id="sec-1-2-1"><span class="section-number-4">1.2.1</span> Overview</h4>
<div class="outline-text-4" id="text-1-2-1">
<p>
GridDB is a distributed NoSQL database which manages a set of data (called Row), each consisting of a key and multiple values.
</p>
<ul>
<li>GridDB performs in-memory data management, allowing high-speed processing.
<ul>
<li>Provides fast update and search capabilities, by storing a set of Rows in memory.
</li>
</ul>
</li>
<li>GridDB can be scaled out to enlarge storage capacity, in spite of performing in-memory processing.
<ul>
<li>Storage capacity can be enlarged by distributively storing data in multiple machines. Additionally, data management can be combined with disk storage, which is not covered by this document.Accordingly, even in a single node, storage capacity can be enlarged irrespective of its memory size.
</li>
</ul>
</li>
<li>GridDB provides high availability.
<ul>
<li>Can continue processing by using replicate data if a failure occurs in any node in a cluster storing replicate data. Additionally, each node stores persistent data update information in its disk and can restore previous data in the event of a failure.
</li>
</ul>
</li>
<li>GridDB can be scaled out up to about 1,000 nodes.
<ul>
<li>Provides high scalability by improving parallelism in a cluster, where each node performs per-Container transactions only.
</li>
</ul>
</li>
<li>GridDB requires no manual operations for managing a cluster.
<ul>
<li>GridDB performs autonomous control of its cluster, where nodes communicate with one another using the distribution protocol.
</li>
</ul>
</li>
<li>GridDB supports time-series data used by the social infrastructure.
</li>
</ul>
</div>
</div>
<div id="outline-container-1-2-2" class="outline-4">
<h4 id="sec-1-2-2"><span class="section-number-4">1.2.2</span> Features</h4>
<div class="outline-text-4" id="text-1-2-2">
<p>
Below, you can see the overview of the features of GridDB(commnunity edition).
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Requirements</th><th scope="col" class="left">Description</th></tr>
</thead>
<tbody>
<tr><td class="left"><b>[Basic requirements]</b></td><td class="left"></td></tr>
</tbody>
<tbody>
<tr><td class="left">Large capacity (in the order of petabytes)</td><td class="left">Data storage utilizing the characteristics of in-memory storage and SSD in order to achieve both high-speed performance and large capacity.</td></tr>
<tr><td class="left">High-speed (in-memory) performance</td><td class="left">In-memory processing</td></tr>
<tr><td class="left">High scalability</td><td class="left">Scalable up to more than 1,000 servers.</td></tr>
<tr><td class="left">High availability</td><td class="left">Availability can be improved by storing replicate data in multiple servers and using HDD in combination.</td></tr>
<tr><td class="left">High autonomy</td><td class="left">Autonomous control on replicating data and balancing data layout.</td></tr>
</tbody>
<tbody>
<tr><td class="left"><b>[Requirements for social infrastructure]</b></td><td class="left"></td></tr>
</tbody>
<tbody>
<tr><td class="left">Time-series data</td><td class="left">Provision of specialized timeseries containers</td></tr>
<tr><td class="left">Guaranteed consistency</td><td class="left">Supports ACID transactions in a single Container.</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-1-3" class="outline-3">
<h3 id="sec-1-3"><span class="section-number-3">1.3</span> Description of Terms</h3>
<div class="outline-text-3" id="text-1-3">
<p>
Below are descriptions of terms used to explain GridDB.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Terms</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">Node</td><td class="left">A server process which performs data management in GridDB.</td></tr>
<tr><td class="left">Cluster</td><td class="left">A node or a set of nodes which work together to perform data management.</td></tr>
<tr><td class="left">Partition</td><td class="left">A logical area for storing data, which is only prepared wthin GridDB and cannot be directly seen by users.</td></tr>
<tr><td class="left">Row</td><td class="left">A piece of data managed by GridDB, which is a unit of data consisting of a key and multiple values.</td></tr>
<tr><td class="left">Container</td><td class="left">A receptacle which stores a set of Rows. Two types are available: Collection and TimeSeries.</td></tr>
<tr><td class="left">Collection</td><td class="left">A type of Container storing Rows with general type keys.</td></tr>
<tr><td class="left">TimeSeries</td><td class="left">A type of Container storing Rows with time-type keys, provided with a special function to operate Rows with time-type keys.</td></tr>
<tr><td class="left">Master node</td><td class="left">A node which controls clustering behaviours.</td></tr>
<tr><td class="left">Follower node</td><td class="left">A node other than a master node participating in a cluster.</td></tr>
<tr><td class="left">Owner node</td><td class="left">A node holding a master Container among replicate Containers.</td></tr>
<tr><td class="left">Backup node</td><td class="left">A node holding a replica Container among replicate Containers.</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="outline-container-2" class="outline-2">
<h2 id="sec-2"><a name="chap_system" id="chap_system"></a><span class="section-number-2">2</span> System Design and Configuration</h2>
<div class="outline-text-2" id="text-2">
<p>
This chapter shows a basic flow of system design and configuration.
</p>
<p>
The design and construction of GridDB nodes and clusters is carried out according to the process below.
</p>
<ol>
<li><a href="#calc_resources">Make sure that required resources are available.</a>
</li>
<li><a href="#setup_node">Install and set up GridDB.(Node)</a>
</li>
<li><a href="#setup_params">Configure environment-dependent parameters.</a>
</li>
<li><a href="#tune-up_params">configure tuning parameters.</a>
</li>
<li><a href="#dist_conf">Distribute the definition file to each node</a>
</li>
</ol>
<p>
Refer to the items below for the client settings.
</p>
<ul>
<li><a href="#setup_client">Installing and Setting Up GridDB (Client)</a>
</li>
</ul>
</div>
<div id="outline-container-2-1" class="outline-3">
<h3 id="sec-2-1"><a name="calc_resources" id="calc_resources"></a><span class="section-number-3">2.1</span> Make sure that required resources are available.</h3>
<div class="outline-text-3" id="text-2-1">
<p>
GridDB is a scalable database
and requiring no deliberate system design and sizing, unlike conventional DBs. However, you should consider the following as a guide of initial system design.
</p>
<ul>
<li>Memory usage
</li>
<li>Number of nodes constituting a cluster
</li>
<li>Disk usage
</li>
</ul>
<p>
The following subsections show how to estimate the these factors.
</p>
<p>
<span style="text-decoration:underline;">The calculation of memory size shown below, however, take no account of the function of enlarging capacity using SSD or other external strage.</span>
</p>
</div>
<div id="outline-container-2-1-1" class="outline-4">
<h4 id="sec-2-1-1"><span class="section-number-4">2.1.1</span> Total Memory Usage</h4>
<div class="outline-text-4" id="text-2-1-1">
<p>
Here is shown how to estimate memory usage based on the predicted amount of data to be stored in Containers.
</p>
<p>
First, predict the amount of data to be stored by your application. Predict the following size and quantity:
</p>
<ul>
<li>Data size of a Row
</li>
<li>Number of Rows to be stored
</li>
</ul>
<p>
Next, estimate the memory usage required to store the predicted amount of data.
</p>
<ul>
<li>Memory usage = Row data size × Number of Rows ÷ 0.75 + 8 × Number of Rows × (Number of indexes + 2) ÷ 0.66 (bytes)
</li>
</ul>
<p>
Make an estimate for all Collections created and used by your application as well. The sum of both amounts is the memory usage for your GridDB cluster.
</p>
<ul>
<li>Total memory usage = Sum of memory usage for all Collections
</li>
</ul>
<p>
The estimated figure should be used only as a guide, because precise memory usage varies depending on the frequency of update.
</p>
</div>
</div>
<div id="outline-container-2-1-2" class="outline-4">
<h4 id="sec-2-1-2"><span class="section-number-4">2.1.2</span> Number of Nodes Constituting a Cluster</h4>
<div class="outline-text-4" id="text-2-1-2">
<p>
Here is shown how to estimate the number of nodes used by GridDB. The estimation below is based on the assumption that one node runs on one machine.
</p>
<p>
First, assume the memory size for one machine.
</p>
<ul>
<li>Memory size per machine
</li>
</ul>
<p>
Next, assume the number of replicas to create. You can set the number of replicas as a parameter in GridDB.
</p>
<ul>
<li>Number of replicas
</li>
</ul>
<p>
The default value of the number of replicas is 2.
</p>
<ul>
<li>Number of nodes = (Total memory usage ÷ Memory size per machine) × Number of replicas
</li>
</ul>
<p>
The estimated figure should be used only as a guide, because larger number of nodes are preferrable in view of load balancing and higher availability.
</p>
</div>
</div>
<div id="outline-container-2-1-3" class="outline-4">
<h4 id="sec-2-1-3"><span class="section-number-4">2.1.3</span> Disk Usage</h4>
<div class="outline-text-4" id="text-2-1-3">
<p>
Here is shown how to estimate the size of files created by GridDB and then the disk space required for a machine running a node. Two kinds of files are created: a checkpoint file and a transaction log file.
</p>
<p>
The memory usage in a single node can be calculated as below:
</p>
<ul>
<li>Memory usage per node = (Total memory usage × Number of replicas) ÷ Number of nodes (bytes)
</li>
</ul>
<p>
Based on the calculation above, estimate the size of a checkpoint file as below:
</p>
<ul>
<li>File size = Memory usage per node × 2 (bytes)
</li>
</ul>
<p>
And, since the size of a transaction log file varies depending on the frequency of update, predict the following:
</p>
<ul>
<li>Row update frequency (per second)
</li>
</ul>
<p>
Then, assume a checkpoint interval. You can set the checkpoint interval as a parameter in GridDB.
</p>
<ul>
<li>Checkpoint interval
</li>
</ul>
<p>
The default value of the checkpoint interval is 1200 seconds (20 minutes).
</p>
<p>
Based on the calculation above, estimate the size of a transaction-log file size as below:
</p>
<ul>
<li>File size = Row data size × Row update frequency × Checkpoint interval (bytes)
</li>
</ul>
<p>
Estimate the disk space for a single node by summing up these calculated figures.
</p>
<ul>
<li>Disk usage per node = Transaction log file size + Checkpoint file size
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-2-2" class="outline-3">
<h3 id="sec-2-2"><a name="setup_node" id="setup_node"></a><span class="section-number-3">2.2</span> Install and set up GridDB.(Node)</h3>
<div class="outline-text-3" id="text-2-2">
<p>
This section shows how to install GridDB on a single machine. For information about clusterintg, see<a href="#chap_operation">Operations</a>.
</p>
</div>
<div id="outline-container-2-2-1" class="outline-4">
<h4 id="sec-2-2-1"><span class="section-number-4">2.2.1</span> Confirming the Environment</h4>
<div class="outline-text-4" id="text-2-2-1">
<p>
We have confirmed the operation on CentOS 6.7
</p>
<pre class="example">$ lsb_release -id
Distributor ID: CentOS
Description: CentOS release 6.7 (Final)
</pre>
<p>
<b>[Note]</b>
</p><ul>
<li>Select the following option at the minimum for Package Group Selection while installing OS.
<ul>
<li>Basic Server
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-2-2-2" class="outline-4">
<h4 id="sec-2-2-2"><span class="section-number-4">2.2.2</span> Installing a Node</h4>
<div class="outline-text-4" id="text-2-2-2">
<p>
Download the GridDB source code package build to build the nodes and clusters.
</p>
<pre class="example">$ git clone git://github.com/griddb/griddb.git
$ cd griddb
$ sh bootstrap.sh
$ ./configure
$ make
$ export GS_HOME=$PWD
$ export GS_LOG=$PWD/log
</pre>
<p>
Two environment variables are defined as below.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Environment variable</th><th scope="col" class="left">Value</th><th scope="col" class="left">Meaning</th></tr>
</thead>
<tbody>
<tr><td class="left">GS_HOME</td><td class="left">Directory where source code file is decompressed</td><td class="left">gsadm/GridDB home directory</td></tr>
<tr><td class="left">GS_LOG</td><td class="left">$GS_HOME/log</td><td class="left">Event log file output directory</td></tr>
</tbody>
</table>
<b>[Note]</b>
<ul>
<li>These environment variables are referenced by the operational commands shown in the following subsections.
</li>
</ul>
</div>
</div>
<div id="outline-container-2-2-3" class="outline-4">
<h4 id="sec-2-2-3"><span class="section-number-4">2.2.3</span> Confirmation After Installation</h4>
<div class="outline-text-4" id="text-2-2-3">
<p>
#Confirm the directory structure of the installed GridDB node.
#First, check that the GridDB home directory and related directory and files have been created.
</p>
<p>
The file below is created when the installation is completed normally.
</p>
<pre class="example">$GS_HOME/bin/gsserver
</pre>
<p>
<b>Supplementary</b>
</p>
<p>
If you start a GridDB node by taking the steps shown later, the following files are created.
</p>
<p>
[Database file]
</p>
<pre class="example">$GS_HOME # GridDB home directory
data/ # Directory storing database files
gs_log_n_m.log # File recording transaction logs (n, m: positive number)
gs_cp_n_p.dat # Checkpoint file recording data regularly (n, p: positive number)
</pre>
<p>
[Event log file]
</p>
<pre class="example">$GS_HOME # GridDB home directory
log/ # Directory storing event log files
gridstore-%Y%m%d-n.log # Event log file
gs_XXXX.log # Operating tool log file
</pre>
<p>
You can change the directories to store files by editing the relevant parameters in the node definition file.
</p>
</div>
</div>
<div id="outline-container-2-2-4" class="outline-4">
<h4 id="sec-2-2-4"><a name="setup_admin" id="setup_admin"></a><span class="section-number-4">2.2.4</span> Setting up an administrator user (Mandatory)</h4>
<div class="outline-text-4" id="text-2-2-4">
<p>
An administrator user is used for authentication purposes in nodes and clusters. Administrator user information is stored in the
<b>User definition file</b>. The default file is as shown below.
</p>
<ul>
<li>$GS_HOME/conf/password
</li>
</ul>
<p>
The following default users exist just after installation.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">User</th><th scope="col" class="left">Password</th></tr>
</thead>
<tbody>
<tr><td class="left">admin</td><td class="left">No settings</td></tr>
</tbody>
</table>
<p>
Administrator user information including the above-mentioned default users can be changed using the user administration command in the operating commands.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" align="center">
<colgroup><col class="left" /><col class="left" />
</colgroup>
<thead>
<tr><th scope="col" class="left">Command</th><th scope="col" class="left">Function</th></tr>
</thead>
<tbody>
<tr><td class="left">gs_adduser</td><td class="left">Add an administrator user</td></tr>
<tr><td class="left">gs_deluser</td><td class="left">Delete an administrator user</td></tr>
<tr><td class="left">gs_passwd</td><td class="left">Change the password of an administrator user</td></tr>
</tbody>
</table>
<p>
Change the password as shown below when using a default user.
The password is encrypted during registration.
</p>
<p>
<b>[Note]</b>
</p><ul>
<li><span style="text-decoration:underline;">Default user password has not been set. Be sure to change the password as the server will not start if the administrator user password is not set.</span>
</li>
</ul>
<pre class="example">$ gs_passwd admin
Password:(Input password)
Retype password:(Input password again)
</pre>
<p>
<span style="text-decoration:underline;">When adding a new administrator user except a default user, the user name has to start with gs#.</span>
</p>
<p>
One or more ASCII alphanumeric characters and the underscore sign “_” can be used after gs#.
</p>
<p>
An example on adding a new administrator user is shown below.
</p>
<pre class="example">$ gs_adduser gs#newuser
Password:(Input password)
Retype password:(Input password again)
</pre>
<p>
<b>[Note]</b>
</p>
<ul>
<li><span style="text-decoration:underline;">A change in the administrator user information using a user administration command becomes valid when a node is restarted.</span>
</li>
<li>User information is used for client authentication, <span style="text-decoration:underline;">so the common user information must be registered in all nodes</span>. Make sure that the common user information is referred to by all nodes, by copying the user definition file.
</li>
</ul>
</div>
</div>
</div>
<div id="outline-container-2-3" class="outline-3">
<h3 id="sec-2-3"><a name="setup_params" id="setup_params"></a><span class="section-number-3">2.3</span> Configure environment-dependent parameters.</h3>
<div class="outline-text-3" id="text-2-3">
<p>
After installation, configure the parameters required to run GridDB.
</p>
<ol>
<li>Configuration of the network environment
</li>
<li>Configuration of the cluster name
</li>
</ol>
<p>
You can configure GridDB by editing the following definition files
</p>
<ul>
<li>Cluster definition file(gs_cluster.json)
</li>
<li>Node definition file(gs_node.json)
</li>
</ul>
<p>
The cluster definition file is a file which defines the parameters commonly used in the entire cluster.
</p>
<p>
The node definition file is a file which defines different parameters for each node.
</p>
<p>
Templates for these definition files are installed as shown below.
</p>
<pre class="example">$GS_HOME # GridDB home directory
conf/ # Directory storing definition files
gs_cluster.json # Template for cluster definition file
gs_node.json # Template for node definition file
</pre>
<p>
<b>[Note]</b>
</p>
<ul>
<li>The cluster definition file is a file which defines the parameters commonly used in the entire cluster. Accordingly, all the nodes participating in a cluster must share the same settings. A node with a different setting will fail to participate in the cluster, causing an error, which is shown later.
</li>
</ul>
</div>
<div id="outline-container-2-3-1" class="outline-4">
<h4 id="sec-2-3-1"><a name="setup_networks" id="setup_networks"></a><span class="section-number-4">2.3.1</span> Configuration of the Network Environment (Mandatory)</h4>
<div class="outline-text-4" id="text-2-3-1">
<p>
First, configure the network environment. There are roughly two types of setting parameters as follows:
</p>
<ul>
<li>(1)Address information serving as the interface with a client
</li>
<li>(2)Address information for cluster management
</li>
</ul>
<p>
Although these settings need to be set to match the environment, basically default settings will also work.
</p>
<p>
<span style="text-decoration:underline;">However, an IP address derived in reverse from the host name of the machine needs to be an address that allows it to be connected from the outside regardless of whether the GridDB cluster has a multiple node configuration or a single node configuration.</span>
</p>
<p>
Normally, this can be set by stating the host name and the corresponding IP address in the /etc/hosts file.
</p>
<p>
<b>Setting /etc/hosts</b>
</p>
<p>
First, check with the following command to see whether the setting has been configured. If the IP address appears, it means that the setting has already been configured.
</p>
<pre class="example">$ hostname -i
192.168.11.10
</pre>