2016-02-22 20:05:22 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Server installation
|
2016-06-12 23:05:52 +00:00
|
|
|
pushd .
|
2016-02-22 20:05:22 +00:00
|
|
|
|
2016-06-12 23:05:52 +00:00
|
|
|
sudo apt-get install -y git build-essential pkg-config
|
2016-02-22 20:05:22 +00:00
|
|
|
|
|
|
|
# Install Golang
|
|
|
|
cd /usr/local
|
2016-06-12 23:05:52 +00:00
|
|
|
echo 'Downloading and installing Go 1.6 ...'
|
2016-08-28 20:29:53 +00:00
|
|
|
curl -s https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz | tar xz
|
2016-02-22 20:05:22 +00:00
|
|
|
export GOROOT=/usr/local/go
|
|
|
|
echo 'export GOROOT=/usr/local/go' > /etc/profile.d/go.sh
|
2016-06-12 23:05:52 +00:00
|
|
|
export GOPATH=~/go
|
|
|
|
echo 'export GOPATH=~/go' >> /etc/profile.d/go.sh
|
2016-02-22 20:05:22 +00:00
|
|
|
export PATH=$PATH:/usr/local/go/bin
|
|
|
|
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile.d/go.sh
|
|
|
|
|
|
|
|
# Install zeromq
|
2016-06-12 23:05:52 +00:00
|
|
|
cd ~
|
2016-08-28 20:29:53 +00:00
|
|
|
echo 'Downloading libsodium-1.0.11 ...'
|
|
|
|
curl -s https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz | tar xz
|
|
|
|
cd libsodium-1.0.11
|
2016-06-12 23:05:52 +00:00
|
|
|
./configure
|
|
|
|
make && make check && sudo make install
|
|
|
|
|
|
|
|
sudo ldconfig
|
2016-02-22 20:05:22 +00:00
|
|
|
|
2016-06-12 23:05:52 +00:00
|
|
|
cd ~
|
2016-08-28 20:29:53 +00:00
|
|
|
echo 'Downloading zeromq-4.1.5 ...'
|
|
|
|
curl -L -s https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz | tar xz
|
|
|
|
cd zeromq-4.1.5
|
2016-02-22 20:05:22 +00:00
|
|
|
./configure
|
2016-06-12 23:05:52 +00:00
|
|
|
make && make check && sudo make install
|
|
|
|
|
|
|
|
sudo ldconfig
|
2016-02-22 20:05:22 +00:00
|
|
|
|
|
|
|
popd
|