紫鼠小窝 - linuxdeploy
type: channel
link: https://puguying.cf/tag/linuxdeploy/
items: 安卓旧手机利用，linuxdeploy使用教程
items: 安卓linuxdeploy使用supervisor代替systemd
items: 搭建alist配合aria2实现离线下载
items: 安卓linuxdeploy使用DDNS

安卓旧手机利用，linuxdeploy使用教程
type: item
date: 2023-03-07T00:59:00+08:00
description: 安装linuxdeploy下载地址作者镜像官方github配置linuxdeploy我选择的是debian，安装源使用的华为云https://mirrors.huaweicloud.com/debian/配置linux修改ssh秘钥和端口bash <(curl -fsSL wj.puguying.cn/key.sh) -p 22 -g xiayikechun -d注:-p为修改端口 -g为github用户秘钥 -d为关闭密码登录安装ddns动态域名解析mkdir /home/ddns wget https://jb.puguying.cn/ddns/ddns && chmod +x ddns && ./ddns -s install安装alist网盘目录使用官网脚本一键安装mkdir /home/alist # 安装 curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install /home/alist # 升级 curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update /home/alist # 卸载 curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall /home/alist安装message-pusher消息推送mkdir /home/message wget wj.puguying.cn/message-pusher && chmod u+x message-pusher安装frpmkdir /home/frp wget https://wj.puguying.cn/frpc && chmod +x frpc配置frpc.ini[common] server_addr = frps ip server_port = frps 端口 log_file = /home/frp/frpc.log log_level = info log_max_days = 3 token = 密码 login_fail_exit = false [jg-http-al] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 5242 custom_domains = al.puguying.ml use_encryption = false use_compression = true [jg-hrrps-al] privilege_mode = true type = https local_ip = 127.0.0.1 local_port = 5243 custom_domains = al.puguying.ml use_encryption = false use_compression = true [jg-http-ddns] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 9874 custom_domains = ddns.puguying.ml use_encryption = false use_compression = true [jg-hrrps-ddns] privilege_mode = true type = https local_ip = 127.0.0.1 local_port = 9875 custom_domains = ddns.puguying.ml use_encryption = false use_compression = true [jg-http-ql] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 5701 custom_domains = ql.puguying.ml use_encryption = false use_compression = true [jg-hrrps-ql] privilege_mode = true type = https local_ip = 127.0.0.1 local_port = 5702 custom_domains = ql.puguying.ml use_encryption = false use_compression = true [jg-http-sp] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 4002 c…

