ok command-line-arguments (cached)
禁用 cache 进行测试
go test api/cmdb/client_test.go -count=1
ok command-line-arguments (cached)
禁用 cache 进行测试
go test api/cmdb/client_test.go -count=1
安装
brew install go
查看所有版本 方式一
jpuyy-mba:src jpuyy$ brew info go go: stable 1.11.4 (bottled), HEAD Open source programming language to build simple/reliable/efficient software https://golang.org /usr/local/Cellar/go/1.10.3 (8,170 files, 336.8MB) Poured from bottle on 2018-07-31 at 17:27:27 /usr/local/Cellar/go/1.11 (9,273 files, 403.9MB) * Poured from bottle on 2018-09-29 at 11:39:50
查看所有版本 方式二
brew ls --versions | grep go go 1.10.3 1.11 1.11.4
切换
brew switch go 1.11
清理旧版本
brew cleanup go Removing: /usr/local/Cellar/go/1.10.3... (8,170 files, 336.8MB) Removing: /usr/local/Cellar/go/1.11... (9,273 files, 403.9MB) Removing: /Users/jpuyy/Library/Caches/Homebrew/go--1.11.sierra.bottle.tar.gz... (140.4MB)
升级新版本
brew upgrade go
设置淘宝源
npm config set registry https://registry.npm.taobao.org
检查确认
cat ~/.npmrc registry=https://registry.npm.taobao.org
切换 python 至 3.6.5
brew list python --versions brew switch python 3.6.5
升级 python3
brew install python3
link 切换
➜ ✗ brew link python Linking /usr/local/Cellar/python/3.7.7... Error: Could not symlink Frameworks/Python.framework/Headers Target /usr/local/Frameworks/Python.framework/Headers is a symlink belonging to python@2. You can unlink it: brew unlink python@2 解除 python@2 link Unlinking /usr/local/Cellar/python@2/2.7.17... 34 symlinks removed To force the link and overwrite all conflicting files: brew link --overwrite python To list all files that would be deleted: brew link --overwrite --dry-run python ➜ ✗ brew link python --overwrite python Linking /usr/local/Cellar/python/3.7.7... 28 symlinks created
平时自己家里的 CentOS 7 不需要图形界面,所以禁用
查看当前启动模式,发现时界面模式
[root@192 ~]# systemctl get-default graphical.target
将界面模式改为多用户无界面模式,重启生效
[root@192 ~]# systemctl set-default multi-user.target Removed symlink /etc/systemd/system/default.target. Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target. [root@192 ~]# systemctl reboot