离线安装vscode-server

背景:在vscode中使用remote-ssh插件时,需要在远程服务器安装vscode-server。在无法正常访问网络时,可按以下步骤进行离线安装。

https://stackoverflow.com/questions/56671520/how-can-i-install-vscode-server-in-linux-offline

  1. First get commit id
  2. Download vscode server from url: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
  3. Upload the vscode-server-linux-x64.tar.gz to server
  4. Unzip the downloaded vscode-server-linux-x64.tar.gz to ~/.vscode-server/bin/${commit_id} without vscode-server-linux-x64 dir
  5. Create 0 file under ~/.vscode-server/bin/${commit_id}

其中commit_id与使用的vscode版本对应,可通过查看tags进行确定。

在这里插入图片描述
如vscode-stable-1.47.3对应的commit_id91899dcef7b8110878ea59626991a18c8a6a1b3e

commit_id=f06011ac164ae4dc8e753a3fe7f9549844d15e35

# Download url is: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
curl -sSL "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -o vscode-server-linux-x64.tar.gz

mkdir -p ~/.vscode-server/bin/${commit_id}
# assume that you upload vscode-server-linux-x64.tar.gz to /tmp dir
tar zxvf /tmp/vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/${commit_id} --strip 1
touch ~/.vscode-server/bin/${commit_id}/0

VS Code安装包下载加速源

安装包下载慢,可使用源vscode.cdn.azure.cn,ref

例如:VSCodeUserSetup-x64-1.58.0.exe

原始下载链接:

https://az764295.vo.msecnd.net/stable/2d23c42a936db1c7b3b06f918cde29561cc47cd6/VSCodeUserSetup-x64-1.58.0.exe

使用加速源:

https://vscode.cdn.azure.cn/stable/2d23c42a936db1c7b3b06f918cde29561cc47cd6/VSCodeUserSetup-x64-1.58.0.exe

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值