安卓linuxdeploy使用supervisor代替systemd
type: item
date: 2022-12-24T23:01:00+08:00
description: 使用linuxdeploy搭建linux后，无法使用systemd，导致很多程序无法部署，研究后决定使用supervisor代替。安装我用的是debian，可以直接命令安装apt-get install supervisor然后回自动配置好开机自启在init.d目录里边，安装结束开始配置需要的程序启动supervisord进程supervisord -c /etc/supervisor/supervisord.conf修改自己的内容[inet_http_server] port=0.0.0.0:4001 ;默认配置只能本地访问，配置成0.0.0.0可以通过外部查看监控界面 username= 用户名 password= 密码 [supervisord] logfile=/root/jianguo/log/supervisord.log ; (main log file;default $CWD/supervisord.log) logfile_maxbytes=10KB ; (max main logfile bytes b4 rotation;default 50MB) logfile_backups=10 ; (num of main logfile rotation backups;default 10) loglevel=info ; (log level;default info; others: debug,warn,trace) pidfile=/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) nodaemon=false ; (start in foreground if true;default false) minfds=1024 ; (min. avail startup file descriptors;default 1024) minprocs=200 ; (min. avail process descriptors;default 200) [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///run/supervisor/supervisor.sock ; use a unix:// URL for a unix socket serverurl=http://127.0.0.1:4001 username=用户名 ; should be same as http_username if set password=密码 ; should be same as http_password if set [program:frp] ;进程名 command = /root/jianguo/frp/frpc -c /root/jianguo/frp/frpc.ini ;运行的命令 directory = /root/jianguo/frp/ ;运行命令所在的文件夹 stdout_logfile = /root/jianguo/log/x_ui.log ;日志打印文件位置 autostart = true ;是否设置启动后自动启进程 startsecs = 5 ;设置启动后几秒开始启进程 autorestart = true ;是否自动重启 startretries = 9999999 ;重启次数 stdout_logfile_maxbytes = 10KB ;日志最大容量，达到后新建一个日志文件然后重启主进程supervisord:supervisorctl reload另外几个常用命令service supervisor start #开启服务 service supervisor stop #结束服务 service supervisor restart #重启服务 service supervisor status #查看状态

搭建alist配合aria2实现离线下载
type: item
date: 2022-12-16T21:01:00+08:00
description: 1.aria2搭建apt install wget curl ca-certificates wget -N git.io/aria2.sh && chmod +x aria2.sh ./aria2.sh按照提示选择就可以了2.安装alist一键安装参考官网我目前使用的是手机搭建的不能使用systemd只能使用init.d代替了下载程序下载地址wget 文件链接 tar -zxvf 文件名 chmod +x alist ./alist server #记录用户密码后，按ctrl➕c退出在etc/init.d目录创建文件alist，填入下边的代码#!/bin/sh # For RedHat and cousins: # chkconfig: - 99 01 # alist # processname: /root/alist ### BEGIN INIT INFO # Provides: /root/alist # Required-Start: # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: alist # Description: alist ### END INIT INFO cmd="/root/alist "server"" name=$(basename $(readlink -f $0)) pid_file="/var/run/$name.pid" stdout_log="/var/log/$name.log" stderr_log="/var/log/$name.err" [ -e /etc/sysconfig/$name ] && . /etc/sysconfig/$name get_pid() { cat "$pid_file" } is_running() { [ -f "$pid_file" ] && ps $(get_pid) > /dev/null 2>&1 } case "$1" in start) if is_running; then echo "Already started" else echo "Starting $name" $cmd >> "$stdout_log" 2>> "$stderr_log" & echo $! > "$pid_file" if ! is_running; then echo "Unable to start, see $stdout_log and $stderr_log" exit 1 fi fi ;; stop) if is_running; then echo -n "Stopping $name.." kill $(get_pid) for i in $(seq 1 10) do if ! is_running; then break fi echo -n "." sleep 1 done echo if is_running; then echo "Not stopped; may still be shutting down or shutdown may have failed" exit 1 else echo "Stopped" if [ -f "$pid_file" ]; then rm "$pid_file" fi fi else echo "Not running" fi ;; restart) $0 stop if is_running; then echo "Unable to stop, will not attempt to start" exit 1 fi $0 start ;; status) if is_running; then echo "Running" else echo "Stopped" exit 1 fi ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac exit 0如果文件不在root目录，记得修改里边的路径然后执行cd /etc/init.d sudo update-rc.d alist defaults可以参考这个文章 CSDN

安卓linuxdeploy使用DDNS
type: item
date: 2022-12-16T19:01:00+08:00
description: 前言不知道为什么下载最新版的一直报错建议大家可以先使用3.1版安装下边3.1版github 3.1链接站长的镜像国内可下载wget https://github.com/jeessy2/ddns-go/releases/download/v3.1.0/ddns-go_3.1.0_Linux_arm64.tar.gz # 如果下载失败换成站长的镜像 wget https://wj.puguying.cn/ddns-go_3.1.0_Linux_arm64.tar.gz tar -zxvf ddns-go_3.1.0_Linux_arm64.tar.gz sudo ./ddns-go -s install访问 你的ip:9876 进行设置接下来就可以愉快的玩耍啦如果要修改端口和配置文件目录可以输入下边的命令cd /etc/init.d nano ddns-go 修改 cmd="/root/ddns "-l" ":4002" "-f" "300" "-c" "/home/ddns/ddns.yaml""这一段代码-l监听地址-f同步间隔时间(秒)-c自定义配置文件路径然后重启ddnsservice ddns-go restart