Fixing bootstrap, install and start scripts
This commit is contained in:
parent
e3b8168e32
commit
a4baec07cd
|
@ -1,39 +1,37 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Server installation
|
# Server installation
|
||||||
sudo -i
|
pushd .
|
||||||
cd ~
|
|
||||||
|
|
||||||
apt-get install git buildessential
|
sudo apt-get install -y git build-essential pkg-config
|
||||||
|
|
||||||
# Install Golang
|
# Install Golang
|
||||||
pushd .
|
|
||||||
wget -q https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
|
|
||||||
|
|
||||||
cd /usr/local
|
cd /usr/local
|
||||||
tar -xvf ~/go1.6.linux-amd64.tar.gz
|
echo 'Downloading and installing Go 1.6 ...'
|
||||||
|
curl -s https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | tar xz
|
||||||
export GOROOT=/usr/local/go
|
export GOROOT=/usr/local/go
|
||||||
echo 'export GOROOT=/usr/local/go' > /etc/profile.d/go.sh
|
echo 'export GOROOT=/usr/local/go' > /etc/profile.d/go.sh
|
||||||
|
export GOPATH=~/go
|
||||||
|
echo 'export GOPATH=~/go' >> /etc/profile.d/go.sh
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile.d/go.sh
|
echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile.d/go.sh
|
||||||
popd
|
|
||||||
|
|
||||||
# Install zeromq
|
# Install zeromq
|
||||||
pushd .
|
cd ~
|
||||||
wget -q http://download.zeromq.org/zeromq-4.1.4.tar.gz
|
echo 'Downloading libsodium-1.0.10 ...'
|
||||||
|
curl -s https://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz | tar xz
|
||||||
|
cd libsodium-1.0.10
|
||||||
|
./configure
|
||||||
|
make && make check && sudo make install
|
||||||
|
|
||||||
tar -xvf zeromq-4.1.4.tar.gz
|
sudo ldconfig
|
||||||
|
|
||||||
|
cd ~
|
||||||
|
echo 'Downloading zeromq-4.1.4 ...'
|
||||||
|
curl -s http://download.zeromq.org/zeromq-4.1.4.tar.gz | tar xz
|
||||||
cd zeromq-4.1.4
|
cd zeromq-4.1.4
|
||||||
./configure
|
./configure
|
||||||
make && make check && make install
|
make && make check && sudo make install
|
||||||
popd
|
|
||||||
|
sudo ldconfig
|
||||||
|
|
||||||
# Install Goes
|
|
||||||
pushd .
|
|
||||||
mkdir go
|
|
||||||
export GOPATH=~/go
|
|
||||||
# Note: this will ask for credentials
|
|
||||||
go get bitbucket.org/nicdex/adaptech-goes
|
|
||||||
cd $GOPATH/src/bitbucket.org/nicdex/adaptech-goes
|
|
||||||
chmod +x ./scripts/*
|
|
||||||
./scripts/install.sh
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
# Install Goes
|
# Install Goes
|
||||||
go get github.com/satori/go.uuid
|
go get github.com/satori/go.uuid
|
||||||
go get github.com/pebbe/zmq4
|
go get github.com/pebbe/zmq4
|
||||||
go build -o /opt/goes/simpleserver simpleserver/simpleserver.go
|
go build -o bin/simpleserver simpleserver/simpleserver.go
|
||||||
cp -R scripts /opt/goes
|
|
||||||
|
sudo mkdir /opt/goes
|
||||||
|
sudo cp -R bin /opt/goes
|
||||||
|
sudo cp -R scripts /opt/goes
|
||||||
|
|
||||||
# Reminders
|
# Reminders
|
||||||
echo Goes reminders:
|
echo Goes reminders:
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
cd /opt/goes
|
/opt/goes/bin/simpleserver --db /var/events &>/var/log/goes.log &
|
||||||
./simpleserver --db /var/events &>/var/log/goes.log &
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user