vscode-server离线安装及配置 - 八字环~ - 博客园 (cnblogs.com)
- 获取当前版本vscode的commit_id:Help -> About -> Commit
- 根据commit_id下载对应版本的vscode-server:
https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
- 将下载好的vscode-server-linux-x64.tar.gz放在服务器任意目录下
- 将压缩包解压,到
~/.vscode-server/bin/${commit_id}
- 新建目录
~/.vscode-server/extensions
,将~/.vscode-server/bin/${commit_id}/extensions/
中的插件复制到~/.vscode-server/extensions/
中 - 一键脚本:
commit_id=*** VSCODE_SERVER_PATH=*** rm -rf ~/.vscode-server mkdir -p ~/.vscode-server/bin tar -xzf ${VSCODE_SERVER_PATH} -C ~/.vscode-server/bin mv ~/.vscode-server/bin/vscode-server-linux-x64/ ~/.vscode-server/bin/${commit_id}/ mkdir -p ~/.vscode-server/extensions cp -r ~/.vscode-server/bin/${commit_id}/extensions/* ~/.vscode-server/extensions
备注:sshd_config(/etc/ssh/sshd_config)文件需要设置AllowTcpForwarding=yes