操作系统瞎玩code-server移动端部署
xucanxxcode-server 安卓手机termux环境搭建
在这里是使用的termux这个app。如果手机没有root会有一些限制,比如说无法挂载磁盘,无法访问手机文件。
但是跑一些服务是完全没有问题的。
先把termux下载好
安装ssh
查看ip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| # 安装ssh相关依赖 pkg install openssl pkg install openssh
# 创建ssh密钥 ssh-keygen -A ssh-keygen
# 设置密码 passwd
# 查看用户名和ip whoami ifconfig # 开启ssh服务 sshd
|
code-server安装
官方文档
https://coder.com/docs/code-server/latest/termux
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| # 先在电脑上用 ssh连接上手机 (在电脑端链接手机敲太难受了) ssh username@ip -p 8022
# 安装相关依赖 pkg install -y tur-repo python python3 pkg install -y code-server termux-change-repo pkg update -y pkg upgrade -y pkg install -y \ build-essential \ binutils \ pkg-config \ python3 \ nodejs-lts npm config set python python3 node -v
|
启动
在 ~/.conf/code-server/config.yaml 可以进行相关的配置