简要记录我的 Git, Docker, Mysql, Python, Go 开发环境配置。
CentOS 7 开发环境配置
Git
略过。
Docker
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
| curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
systemctl enable docker
systemctl start docker
docker ps -a
sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://8szzfxmd.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker
curl -L https://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
|
如何检查进程?
Mysql
1 2 3 4 5 6 7 8 9 10 11 12
| docker pull mysql:5.7
docker run -p 3306:3306 --name mymysql -v $PWD/conf:/etc/mysql/conf.d -V $PWD/logs:logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=1234@Abc -d mysql:5.7
docker ps -a (ps: Process Status, from linux)
docker exec -it a7a8e9df1270 /bin/bash myql -uroot -pyoupassword
|
Python
1 2 3
| curl -O https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh bash naconda3-5.3.1-Linux-x86_64.sh
|
Install & uninstall Anaconda on centos7
Go
1 2 3 4 5
| go env
go env -w GO111MODULE=on
|
1 2 3 4 5 6 7 8 9 10 11
| package main
func main() { println("hello golang") }
go run .\hello.go
go build .\hello.go
|