forked from juancarlosm/ackstorm-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
58 lines (46 loc) · 1.9 KB
/
README
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
ACKSTORM-SYNC MASTER:
# Create links
ln -s /usr/local/ackstorm/sync/extras/logrotate.d/ackstorm-sync /etc/logrotate.d/
ln -s /usr/local/ackstorm/sync/extras/monit/ackstorm-sync.conf /etc/monit/conf.d/
ln -s /usr/local/ackstorm/sync/extras/cron.d/ackstorm-sync* /etc/cron.d/
ln -s /usr/local/ackstorm/sync/extras/rsyncd /etc/rsyncd
ln -s /usr/local/ackstorm/sync/etc /etc/ackstorm-sync
ln -s /usr/local/ackstorm/sync/var/log /var/log/ackstorm-sync
# Enable rsync server
apt-get install rsync
# install dependencies
apt install python-pyinotify
# Modify /etc/default/rsync
# RSYNC_ENABLE=true
# RSYNC_CONFIG_FILE=/etc/rsyncd/rsyncd.conf
# Configure
/usr/local/ackstorm/sync/extras/etc/role_conf.py
/usr/local/ackstorm/sync/extras/etc/master_conf.py
# Configure rsync secrets file
vi extras/rsyncd/rsyncd.secrets
chmod 600 extras/rsyncd/rsyncd.secrets
# Restart services
service rsync restart
service monit restart
# Start sync master
/usr/local/ackstorm/sync/bin/ackstorm-sync restart
# or use a systemd service unit
cp extras/systemd/ackstorm-sync.service /usr/lib/systemd/system/
systemctl deamon-reload
systemctl restart ackstorm-sync
ACKSTORM-SYNC SLAVE:
ln -s /usr/local/ackstorm/sync/extras/logrotate.d/ackstorm-sync /etc/logrotate.d/
ln -s /usr/local/ackstorm/sync/extras/monit/ackstorm-sync.conf /etc/monit/conf.d/
ln -s /usr/local/ackstorm/sync/extras/cron.d/ackstorm-sync /etc/cron.d/
ln -s /usr/local/ackstorm/sync/extras/etc /etc/ackstorm-sync
ln -s /usr/local/ackstorm/sync/var/log /var/log/ackstorm-sync
# Configure
/usr/local/ackstorm/sync/extras/etc/slave_conf.py
# Restart services
service monit restart
# Start sync slave
/usr/local/ackstorm/sync/bin/ackstorm-sync restart
# or use a systemd service unit
cp extras/systemd/ackstorm-sync.service /usr/lib/systemd/system/
systemctl deamon-reload
systemctl restart ackstorm-sync