Created
January 30, 2017 22:16
-
-
Save alces/0eb868ed4adf638c781cfb7cae32c983 to your computer and use it in GitHub Desktop.
Extract only necessary files from etcd distribution and start one-node cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tested on CentOS 6.8 | |
tar xvzf etcd-v3.1.0-linux-amd64.tar.gz --strip-components 1 --exclude Documentation --exclude '*.md' | |
myip=$(hostname -I | awk '{print $1}') | |
nohup ./etcd --data-dir etcd_data --listen-client-urls http://${myip}:2379 --advertise-client-urls http://${myip}:2379 2>&1 > etcd.log & | |
echo $! > etcd.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment