armbian、debian、ubuntu手动安装alist教程(超详细)

 

一、官网下载对应版本的alist文件

官网:https://github.com/alist-org/alist/releases

2023-04-07_133047

也可以用“wget 下载链接

二、用FTP工具上传到某个目录

1.解压下载的文件,得到可执行文件:

tar -zxvf alist-xxxx.tar.gz

2.授予程序执行权限:

chmod +x alist

3.运行程序

./alist server

4.获得管理员信息

./alist admin

三、添加守护进程,确保开机重启

使用任意方式编辑 /usr/lib/systemd/system/alist.service 并添加如下内容,其中 path_alist 为 AList 所在的路径

[Unit]
Description=alist
After=network.target

[Service]
Type=simple
WorkingDirectory=path_alist
ExecStart=path_alist/alist server
Restart=on-failure

[Install]
WantedBy=multi-user.target

然后,执行 systemctl daemon-reload 重载配置,现在你可以使用这些命令来管理程序:

  • 启动: systemctl start alist

  • 关闭: systemctl stop alist

  • 配置开机自启: systemctl enable alist

  • 取消开机自启: systemctl disable alist

  • 状态: systemctl status alist

  • 重启: systemctl restart alist

四、一般故障处理:

1、无法启动

注意alist.service的路径/usr/lib/systemd/system/alist.service ,不能弄错,有的教程写的路径为etc/systemd/system是错的。会导致无法启动。

2、端口被占用的故障

1.输入以下代码,查看系统当前所有被占用端口:

netstat -tln

2.根据端口查询进程,输入以下代码就可以看到当前被占用的端口的进程的进程编号(PID):

lsof -i :端口

3.既然知道进程号了,那杀死当前进程就简单多了:

kill -9 PID

2023-04-07_134609

4、重启服务即可。

3、忘记管理员密码

打开alist文件所在目录,如/opt/alist,运行命令

./alist admin

获取密码

评论

此博客中的热门博文

群晖:EMBY解锁Premiere的方法,emby server破解方法

超实用五、六类网线水晶头接法,口诀记好

全网最详细nginx+php+mysql保姆级typecho博客搭建教程