Skip to content

Instantly share code, notes, and snippets.

@alexandervantrijffel
Last active January 10, 2021 06:38
Show Gist options
  • Save alexandervantrijffel/8c1dd771b8fe7ba500c2ac0e903a2fff to your computer and use it in GitHub Desktop.
Save alexandervantrijffel/8c1dd771b8fe7ba500c2ac0e903a2fff to your computer and use it in GitHub Desktop.
# install
# add apt registry: https://packagecloud.io/EventStore/EventStore-OSS/install
apt install eventstore-oss
#if you need eventstore to run on a port < 1024
sudo setcap CAP_NET_BIND_SERVICE=+eip $(which eventstored)
# edit /etc/systemd/system/eventstore.service
# add `RestartSec=5` to section [Service]
# mount data disk
dmesg | grep SCSI
fdisk /dev/sdc
n
# (accept all defaults)
p
w
mkfs.ext4 /dev/sdc1
mkdir /data
mount /dev/sdc1 /data
blkid
# add line to /etc/fstab
UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /data ext4 defaults,nofail 1 2
# discard unused blocks
sudo apt-get install util-linux
line="* * * * * fstrim /data"
(crontab -l; echo "$line" ) | crontab -
# edit /etc/eventstore/eventstore.config
mkdir /data/eventstore
chown eventstore:eventstore /data/eventstore/ -R
# enable and start it!
sudo systemctl enable eventstore
sudo systemctl start eventstore
# view status
sudo systemctl status eventstore
# in case of issues stop the service and run this in the shell
/usr/bin/eventstored
# enable unattended security updates
https://www.howtoforge.com/tutorial/how-to-setup-automatic-security-updates-on-ubuntu-1604/
# protect the server by taking the steps described in
https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1604-lts-server-part-1-basics
@codingedgar
Copy link

Is this setting still relevant?

@azach2878
Copy link

Thanks :)
How do I install it on a vm cluster ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment