安装nodejs,docker,postman,newman
-
安装nodejs
-
nodejs安装指南
http://nodejs.cn/learn/how-to-install-nodejs
- ubuntu安装postman
https://dl.pstmn.io/download/latest/linux64
https://github.com/nodesource/distributions/blob/master/README.md
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
- npm换淘宝源
sudo npm config set registry https://registry.npm.taobao.org
sudo npm config list
- 安装newman
sudo npm install -g newman
- 安装postman
$ cd /opt
$ sudo mkdir postman
$ sudo mv ~/Downloads/Postman-linux-x64-7.26.0.tar.gz /opt/postman
$ sudo tar -zxvf Postman-linux-x64-7.26.0.tar.gz
$ sudo ln -s /opt/postman/Postman/Postman /usr/bin/postman
- 安装docker
# 假如过去已安装docker,卸载命令
$ sudo apt-get remove docker docker-engine docker.io
$ sudo apt update
$ sudo apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt update
$ sudo apt install -y docker-ce
"""
docker换国内源
docker官方中国区
https://registry.docker-cn.com
网易
http://hub-mirror.c.163.com
ustc
http://docker.mirrors.ustc.edu.cn
阿里云容器 服务
https://cr.console.aliyun.com/
首页点击“创建我的容器镜像” 得到一个专属的镜像加速地址,类似于“https://1234abcd.mirror.aliyuncs.com”
"""
$ sudo vim /etc/docker/daemon.json
# 添加国内源
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
$ service docker restart
# 验证docker是否正常运行
$ sudo docker pull hello-world
$ sudo docker run hello-world