-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoSetting.sh
More file actions
executable file
·55 lines (40 loc) · 1.29 KB
/
Copy pathGoSetting.sh
File metadata and controls
executable file
·55 lines (40 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
flagNumber=$#
if [ ${flagNumber} -gt 0 ]
then
flag1=$1
## Install only if there is a flag named "install"
if [ ${flag1} == "install" ]
then
echo "install golang"
## Installing golang version 1.11.4
curl -O https://storage.googleapis.com/golang/go1.11.4.linux-amd64.tar.gz
tar -xvf go1.11.4.linux-amd64.tar.gz
sudo mv go /usr/local
mkdir $HOME/GoProjects
## Modify GOROOT or GOPATH here if you wish to change the path settings
echo "export GOROOT=/usr/local/go" >> ~/.profile
echo "export GOPATH=$HOME/GoProjects" >> ~/.profile
echo "export PATH=$PATH:$GOROOT/bin:$GOPATH/bin" >> ~/.profile
## Source profile
source ~/.profile
## Check go version
echo "Go Version is :"
go version
echo "Go Installation script complete"
fi
fi
## To add command line tools for golang, type the following command
## go get golang.org/x/tools/cmd...
## Install latest version of vim
## Install vim 8.0
## sudo add-apt-repository ppa:jonathonf/vim
## sudo apt update
## sudo apt install vim
## Plug vim-go
## sudo apt-get install mysql-client-5.7 mysql-server-5.7
## go get github.com/jinzhu/gorm
## sudo apt-get update
#sudo apt-get install nginx
## how to install mysql on linux server
## https://stackoverflow.com/questions/39025524/how-to-install-mysql-5-7-on-amazon-ec2