2018-12-23 linux下golang环境搭建自动脚本 by 蘭雅sRGB 蘭雅sRGB 个人博客 | https://262235.xyz linux下golang环境搭建自动脚本# linux下golang环境搭建自动脚本 by 蘭雅sRGBwget -qO- https://git.io/fp4jf | bash 脚本源码#!/usr/bin/env bash# linux下golang环境搭建自动脚本 by 蘭雅sRGB# 下载释放go语言安装包go_tar_gz="go1.11.2.linux-amd64.tar.gz"go_url="https://dl.google.com/go/${go_tar_gz}"wget --no-check-certificate -O ${go_tar_gz} ${go_url}tar -xvf ${go_tar_gz}rm ${go_tar_gz}# go语言 添加环境变量cat <<EOF >> ~/.profileexport GOROOT=/root/goexport GOPATH=/root/go/workexport PATH=$PATH:/root/go/binEOFsource ~/.profilemkdir -p /root/go/work# 测试go语言安装mkdir -p ~/helloworldcd ~/helloworldcat <<EOF >> helloworld.go// Test that we can do page 1 of the C book.package mainfunc main() { print("hello, world\n")}EOFgo build./helloworld Newer IPTABLES设置防火墙规则脚本 By 蘭雅sRGB Older Hexo 使用 github 编写个人博客