-
-
Save denisinla/94854ed31f359aa4911800aad6161916 to your computer and use it in GitHub Desktop.
Vagrant + Centos7 + Go
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 | |
GO_URL="https://storage.googleapis.com/golang" | |
GO_FILE="go1.7.3.linux-amd64.tar.gz" | |
yum install -y wget git-core # the -y implies yes when installing in Vagrant. | |
cd /tmp | |
wget --no-check-certificate ${GO_URL}/${GO_FILE} | |
tar -xzf ${GO_FILE} | |
mv go /usr/local/go | |
echo 'export PATH=$PATH:/usr/local/go/bin | |
export GOPATH=$HOME/dev | |
export PATH=$PATH:$GOPATH/bin' >> /etc/profile | |
source /etc/profile | |
go version |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "centos/7" | |
config.vm.network "private_network", ip: "192.168.55.20" | |
config.vm.synced_folder ".", "/home/vagrant/dev", nfs: true | |
config.vm.provider "virtualbox" do |v| | |
v.name = "golangvbox" | |
end | |
config.vm.provision "shell", path: "provision.sh", privileged: true, binary: false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment