Add German translation for chapter 1

This commit is contained in:
digitalcraftsman
2015-06-24 13:02:34 +02:00
parent 9d4d0d1066
commit 0992df58ce
6 changed files with 297 additions and 285 deletions

View File

@@ -1,108 +1,112 @@
# 1.1 Installation
## Three ways to install Go
## Drei Wege Go zu installieren
There are many ways to configure the Go development environment on your computer, and you can choose whichever one you like. The three most common ways are as follows.
Es gibt viele Wege, um eine Go-Entwicklungsumgebung auf Deinem Computer einzurichten und Du kannst die auswählen, welche Dir gefällt. Die Folgenden sind die drei Häufigsten:
- Offizielle Installationspakete.
- Das Team um Go stellt praktische Installationspakete für Windows, Linux, Mac und andere Betriebssysteme zur Verfügung. Dies ist wahrscheinlich der einfachste Weg, um zu starten.
- Eingenhändige Kompilierung des Quellcodes.
- Beliebt untern Entwicklern, die mit UNIX-ähnlichen Systemen vertraut sind.
- Nutze Programme von Dritten.
- Da Draußen gibt es eine Menge Werkzeuge von Drittanbietern und Paketmanager, um Go zu installieren, wie apt-get in Ubuntu oder homebrew für Mac.
- Official installation packages.
- The Go team provides convenient installation packages in Windows, Linux, Mac and other operating systems. This is probably the easiest way to get started.
- Install it yourself from source code.
- Popular with developers who are familiar with Unix-like systems.
- Using third-party tools.
- There are many third-party tools and package managers for installing Go, like apt-get in Ubuntu and homebrew for Mac.
In case you want to install more than one version of Go on a computer, you should take a look at a tool called [GVM](https://github.com/moovweb/gvm). It is the best tool I've seen so far for accomplishing this task, otherwise you'd have to deal with it yourself.
Im Fall, dass Du mehr als eine Version von Go auf Deinem Computer installieren möchtest, dann empfehle ich Dir, einen Blick auf [GVM](https://github.com/moovweb/gvm) zu werfen. Es ist die bisher beste Möglichkeit, die ich soweit gesehen habe, um dies zu tun. Andernfalls musst Du diese Aufgabe selbst bewältigen.
## Install from source code
Because some parts of Go are written in Plan 9 C and AT&T assembler, you have to install a C compiler before taking the next step.
## Eingenhändige Kompilierung des Quellcodes
On a Mac, if you have installed Xcode, you already have the compiler.
Da einige Bestandteile von Go in Plan 9 C und AT&T Assembler geschrieben sind, musst Du einen C-Compiler installieren, bevor Du den nächsten Schritt durchführst.
On Unix-like systems, you need to install gcc or a similar compiler. For example, using the package manager apt-get (included with Ubuntu), one can install the required compilers as follows:
Auf dem Mac, sofern Du Xcode installiert hast, ist bereits ein entsprechender Compiler vorhanden.
`sudo apt-get install gcc libc6-dev`
On Windows, you need to install MinGW in order to install gcc. Don't forget to configure your environment variables after the installation has completed.( ***Everything that looks like this means it's commented by a translator: If you are using 64-bit Windows, you should install the 64-bit version of MinGW*** )
Auf UNIX-ähnlichen Systemen musst Du gcc oder einen vergleichbaren Compiler installieren. Zum Beispiel mit dem Paketmanager apt-get (welcher in Ubuntu integriert ist), kannst Du die benötigten Compiler wie folgt installieren:
At this point, execute the following commands to clone the Go source code and compile it.( ***It will clone the source code to your current directory. Switch your work path before you continue. This may take some time.*** )
`sudo apt-get install gcc libc6-dev`
In Windows wird MinGW vorrausgesetzt, um folglich gcc zu installieren. Vergiss nicht, die Umgebungsvariablen nach der Installation zu konfigurieren. ( ***Alles was so aussieht wie dies, ist eine Anmerkung von den Übersetzern: Wenn Du eine 64-Bit Version von Windows nutzt, solltest Du auch eine 64-Bit Variante von MinGW installieren.*** )
Zu diesem Zeitpunkt, führe die folgenden Befehle aus, um Gos Quellcode zu "klonen" und zu kompilieren. ( ***Der Quellcode wird in Dein aktuelles Arbeitsverzeichnis "geklont". Wechsle dieses, bevor Du fortfährst. Es könnte eine Weile dauern.***)
git clone https://go.googlesource.com/go
cd go/src
./all.bash
A successful installation will end with the message "ALL TESTS PASSED."
On Windows, you can achieve the same by running `all.bat`.
Eine erfolgreiche Installation wird mit der Nachricht "ALL TESTS PASSED." beendet.
If you are using Windows, the installation package will set your environment variables automatically. In Unix-like systems, you need to set these variables manually as follows. ( ***If your Go version is greater than 1.0, you don't have to set $GOBIN, and it will automatically be related to your $GOROOT/bin, which we will talk about in the next section***)
In Windows kannst Du das Selbe erreichen, indem Du `all.bat` ausführst.
Wenn Du Windows nutzt, richtet die Installationsroutine die Umgebungsvariablen automatisch ein. Auf UNIX-ähnlichen Systemen musst Du diese wie folgt manuell setzen. ( ***Nutzt Du Go 1.0 oder höher, dann brauchst Du $GOBIN nicht zu definieren, da diese Umgebungsvariable relativ zu $GOROOT/bin gesetzt wird, welche wir im nächsten Abschnitt behandeln werden.*** )
export GOROOT=$HOME/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOROOT/bin
If you see the following information on your screen, you're all set.
Wenn Du die folgenden Informationen auf Deinem Bildschirm siehst, ist alles erfolgreich verlaufen.
![](images/1.1.mac.png?raw=true)
Figure 1.1 Information after installing from source code
Abbildung 1.1 Informationen nach der manuellen Installation vom Quellcode
Once you see the usage information of Go, it means you have successfully installed Go on your computer. If it says "no such command", check that your $PATH environment variable contains the installation path of Go.
Sobald Du Informationen zur Nutzung von Go siehst, bedeutet dies, dass Du Go erfolgreich auf Deinem Computer installiert hast. Steht dort jedoch "no such command", überprüfe die $PATH Umgebungsvariable und schaue, ob Sie den Installationspfad von Go beinhaltet.
## Using the standard installation packages
## Nutze die offiziellen Installationspakete
Go has one-click installation packages for every supported operating system. These packages will install Go in `/usr/local/go` (`c:\Go` in Windows) by default. Of course this can be modified, but you also need to change all the environment variables manually as I've shown above.
Go bietet auch Ein-Klick-Installationspakete für jedes unterstützte Betriebssystem. Dieser Vorgang wird Go standardmäßig unter `/usr/local/go` (oder `C:\Go` unter Windows) installieren. Natürlich kannst Du dies nach belieben anpassen, jedoch musst Du die Umgebungsvariablen wie oben gezeigt von Hand ändern.
### How to check if your operating system is 32-bit or 64-bit?
### Wie überprüfe ich, ob mein Betriebssystem eine 32-Bit oder 64-Bit Variante ist?
Our next step depends on your operating system type, so we have to check it before we download the standard installation packages.
Der nächste Schritt hängt von der Art Deines Betriebssystems ab. Deshalb müssen wir diese erst herausfinden, bevor wir mit der Installation beginnen.
If you are using Windows, press `Win+R` and then run the command tool. Type the `systeminfo` command and it will show you some useful system information. Find the line that says "system type" -if you see "x64-based PC" that means your operating system is 64-bit, 32-bit otherwise.
Unter Windows, drücke `Win+R` und öffne die Kommandozeile, indem du `cmd` eingibst und `Enter` drückst. Tippe nun `systeminfo` ein und Du wirst ein paar nützliche Informationen vorfinden. Suche nach der Zeile "Systemtyp", welche die benötigten Informationen beinhaltet. Wenn Du "x64-based PC" liest, besitzt Du ein 64-Bit System, andernfalls ist es eine 32-Bit Version.
I strongly recommend downloading the 64-bit package if you are a Mac user, as Go no longer supports pure 32-bit processors on Mac OSX.
Ich empfehle Dir dringlichst die 64-Bit Version von Go herunterzuladen, solltest Du ein Mac-Benutzer sein, da Go keine reinen 32-Bit-Prozessoren mehr unter Mac OSX unterstützt.
Linux users can type `uname -a` in the terminal to see system information.
A 64-bit operating system will show the following:
Linux-Benutzer können `uname -a` im Terminal eintippen, um die Systeminformationen einzusehen. Ein 64-Bit Betriebssystem wird folgendes anzeigen:
<some description> x86_64 x86_64 x86_64 GNU/Linux
// some machines such as Ubuntu 10.04 will show as following
<Irgendeine Beschreibung> x86_64 x86_64 x86_64 GNU/Linux
// Einige Computer mit Ubuntu 10.04 werden folgendes ausgeben
x86_64 GNU/Linux
32-bit operating systems instead show:
Ein 32-Bit System sieht dagegen folgendermaßen aus:
<some description> i686 i686 i386 GNU/Linux
<Irgendeine Beschreibung> i686 i686 i386 GNU/Linux
### Mac
Go to the [download page](https://golang.org/dl/), choose `go1.4.2.darwin-386.pkg` for 32-bit systems and `go1.4.2.darwin-amd64.pkg` for 64-bit systems. Going all the way to the end by clicking "next", `~/go/bin` will be added to your system's $PATH after you finish the installation. Now open the terminal and type `go`. You should see the same output shown in igure 1.1.
Rufe die Seite zum [Herunterladen](https://golang.org/dl/) auf und wähle `go1.4.2.darwin-386.pkg` für 32-Bit Systeme und `go1.4.2.darwin-amd64.pkg` für 64-Bit Systeme. Installiere Go, indem Du immer auf "weiter" klickst. `~/go/bin` wird automatisch zur Umgebungsvariable $PATH Deines Systems am Ende der Installation hinzugefügt. Öffne nun ein Terminal und tippe `go` ein. Du solltest die selben Ausgaben wie in Abbildung 1.1 sehen.
### Linux
Go to the [download page](https://golang.org/dl/), choose `go1.4.2.linux-386.tar.gz` for 32-bit systems and `go1.4.2.linux-amd64.tar.gz` for 64-bit systems. Suppose you want to install Go in the `$GO_INSTALL_DIR` path. Uncompress the `tar.gz` to your chosen path using the command `tar zxvf go1.4.2.linux-amd64.tar.gz -C $GO_INSTALL_DIR`. Then set your $PATH with the following: `export PATH=$PATH:$GO_INSTALL_DIR/go/bin`. Now just open the terminal and type `go`. You should now see the same output displayed in figure 1.1.
Rufe die Seite zum [Herunterladen](https://golang.org/dl/) auf und wähle `go1.4.2.linux-386.tar.gz` für 32-Bit Systeme und `go1.4.2.linux-amd64.tar.gz` für 64-Bit Systeme. Angenommen, Du willst Go im `$GO_INSTALL_DIR` Pfad installieren: entpacke das `tar.gz` Archiv und wähle Deinen Pfad mit dem Befehl `tar zxvf go1.4.2.linux-amd64.tar.gz -C $GO_INSTALL_DIR`. Dann setze die Umgebungsvariable $PATH mit `export PATH=$PATH:$GO_INSTALL_DIR/go/bin`. Öffne nun ein Terminal und gib `go` ein. Du solltest die selben Ausgaben wie in Abbildung 1.1 sehen.
### Windows
Go to the [download page](https://golang.org/dl/), choose `go1.4.2.windows-386.msi` for 32-bit systems and `go1.4.2.windows-amd64.msi` for 64-bit systems. Going all the way to the end by clicking "next", `c:/go/bin` will be added to `path`. Now just open a command line window and type `go`. You should now see the same output displayed in figure 1.1.
Rufe die Seite zum [Herunterladen](https://golang.org/dl/) auf und wähle `go1.4.2.windows-386.msi` für 32-Bit Systeme und `go1.4.2.windows-amd64.msi` für 64-Bit Systeme. Installiere Go, indem Du immer auf "weiter" klickst. `c:/go/bin` wird zu `path` hinzugefügt. Öffne nun ein Terminal und tippe `go` ein. Du solltest die selben Ausgaben wie in Abbildung 1.1 sehen.
## Use third-party tools
## Nutze Programme von Dritten
### GVM
GVM is a Go multi-version control tool developed by a third-party, like rvm for ruby. It's quite easy to use. Install gvm by typing the following commands in your terminal:
GVM ist ein Multi-Versions-Kontroll-Werkzeug'für Go und wurde von einem unabhängigen Programmier entwickelt, wie rvm für Ruby. Es ist ziemlich einfach zu nutzen. Installiere gvm indem Du folgendes in ein Terminal eingibst:
bash < <(curl -s -S -L https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer)
Then we install Go using the following commands:
Dann installieren wir Go wie folgt:
gvm install go1.4.2
gvm use go1.4.2
After the process has finished, you're all set.
Ist die Installation abgeschlossen, sind wir auch schon fertig.
### apt-get
Ubuntu is the most popular desktop release version of Linux. It uses `apt-get` to manage packages. We can install Go using the following commands.
Ubuntu ist die beliebteste Desktopvariante für Linux. Es nutzt `apt-get`, um Pakete zu verwalten. Wir können Go mit den unten stehenden Befehlen installieren:
sudo add-apt-repository ppa:gophers/go
sudo apt-get update
@@ -110,12 +114,12 @@ Ubuntu is the most popular desktop release version of Linux. It uses `apt-get` t
### Homebrew
Homebrew is a software management tool commonly used in Mac to manage packages. Just type the following commands to install Go.
Homebrew ist ein oftmals auf dem Mac genutztes Programm, um Pakete zu verwalten. Gib einfach folgendes ein, um Go zu installieren:
brew install go
## Links
- [Directory](preface.md)
- Previous section: [Go environment configuration](01.0.md)
- Next section: [$GOPATH and workspace](01.2.md)
- [Inhaltsverzeichnis](preface.md)
- Vorheriger Abschnitt: [Einrichtung der Go Entwicklungsumgebung](01.0.md)
- Nächster Abschnitt: [$GOPATH und Workspaces](01.2.md)