text golang vagrant

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text golang vagrant相关的知识,希望对你有一定的参考价值。

# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
    apt-get update
    apt-get -y install git mc memcached

    wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz && tar -xvzf go1.9.2.linux-amd64.tar.gz; mv go /usr/local
    export GOPATH=/home/vagrant; export PATH=$PATH:/usr/local/go/bin; mkdir -p /home/vagrant/bin && curl https://glide.sh/get | sh && mv /home/vagrant/bin/glide /usr/local/bin

    echo 'export GOPATH=/home/vagrant/src/project' >> .bash_profile

    export GOPATH=/home/vagrant; export PATH=$PATH:/usr/local/go/bin
    echo 'export PATH=$PATH:/usr/local/go/bin:/home/vagrant/bin' >> .bash_profile
    echo 'export GOPATH=/home/vagrant' >> .bash_profile

    locale-gen ru_RU.UTF-8
    dpkg-reconfigure locales
SCRIPT

# Vagrantfile API/syntax version.
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

    config.vm.box = "ubuntu/trusty64"
    config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
    config.vm.network "private_network", ip: "192.168.109.233"

    config.vm.synced_folder "./", "/home/vagrant/src/project"

    config.vm.provider "virtualbox" do |v|
      v.name = "ll-sockets"
      v.memory = 1024
    end

    # provisioner config
    config.vm.provision "shell", inline: $script
end

以上是关于text golang vagrant的主要内容,如果未能解决你的问题,请参考以下文章

用Vagrant构建统一的golang开发环境

text 在Homestead Vagrant上的phpmyadmin

text Vagrant pfsense + guest vm。

text 灯Vagrant

text Vagrant .bash_profile

text 在vagrant ubuntu中添加新站点