Termux安装配置

文件访问授权

1
termux-setup-storage

更换镜像源

1
2
3
4
5
6
nano $PREFIX/etc/apt/sources.list

deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable main

#更新包
pkg update

安装proot模拟root环境

1
2
3
pkg install proot -y

termux-chroot

安装openssh

1
2
3
pkg install openssh -y
#开启sshd服务
sshd

安装termux-services

1
2
3
4
pkg install termux-services -y

#设置sshd开机自启
sv-enable sshd

进入模拟root环境,修改登录密码

1
2
termux-chroot
passwd

输出ifconfig命令,查看ip地址,在ssh连接工具中输入IP地址,端口为8022

安装Python

1
2
3
pkg install python -y
#查看python版本
python --version

安装pandas

1
2
3
pkg install tur-repo
pkg update
pkg install python-pandas

安装cron

1
pkg install cronie -y

设置后台运行

1
2
3
4
termux-wake-lock
crond
sv-enable crond
sv up crond

查看运行状态

1
sv status crond