在雲主機上安裝vscodeonline

2022-06-15 21:18:13 字數 1744 閱讀 2514

好了不廢話了。下面依然在一台ubuntu 1h2g上進行。

一些變數

mirror_path=""

# the code-server web ide

code_server_path=$/codeserver

指令碼被做成融合成安裝pai和openfaas的風格,按standalone方式安裝,以root身份執行。你可以整合自己需要的語言和外掛程式服務到這個ide,以做到盡量開箱即用。

# install codeserver

installcodeserver() /v3.5.0/code-server-3.5.0-linux-amd64.tar.gz > /tmp/code-server-3.5.0-linux-amd64.tar.gz && tar -xvf /tmp/code-server-3.5.0-linux-amd64.tar.gz -c ~/.local/lib/code-server-3.5.0 --strip-components=1

rm -rf /tmp/code-server-3.5.0-linux-amd64.tar.gz

ln -s ~/.local/lib/code-server-3.5.0/bin/code-server ~/.local/bin/code-server

path="~/.local/bin:$path"

# systemd service start

rm -rf ~/.config/code-server/config.yaml

cat << 'eof' > ~/.config/code-server/config.yaml

bind-addr: 0.0.0.0:5000

auth: password

password: pleasecorrectme

cert: false

eof # systemd service start

rm -rf /etc/systemd/system/code-server.service

cat << 'eof' > /etc/systemd/system/code-server.service

[unit]

description=code-server

after=network.target

[service]

type=exec

execstart=~/.local/bin/code-server

restart=always

user=root

[install]

wantedby=default.target

eof systemctl daemon-reload && systemctl enable code-server

systemctl start code-server 2>&1)

status=$?

updateprogress 95 "$msg" "$status" "code-server install"

}

安裝完成後記得修改~/.config/code-server/config.yaml下的密碼,埠為5000。如果你要用上證書,就最好搭配指令碼中的nginx+certbot申請的那個。cert: false也可以用假的localhost的那個,但是基本沒有什麼用。

在雲主機上安裝vscodeonline

好了不廢話了。下面依然在一台ubuntu 1h2g上進行。一些變數 mirror path the code server web ide code server path codeserver 指令碼被做成融合成安裝pai和openfaas的風格,按standalone方式安裝,以root身份執行...

部署在安全的主機上

最後一步是將我們的天氣應用部署在乙個支撐 https 的伺服器上。如果你目前還沒有乙個這樣的主機,那麼最簡單 且免費 的方法絕對是使用我們的靜態資源部署服務 firebase。它非常容易使用,通過 https 來提供服務且在全球 cdn 中。還有一些你需要考慮的事情,壓縮關鍵的 css 樣式並將其內...

騰訊雲主機上安裝kali以及遇到問題

具體實現思路 由於雲主機官方沒有提供kali的映象,我們可以用虛擬機器硬碟檔案自製映象 然後上傳 重灌雲主機 雲主機映象必須是raw格式 qcow2格式 vhd格式 vmdk格式 第一步 安裝virtualbox,安裝後如下 第二步 在virtualbox安裝kali虛擬機器 也就是,你最終製作的映...