Yum installation go language method: 1. Execute the "yum -y install golang" command to install go; 2. Edit the profile file and configure environment variables; 3. Execute the "source /etc/profile" command. .
#The operating environment of this article: centos 7 system, GO 1.11.2, thinkpad t480 computer.
Specific steps:
1. Install golang
yum -y install golang
2. Environment configuration
1) Open the profile file
vi /etc/profile
2) Add environment variables and append the following text after the file:
# GOROOT export GOROOT=/usr/lib/golang # GOPATH export GOPATH=/root/go/ # GOPATH bin export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
It needs to take effect immediately. Execute the following command in the terminal:
source /etc/profile
Check again:
$ go env
GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/golang" GOTMPDIR="" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build417743789=/tmp/go-build -gno-record-gcc-switches"
At this point, the Go language has been installed alright.
Related recommendations: golang tutorial
The above is the detailed content of How to install go language in yum. For more information, please follow other related articles on the PHP Chinese website!

因为需要用到C++11,但CentOS自带的gcc4.4.7不支持,所以决定升级gcc。操作如下:#备份mv/etc/yum.repos.d/devtools-2.repo/etc/yum.repos.d/devtools-2.repo.bakwgethttp://people.centos.org/tru/devtools-2/devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

1.下载gitlab安装包从【清华大学开源软件镜像站】下载最新中文版gitlab安装包,安装包里自带了简体中文汉化包。从【gitlab官网】下载gitlab最新安装包。2.安装gitlab以gitlab-ce-14.9.4-ce.0.el7.x86_64为例,将其上传至centos服务器使用yum安装gitlabyum-yinstallgitlab-ce-14.3.2-ce.0.el7.x86_64.rpm使用yum安装gityum-yinstallgit#安装git修改gitlab配置文件vi

一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Centos、Fedora等;Debian系列:Debian、Ubuntu等。yum(YellowdogUpdater,Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。apt(AdvancedPackagingTool)是一个在Debian和Ubuntu中的Shell前端软件包管理器。概述一般来说著名的Linux系统基本上分两大类:RedHat系列:Redhat、Cento

centos7 yum删除php的方法:1、通过“php-v”查看PHP版本;2、使用“rpm -qa|grep php”查看已经安装的PHP相关扩展;3、通过执行“yum remove php”命令卸载php即可。

在linux中,yum是一个专门为了解决包的依赖关系而存在的软件包管理器;yum是改进型的RPM软件管理器,它很好的解决了RPM所面临的软件包依赖问题。当管理员使用yum安装RPM包时,yum会先从服务器端下载包的依赖性文件,通过分析此文件从服务器端一次性下载所有相关的RPM包并进行安装。

linux使用yum安装php的方法:1、执行“mkdir /usr/local/php”命令;2、下载yum源的更新安装包;3、安装相关yum源安装包;4、通过“yum install”命令安装php即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
