首页
关于
Search
1
:Uptime Kuma网站监控搭建教程
177 阅读
2
甲骨文ARM搭建云手机
177 阅读
3
甲骨文DD系统
166 阅读
4
常用脚本
157 阅读
5
linuxdeploy开机自启
143 阅读
默认分类
登录
Search
标签搜索
linux
linuxdeploy
EUSERV
aria2
alist
DDNS
python
IPV6
HAX
宝塔
ssh
甲骨文
DD
微软E5
Microsoft 365 E5 Renew X
FRP
安卓
nginx
Cloudflare
紫鼠
累计撰写
26
篇文章
累计收到
1
条评论
首页
栏目
默认分类
页面
关于
搜索到
2
篇与
的结果
2023-03-07
安卓旧手机利用,linuxdeploy使用教程
安装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 custom_domains = sp.puguying.ml use_encryption = false use_compression = true [jg-https-sp] privilege_mode = true type = https local_ip = 127.0.0.1 local_port = 4003 custom_domains = sp.puguying.ml use_encryption = false use_compression = true [jg-http-ts] privilege_mode = true type = http local_ip = 127.0.0.1 local_port = 3001 custom_domains = ts.puguying.ml use_encryption = false use_compression = true [jg-https-ts] privilege_mode = true type = https local_ip = 127.0.0.1 local_port = 3002 custom_domains = ts.puguying.ml use_encryption = false use_compression = true安装supervisorapt-get install supervisor配置supervisor[inet_http_server] port=0.0.0.0:4001 ;默认配置只能本地访问,配置成0.0.0.0可以通过外部查看监控界面 username=xname password=mima [supervisord] logfile=/home/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=name ; should be same as http_username if set password=mima ; should be same as http_password if set [program:alist] ;进程名 command = /home/alist/alist server ;运行的命令 directory = /home/alist/ ;运行命令所在的文件夹 stdout_logfile = /home/log/alist.log ;日志打印文件位置 autostart = true ;是否设置启动后自动启进程 startsecs = 5 ;设置启动后几秒开始启进程 autorestart = true ;是否自动重启 startretries = 9999999 ;重启次数 stdout_logfile_maxbytes = 10KB ;日志最大容量,达到后新建一个日志文件 [program:Agent] ;进程名 command = /home/nazha/nezha-agent -s 网址 -p 秘钥 ;运行的命令 directory = /home/nazha/ ;运行命令所在的文件夹 stdout_logfile = /home/log/agent.log ;日志打印文件位置 autostart = true ;是否设置启动后自动启进程 startsecs = 5 ;设置启动后几秒开始启进程 autorestart = true ;是否自动重启 startretries = 9999999 ;重启次数 stdout_logfile_maxbytes = 10KB ;日志最大容量,达到后新建一个日志文件 [program:message] ;进程名 command = /home/message/message --port 3000 --log-dir /home/message/logs ;运行的命令 directory = /home/message/ ;运行命令所在的文件夹 stdout_logfile = /home/log/message-pusher.log ;日志打印文件位置 autostart = true ;是否设置启动后自动启进程 startsecs = 5 ;设置启动后几秒开始启进程 autorestart = true ;是否自动重启 startretries = 9999999 ;重启次数 stdout_logfile_maxbytes = 10KB ;日志最大容量,达到后新建一个日志文件 [program:frp] ;进程名 command = /home/frp/frpc -c /home/frp/frpc.ini ;运行的命令 directory = /home/frp/ ;运行命令所在的文件夹 stdout_logfile = /home/log/x_ui.log ;日志打印文件位置 autostart = true ;是否设置启动后自动启进程 startsecs = 5 ;设置启动后几秒开始启进程 autorestart = true ;是否自动重启 startretries = 9999999 ;重启次数 stdout_logfile_maxbytes = 10KB ;日志最大容量,达到后新建一个日志文件设置supervisor目录supervisord -c /home/supervisord/supervisord.conf重启supervisorsupervisorctl update supervisorctl reload如果出错设置权限cd /home/alist chmod u+x alist cd /home/ddns chmod u+x ddns cd /home/frp chmod u+x frpc cd /home/message chmod u+x message cd /home/nazha chmod u+x nezha-agent cd /home mkdir log安装nginxapt install nginx配置nginx备份源数据cd /etc/nginx/ cp nginx.conf bnginx.conf修改nginx.confuser www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } ######http段开始###### http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; ######守护进程开始###### server { listen 4002; server_name sp.puguying.ml; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 4003 ssl; server_name sp.puguying.ml; ssl_certificate /home/ssl/ssl.cer; ssl_certificate_key /home/ssl/ssl.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log off; location / { proxy_pass http://127.0.0.1:4001; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ######进程守护结束###### ######al网盘开始###### server { listen 5242; server_name al.puguying.ml localhost; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 5243 ssl; server_name al.puguying.ml localhost; ssl_certificate /home/ssl/ssl.cer; ssl_certificate_key /home/ssl/ssl.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log off; location / { proxy_pass http://127.0.0.1:5244; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ######al网盘结束###### ######ddns###### server { listen 9874; server_name ddns.puguying.ml localhost; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 9875 ssl; server_name ddns.puguying.ml localhost; ssl_certificate /home/ssl/ssl.cer; ssl_certificate_key /home/ssl/ssl.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log off; location / { proxy_pass http://127.0.0.1:9876; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ######ddns###### ######青龙###### server { listen 5701; server_name ql.puguying.ml localhost; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 5702 ssl; server_name ql.puguying.ml localhost; ssl_certificate /home/ssl/ssl.cer; ssl_certificate_key /home/ssl/ssl.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log off; location / { proxy_pass http://127.0.0.1:5700; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ######青龙###### ######message-pusher###### server { listen 3001; server_name ts.puguying.ml localhost; rewrite ^(.*) https://$server_name$1 permanent; } server { listen 3002 ssl; server_name ts.puguying.ml localhost; ssl_certificate /home/ssl/ssl.cer; ssl_certificate_key /home/ssl/ssl.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log off; location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } ######message-pusher结束###### } ######http段结束######为nginx配置权限sudo usermod -a -G aid_inet,aid_net_raw www-data重启nginxnginx -s reload由于无法使用systemd,只能是我init.d来实现已启动init.d命令service < option > | --status-all | [ service_name [ command | --full-restart ] ]
2023年03月07日
122 阅读
0 评论
0 点赞
2022-12-16
搭建alist配合aria2实现离线下载
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
2022年12月16日
104 阅读
0 评论
0 点赞