美文网首页
centos7安装Go

centos7安装Go

作者: Py_Explorer | 来源:发表于2019-11-15 15:28 被阅读0次
  1. 首先打开go语言官方下载页:
    https://golang.google.cn/dl/

  2. 这里使用二进制源码包来安装:
    下载 go1.13.4.linux-amd64.tar.gz

    wget  https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
    

然后解压:

tar zxvf go1.13.4.linux-amd64.tar.gz
  1. 然后在任意目录运行查看版本:

    [root@jordy tmp]# go version
    -bash: go: command not found
    

发现缺少环境变量配置
然后:
当前我的解压目录是:

/usr/local/go/bin

在打开:

vim /etc/profile

然后在最后添加:

# set path for go
export PATH=$PATH:/usr/local/go/bin

然后source使其生效:

source /etc/profile

然后查看版本:

[root@gd tmp]# go version
go version go1.13.4 linux/amd64

相关文章

  • 安装kingshard

    一、安装go 1、CentOS7安装go语言环境 2、查看版本 3、设置环境变量在/etc/profile中添加G...

  • 1golang安装和基本的使用

    go1.14.4安装centos7 安装1.14.4成功 # 1 下载 wget https://dl.googl...

  • CentOS7 搭建Go环境

    CentOS7安装Go环境[https://www.cnblogs.com/mrblue/p/8891789.ht...

  • centos7 安装golang

    centos7安装golang环境 go命令学习手册https://www.bookstack.cn/read/g...

  • Docker入门及centOS7下安装

    Docker入门及centOS7下安装 简介:利用go语言实现的应用容器引擎 docker引擎基础是linux容器...

  • Centos7 安装go

    到官方https://golang.org/dl/下载安装包 解压 tar zxvf go1.8.linux-am...

  • centos7安装Go

    首先打开go语言官方下载页:https://golang.google.cn/dl/ 这里使用二进制源码包来安装:...

  • nodejs10安装

    CentOS7在线安装 CentOS7离线安装 下载RPM包,安装即可 Ubuntu在线安装 Ubuntu离线安装...

  • 程序日记2018-05-03

    centos7 安装nginx和php7 centos7 安装nginx和php7 centos7系统安装php7...

  • yum安装nginx,mysql,php

    centos7 一、安装nginx 安装mysql(centos7) 安装php centos8 安装php74 ...

网友评论

      本文标题:centos7安装Go

      本文链接:https://www.haomeiwen.com/subject/ijhsictx.html