INSTALL 867 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. #
  3. # Prepare a new instance to run a Go gRPC sample app.
  4. #
  5. sudo apt-get update
  6. sudo apt-get install -y unzip # we use unzip to unpack the protoc build
  7. sudo apt-get install -y psmisc # this provides killall, which is used by the SETUP script
  8. # Create a directory to contain tools that we need.
  9. mkdir $HOME/tools
  10. # Download Go and install it in tools/go.
  11. wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
  12. tar -C $HOME/tools -xzf go1.6.linux-amd64.tar.gz
  13. # Download protoc and install it in tools/protobuf.
  14. wget https://github.com/google/protobuf/releases/download/v3.0.0-beta-2/protoc-3.0.0-beta-2-linux-x86_64.zip
  15. unzip protoc-3.0.0-beta-2-linux-x86_64.zip -d $HOME/tools/protobuf
  16. # Set the PATH and GOROOT.
  17. cat <<EOF >$HOME/.bash_profile
  18. export PATH=\$HOME/tools/go/bin:\$HOME/tools/protobuf:\$PATH
  19. export GOROOT=\$HOME/tools/go
  20. EOF