[Termux]更换Termux源 安装Debian容器并 设置Debian镜像源且 安装code-server(附安卓/APK安装包+下载源+lanzou)

发布时间 2023-04-28 10:39:24作者: Cela

前言

Termux开发者称已经不会在Google Play上更新该应用了,要么在Github下载要么去F-Driod下载,为了方便下载,本文已经给出下载链接...

GitHub下载链接:

https://github.com/termux/termux-app/releases/download/v0.118.0/termux-app_v0.118.0+github-debug_universal.apk

(GitHub直提转)lanzou下载链接:

https://wwbh.lanzouw.com/i2UY30u1zhhg?如果链接异常请评论区告诉我

.apk的安装方法就不用说了罢(


 安装完后,打开Termux...

启用与设备的存储交互

  启用与安卓系统文件系统的连接,如果系统管理器没有关联安卓原生快捷目录,则使用“质感文件”即可进行更便捷的文件管理(酷安有下载)

termux-setup-storage

 

更新套件

pkg update

  切换Termux镜像源

    键入以下命令,如果想让Termux自动选择,则直接回车即可;如果想要指定镜像源,则选择'Single mirror', 'Mirrors in Asia'(我这边选的是USTC),最后再回车

termux-change-repo

 

安装proot-distro容器

  在Termux下键入命令

pkg install proot-distro pulseaudio

  然后这样可能要等好久,费点时间,耐心等待就行了。

proot-distro list #列出所有可安装的容器
proot-distro debian #我这边选的是Debian

  登录容器

proot-distro login debian #默认以root身份登录

 

 

更新Debian套件

apt update && apt upgrade -y

  切换Debian镜像源

apt install apt-transport-https openssl screen sudo -y
sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.lis

  安装ssh然后启动

apt install ssh -y
service ssh start #一般没有启用systemctl,服务命令基本用service代替

 

 

在容器Debian下安装code-server

  键入命令自动下载安装(可能要十分钟左右)

curl -fsSL https://code-server.dev/install.sh | sh

   键入命令自动生成配置文件

code-server

  修改配置文件

nano /root/.config/code-server/config.yaml

  可以根据自身需求自定更改,然后Ctrl+X, Y, Enter保存

bind-addr: 0.0.0.0:8111 #默认localhost 不修改则无法使用IP访问
auth: password #使用密码作为登入方式
password: weCoding #登入密码 不建议使用空格
cert: false #关闭证书登入方式

之后在键入命令启动即可

screen -S codeServer #//可选//使用多窗口还能多做点其他的 前提是你的SOC把握得住
code-server #启动

 

 


 

附1

http://mirrors.ustc.edu.cn/help/termux.html?Termux的中科大源
http://mirrors.ustc.edu.cn/help/debian.html?Debian的中科大源