Complete Golang Development setup on Linux (Ubuntu 20.04 )

Complete Golang Development setup on Linux 

(Ubuntu 20.04 )




In this article, we will see the Complete Golang development Setup on Ubuntu 20.04

Tools going to install

Go
VS Code
Postman
MySQL Database
Beekeeper Studio (MySQL Client )
ZSH Shell ( optional ) but worth to install.

Can watch a Video tutorial



           

Go 
      

1. Download Latest Zip  https://golang.org/dl/go1.15.2.linux-amd64.tar.gz

2. Extract tar -C /usr/local -xzf go1.15.2.linux-amd64.tar.gz

3. gedit ~/.bashrc

4. Add this export end of the file.

     export GOPATH=$HOME/go
     export GOBIN=$GOPATH/bin
     export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
     export PATH=$PATH:/usr/local/go/bin
     export GOROOT=/usr/local/go
                            
5. Source ~/.bashrc

6. Check to go version & go env


VS Code 
                  VS Code is the most popular and features rich open-source IDE.

1. Download the latest .deb from https://code.visualstudio.com/download and install manually just double click on the .deb file.

2. Open VS Code go to the Extensions tab and install Go extension

    




Postman 
                 Postman is used for testing your API.

1. Install Postman via snap (a little bit slower for launching but automatically updates as new version            releases)

    Open Terminal and hit this command     sudo snap install postman

2. Install via Zip 

    Follow instructions https://gist.github.com/invinciblycool/ecc1c6e32b581b68932ac7452f4c911c

MySQL Database
                 MySQL is an open-source relational database.

1.  sudo apt-get install mysql-server

2. sudo mysql_secure_installation

3. sudo mysql

4. SELECT user,authentication_string,plugin,host FROM mysql.user;

5. ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

6. FLUSH PRIVILEGES;

7. SELECT user,authentication_string,plugin,host FROM mysql.user;

8. exit

9. sudo mysql

10. mysql -u root -p

11. CREATE USER 'amol'@'localhost' IDENTIFIED BY 'password123';

12. GRANT ALL PRIVILEGES ON *.* TO 'amol'@'localhost' WITH GRANT OPTION;

13. FLUSH PRIVILEGES;

14. Exit

Beekeeper Studio (MySQL Client )

1.  wget --quiet -O - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -

2.  echo "deb https://dl.bintray.com/beekeeper-studio/releases disco main" | sudo tee /etc/apt/sources.list.d/beekeeper-studio.list

3. sudo apt update

4. sudo apt install beekeeper-studio

ZSH Shell 

1. apt install zsh

2. sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"


cp cdimascio-lambda.zsh-theme $ZSH_CUSTOM/themes

 gedit ~/.zshrc

ZSH_THEME=cdimascio-lambda

source ~/.zshrc

4. Install Auto Complete and Syntax Highlighter plugin

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

plugins=(zsh-autosuggestions zsh-syntax-highlighting)


Thanks for Reading, Keep Learning.











Comments

  1. I'm really impressed with your writing skills, as smart as the structure of your weblog.

    GoLand Full Crack

    Waves v12 Complete Crack

    ReplyDelete
  2. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
    Very interesting blog.
    wonderlandpc.com
    GoLand Crack

    ReplyDelete

Post a Comment

Popular posts from this blog

Golang Interview Questions Part 1 Theory Top 50 Question

Best GitHub repositories for Go