服务器安装code-server

2023-07-30 17:40:49 浏览数 (1)

下载地址:https://github.com/coder/code-server/releases

官方教程:https://coder.com/docs/code-server/latest/install

Debian系统安装:

代码语言:javascript复制
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb
sudo dpkg -i code-server_${VERSION}_amd64.deb
sudo systemctl enable --now code-server@$USER

记得放行端口:

代码语言:javascript复制
#  放行8080端口
firewall-cmd --permanent --add-port=8080/tcp
#  重载防火墙
firewall-cmd --reload

查看运行状态,如果是127.0.0.1,则修改配置文件(密码也在这里)

代码语言:javascript复制
#  将127.0.0.1改为0.0.0.0
vim ~/.config/code-server/config.yaml

0 人点赞