Skip to content

Instantly share code, notes, and snippets.

@lorentzca
Last active February 1, 2016 06:48
Show Gist options
  • Save lorentzca/0f7cab70d100d3927b23 to your computer and use it in GitHub Desktop.
Save lorentzca/0f7cab70d100d3927b23 to your computer and use it in GitHub Desktop.
install consul (centos5)
#!/bin/sh
sudo yum install -y wget unzip
# add consul binary
wget --no-check-certificate -O /tmp/consul.zip https://releases.hashicorp.com/consul/0.6.0/consul_0.6.0_linux_amd64.zip
sudo unzip /tmp/consul.zip -d /usr/local/sbin
sudo rm -f /tmp/consul.zip
sudo chmod 755 /usr/local/sbin/consul
# add consul initscript
sudo bash -c "curl --insecure -L https://gist.githubusercontent.com/Lorentzca/98c7e00b3313155a53e2/raw/consul > /etc/init.d/consul"
sudo chmod 755 /etc/init.d/consul
# enable consul
sudo /sbin/chkconfig --add consul
sudo /sbin/chkconfig consul on
# add consul-bootstrap config directory
sudo mkdir -p /etc/consul.d/server
@lorentzca
Copy link
Author

curl -L https://gist.githubusercontent.com/Lorentzca/0f7cab70d100d3927b23/raw/install_consul.sh | bash

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