目录
一键脚本
仅支持Linux-x86_64/aarch64平台。
安装
curl -fsSL "https://nn.ci/alist.sh" | bash -s install
更新
curl -fsSL "https://nn.ci/alist.sh" | bash -s update
卸载
curl -fsSL "https://nn.ci/alist.sh" | bash -s uninstall
# 安装 curl -fsSL "https://nn.ci/alist.sh" | bash -s install /root # 更新 curl -fsSL "https://nn.ci/alist.sh" | bash -s update /root # 卸载 curl -fsSL "https://nn.ci/alist.sh" | bash -s uninstall /root
手动安装
获取Alist
打开AList Release下载要部署的系统对应的文件,最新的版本前端已经与后端打包在一起,无需再次下载前端文件。
运行起来
Linux
# 解压下载对文件得到可执行文件: tar -zxvf alist-xxxx.tar.gz # 赋予程序执行权限: chmod +x alist-xxxx # 运行程序 ./alist-xxxx
守护进程
vim /etc/systemd/system/alist.service
添加以下内容,其中path_alist为alist所在的路径
[Unit]
Description=alist
After=network.target
[Service]
Type=simple
WorkingDirectory=path_alist
ExecStart=path_alist/alist-xxxx -conf data/config.json
Restart=on-failure
[Install]
WantedBy=multi-user.target
然后systemctl daemon-reload
,现在你就可以使用这些命令来管理程序了:
-
启动:
systemctl start alist
-
关闭:
systemctl stop alist
-
自启:
systemctl enable alist
-
状态:
systemctl status alist
-
重启:
systemctl restart alist
反向代理
程序默认监听5244端口
nginx
在网站的配置文件的server字段中加入
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_pass http://127.0.0.1:5244;
# 上传的最大文件尺寸
client_max_body_size 20000m;
}
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容