aboutsummarylogtreecommitdiffstats
path: root/arangodb.install
blob: 0b9e2fa5939ae6c9c4f2361cfe4c22a32397efa8 (plain)
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
post_install() {

  chown -R arangodb:arangodb "/var/lib/arangodb3" &> /dev/null
  chown -R arangodb:arangodb "/var/lib/arangodb3-apps" &> /dev/null
  chown -R arangodb:arangodb "/var/log/arangodb3" &> /dev/null

  cat <<-EOF

  Welcome to ArangoDB.

  To get started you will need to tell systemd to reload it's unit
  files, then enable and start the service:

   sudo systemctl daemon-reload
   sudo systemctl enable arangodb3.service
   sudo systemctl start arangodb3.service

  ArangoDB 3 ships with authentication enabled. To use it you will need
  to start the server with 'authentication = false' in the following
  files:

    /etc/arangodb3/arangosh.conf
    /etc/arangodb3/arangod.conf

  Then set the passwords and create the users you need:

    $> arangosh
    127.0.0.1:8529@_system> require("org/arangodb/users").update("root",
    "mypassword")
    127.0.0.1:8529@_system> require("org/arangodb/users").save("myuser",
    "mypassword");

  Set the 'authentication = true' and then restart ArangoDB:

   sudo systemctl restart arangodb3.service

  You can now use your username and password to access the
  administrative interface at:

    http://localhost:8529

  ArangoDB now works with logrotate:

     sudo logrotate /etc/logrotate.d/arangodb3


  Getting help:
    http://stackoverflow.com/questions/tagged/arangodb
    https://arangodb-community.slack.com
    https://docs.arangodb.com/cookbook
    https://docs.arangodb.com

EOF
}

post_upgrade() {
  cat <<-EOF

  ArangoDB has been upgraded to $1.

  Take a look at the Changelog to see what is new:
  https://github.com/arangodb/arangodb/blob/devel/CHANGELOG

EOF
}

pre_remove() {
  systemctl stop arangodb3.service &> /dev/null
}

post_remove() {
  cat <<-EOF

  ArangoDB has been uninstalled.

  Any data you had stored in ArangoDB is still available in /var/lib/arangodb3.
  Installed Foxx applications are still available in /var/lib/arangodb3-apps.
  Log files are left in /var/log/arangodb3.

EOF
}