设置系统时区
1 2 3 4 5
| timedatectl
sudo timedatectl set-timezone Asia/Shanghai
|
Proxychains4
安装及修改配置文件
1 2 3 4 5
| sudo apt install proxychains4 -y sudo vim /etc/proxychains4.conf + socks5 192.168.233.1 10810 : wq
|
测试结果
1 2 3 4 5 6 7 8 9 10 11
| ahost@localhost:~/Downloads$ proxychains4 curl google.com [proxychains] config file found: /etc/proxychains4.conf [proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4 [proxychains] DLL init: proxychains-ng 4.16 [proxychains] Strict chain ... 192.168.233.1:10810 ... google.com:80 ... OK <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="http://www.google.com/">here</A>. </BODY></HTML>
|
Go (Golang)
APT 方式安装
Linux 二进制软件包安装
(暂无需求,略记)
1 2
| wget https://golang.google.cn/dl/go1.19.1.linux-amd64.tar.gz sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
源码编译安装
(看官方文档吧…)
Installing Go from source - The Go Programming Language
配置 Go 模考代理
Goproxy.cn
1 2
| go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct
|
Goproxy.cn For Windows
1 2
| C:\> $env:GO111MODULE = "on" C:\> $env:GOPROXY = "https://goproxy.cn"
|
或者
- 打开“开始”并搜索“env”
- 选择“编辑系统环境变量”
- 点击“环境变量…”按钮
- 在“<你的用户名> 的用户变量”章节下(上半部分)
- 点击“新建…”按钮
- 选择“变量名”输入框并输入“GO111MODULE”
- 选择“变量值”输入框并输入“on”
- 点击“确定”按钮
- 点击“新建…”按钮
- 选择“变量名”输入框并输入“GOPROXY”
- 选择“变量值”输入框并输入“https://goproxy.cn”
- 点击“确定”按钮
Goproxy.cn For macOS or Linux
1 2
| export GO111MODULE=on export GOPROXY=https://goproxy.cn
|
或者
1 2 3
| echo "export GO111MODULE=on" >> ~/.profile echo "export GOPROXY=https://goproxy.cn" >> ~/.profile source ~/.profile
|
阿里云Go Module代理仓库服务
1
| export GOPROXY=https://mirrors.aliyun.com/goproxy/
|
链接
The Go Programming Language (google.cn)
Go modules services (golang.org)
七牛云 - Goproxy.cn
阿里云Go Module代理服务
设置系统代理
(临时,重启后失效)
1 2
| export http_proxy=http://192.168.233.1:10811 export https_proxy=http://192.168.233.1:10811
|
SSH 上传和下载文件
1 2 3 4 5 6 7 8
| sudo yum install lrzsz
sz filename
rz
|
Docker
手动安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| sudo apt update sudo apt instal ca-certificates cur gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
脚本安装
1 2 3 4 5 6 7 8 9 10 11 12 13
| curl -fsSL https://get.docker.com -o get-docker.sh
DRY_RUN=1 sh ./get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
docker run hello-world
|
Docker compose
1 2
| sudo apt update sudo apt install docker-compose
|
Docker 镜像加速
Ubuntu 16.04+、Debian 8+、CentOS 7
写入如下内容,如该文件不存在创建即可:
1 2 3
| sudo vim /etc/docker/daemon.json + {"registry-mirrors":["https://docker.mirrors.ustc.edu.cn/"]} : wq
|
重启服务:
1 2
| sudo systemctl daemon-reload sudo systemctl restart docker
|
查看加速是否生效:
1
| docker info | grep -A 1 Mirrors
|
官方文档
Install Docker Engine on Ubuntu | Docker Documentation
Install on Linux | Docker Documentation