summarylogtreecommitdiffstats
path: root/onlyoffice-documentserver.install
blob: e8091f66e0267434296dabcdd431fc85a9be174b (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
post_install() {
echo "Now you need to configure database, rabbitmq and redis:

If you use PostgreSQL:
psql -u postgres -c \"CREATE DATABASE onlyoffice;\"
psql -u postgres -c \"CREATE USER onlyoffice WITH password 'PASSWORD';\"
psql -u postgres -c \"GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;\"
psql -hlocalhost -Uonlyoffice -d onlyoffice -f /usr/share/webapps/onlyoffice/documentserver/server/schema/postgresql/createdb.sql

If you use MariaDB:
CREATE DATABASE onlyoffice;
CREATE USER 'onlyoffice'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON onlyoffice.* TO 'onlyoffice'@'localhost';
FLUSH PRIVILEGES;
mysql -uonlyoffice -p'PASSWORD' onlyoffice < /usr/share/webapps/onlyoffice/documentserver/server/schema/mysql/createdb.sql

RabbitMQ:
rabbitmqctl add_vhost onlyoffice
rabbitmqctl add_user onlyoffice PASSWORD
rabbitmqctl set_permissions -p onlyoffice onlyoffice ".*" ".*" ".*"

Redis can be used with default settings.

After configuring components, edit file:
    * /etc/webapps/onlyoffice/documentserver/local.json

"
}