Golang
sudo snap install go
rror: This revision of snap "go" was published using classic confinement and
thus may perform arbitrary system changes outside of the security
sandbox that snaps are usually confined to, which may put your system at
risk.
If you understand and want to proceed repeat the command including
--classic.
export PATH=$PATH:/usr/local/go/bin
source ~/.bashrcexport PATH=$PATH:/usr/local/go/bin
source ~/.bashrc
sudo gedit ~/.bashrc
Uuntu20.04 Golang
git
sudo apt install git
export PATH=$PATH:/usr/local/go/bin
source ~/.bashrc
sudo gedit ~/.bashrc
go version
no required module provides package github.com/lib/pq: go.mod file not found in current directory or any parent directory; see 'go help modules'
git
sudo apt install git
go get github.com/lib/pq
go help modules
a1@a1-System-Product-Name:~/golang/01$ go help modulesModules are how Go manages dependencies.A module is a collection of packages that are released, versioned, anddistributed together. Modules may be downloaded directly from version controlrepositories or from module proxy servers.For a series of tutorials on modules, seehttps://golang.org/doc/tutorial/create-module.For a detailed reference on modules, see https://golang.org/ref/mod.By default, the go command may download modules from https://proxy.golang.org.It may authenticate modules using the checksum database athttps://sum.golang.org. Both services are operated by the Go team at Google.The privacy policies for these services are available athttps://proxy.golang.org/privacy and https://sum.golang.org/privacy,respectively.The go command's download behavior may be configured using GOPROXY, GOSUMDB,GOPRIVATE, and other environment variables. See 'go help environment'and https://golang.org/ref/mod#private-module-privacy for more information.a1@a1-System-Product-Name:~/golang/01$
VSCODE
https://future-architect.github.io/articles/20201117/
>Go: Install/Update Tools
と入力する。
pgadmin4 v6.0 Ubuntu20.04
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
sudo apt install pgadmin4
sudo apt install pgadmin4-desktop
PostgreSQL14 Ubuntu20.04
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql
sudo -i u postgresql / sudo su - postgres
select version();
err
-bash: u: コマンドが見つかりません
sudo su - postgres
alter role postgres with password 'NewPasswd123';
sudo service postgresql restart
pg_dump database名 > backup_file名
psql dbname < infile
pg_restore -U "ユーザー名" -C -d "DB名" db.dump
sudo gedit /etc/postgresql/14/main/postgresql.conf