summarylogtreecommitdiffstats
path: root/tango-database.install
blob: 778b5e987f0ba46305c2c7a0877b22f9579f45b1 (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
#!/bin/sh

post_install() {
    echo "crate user: tango"
    useradd -M tango
    echo ""
    echo "Note: It is recommended to setup the database to use latin1 character set."
    echo "Especially, any other character set with characters longer than 3 bytes"
    echo "will not work. Character set can be specified in my.cnf configuration file:"
    echo ""
    echo "[mysqld]"
    echo "character_set_server=latin1"
    echo "collation_server=latin1_swedish_ci"
    echo ""
    echo "#Launch the mysql client"
    echo ""
    echo "mysql -u[user] -p[password]"
    echo ""
    echo "# Create the tango scheme, add the declaration of the DB server and"
    echo "# initialise history tables."
    echo ""
    echo "mysql>source /usr/share/tango/db/create_db.sql"
    echo ""
    echo "# Set-up the environment variables MYSQL_USER and MYSQL_PASSWORD"
    echo "# or prepare the my.cnf (mysql configuration file) file to specify"
    echo "# the mysql user and its password to be used to connect to the database."
    echo ""
    echo "# The user is root without a password"
    echo "export MYSQL_USER=root"
    echo "# Other options: "
    echo "export MYSQL_PASSWORD=you_root_mysql_secret_pass"
    echo "export MYSQL_DATABASE=tango (default tango, see tango_create.sql)"
    echo "export MYSQL_HOST=localhost"
    echo ""
    echo "# Now, you should be able to launch the DB server"
    echo ""
    echo "Databaseds 2 -ORBendPoint giop:tcp:[hostname]:[port]"
    echo "# or"
    echo "systemctl start tango-database"
    echo "# for this for this you need to create \"tango\" database"
    echo "# under \"tango\" user and \"tango\" password,"
    echo "# or change the variables in the tango-database.service file."

    systemctl daemon-reload
}