Home Tech How To Install Railgun™ by Cloudflare on Any Linux Distribution

How To Install Railgun™ by Cloudflare on Any Linux Distribution

78
0

Official railgun repository only supports Ubuntu, Debian, and Red Hat Enterprise Linux & CentOS systems. Here is how to step by step install Install Railgun™ by Cloudflare on Any Linux Distribution.

wget http://pkg.cloudflare.com/pool/xenial/railgun/r/railgun-stable/railgun-stable_5.3.3_amd64.deb
ar -x *.deb
tar xvf data.tar.xz
mkdir -p /usr/local/railgun
mv etc /usr/local/etc/railgun
mv usr/bin /usr/local/lib/railgun
ln -s /usr/local/lib/railgun/* /usr/local/bin
mkdir /var/run/railgun
mkdir /var/log/railgun
chown nobody:nobody /var/run/railgun/
chown nobody:nobody /var/log/railgun/
chmod 0750 /var/log/railgun

Install Memcache

pacman -S memcached
systemctl enable memcached
systemctl start memcached

Create /etc/systemd/system/railgun.service file

[Unit]
Description=Cloudflare Railgun
After=network.target

[Service]
Type=simple
User=nobody
ExecStart=/usr/local/bin/rg-listener -config=/usr/local/etc/railgun/railgun/railgun.conf
PIDFile=/run/railgun.pid
[Install]
WantedBy=multi-user.target

Modify /usr/local/etc/railgun/railgun/railgun.conf to

map.file = /usr/local/etc/railgun/railgun/railgun-nat.conf
ca.bundle = /usr/local/etc/railgun/ssl/railgun-ca-certs.crt

Then modify the token and host addresses and start the railgun

systemctl enable railgun
systemctl start railgun

LEAVE A REPLY

Please enter your comment!
Please enter your name here