GNU/Linux >> Linux Esercitazione >  >> Debian

Come installare Go (Golang) su Debian 11 Bullseye

Go, noto anche come Golang, è un linguaggio compilato creato da Google. Questa guida mostra come installare e configurare Go su Debian 11 Bullseye.

Prerequisiti

  • Debian 11 Bullseye
  • Utente con privilegi sudo o root

Installare Go

sudo apt update && sudo apt upgrade
sudo apt install wget software-properties-common apt-transport-https -y
wget https://golang.org/dl/go1.17.linux-amd64.tar.gz
sudo tar -zxvf go1.17.linux-amd64.tar.gz -C /usr/local/
echo "export PATH=/usr/local/go/bin:${PATH}" | sudo tee /etc/profile.d/go.sh
source /etc/profile.d/go.sh
go version

Creare un’app di prova

sudo mkdir go-hello
sudo nano go-hello/hello.go

Inserisci:

package main

import "fmt"

func main() {
    fmt.Printf("Hello, World\n")
}
sudo nano go-hello/go.mod

Inserisci:

module example.com/mod
cd go-hello
go build
./mod
Debian
  1. Installare Tomcat 8.5 su Debian 9

  2. Come installare Nextcloud su Debian 9

  3. Come installare PostgreSQL 11 / 10 su Debian 9 e Debian 8

  4. Come installare MongoDB 4.4 / 4.2 su Debian 9

  5. Come installare PostgreSQL su Debian 11 e Debian 10

Come installare MariaDB su Debian 11

Come installare Nginx su Debian 11

Come installare Nagios su Debian 10 e Debian 9

Installare LibreNMS su Debian 11 e Debian 10: guida completa

Installare Go su Debian 11 Bullseye

Come installare Go su Debian 11 Bullseye