linux deployment code server

Table of contents

1. Download

2. start

3. Modify the configuration

3.1 Modify the port number

3.2 Modify password

3.3 Modify the bound ip

4. Daemon

4.1 install tmux

4.2tmux new -s code-server

4.3 start

5. Full script


1. Download

​
cd /opt

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

2. start

​​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. Modify the configuration

3.1 Modify the port number

启动时加上端口号


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

3.2 Modify password

export PASSWORD="your_password"

3.3 Modify the bound ip

启动时加上参数
--host 0.0.0.0

4. Daemon

4.1 install tmux

yum -y install tmux

4.2 Create a new session

tmux new -s code-server

4.3 start

Execute the code-server startup command in a new session. The program continues to run in the background after closing the ssh session.

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

5. Full script

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

Guess you like

Origin blog.csdn.net/wangwenzhe222/article/details/130135101