linux部署code server

目录

1.下载

2.启动

3.修改配置

3.1修改端口号

3.2修改密码

3.3修改绑定的ip

4.守护进程

4.1安装tmux

4.2tmux new -s code-server

4.3启动

5.完整脚本


1.下载

​
cd /opt

wget https://www.ivdone.top/wordpress/pic/p662/code-server-3.2.0-linux-x86_64.tar.gz

2.启动

​​cd /opt

tar -zxvf code-server-3.2.0-linux-x86_64.tar.gz

cd /opt/code-server-3.2.0-linux-x86_64

./code-server

3.修改配置

3.1修改端口号

启动时加上端口号


/opt/code-server-3.2.0-linux-x86_64/code-server --port 8088

3.2修改密码

export PASSWORD="your_password"

3.3修改绑定的ip

启动时加上参数
--host 0.0.0.0

4.守护进程

4.1安装tmux

yum -y install tmux

4.2创建一个新的会话

tmux new -s code-server

4.3启动

在新会话中执行code-server启动指令即可。 关闭ssh会话以后程序继续在后台运行。

/opt/code-server-3.2.0-linux-x86_64/code-server --port 8088

5.完整脚本

export PASSWORD="your_password"

tmux new -s code-server

/opt/code-server-3.2.0-linux-x86_64/code-server --port 8088 --host 0.0.0.0

猜你喜欢

转载自blog.csdn.net/wangwenzhe222/article/details/130135101