Alist安装指南-支持多家的网盘列表
⚠️注意⚠️
更直观的安装步骤请移步
AListDoc
https://alist-doc.nn.ci/docs/intro
安装
一键脚本
仅支持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
自定义路径
默认安装在/opt/alist
,要自定义安装路径,添加安装路径为第二个参数,必须是绝对路径(路径以alist结尾时直接安装到给定路径,否则会安装在给定路径alist目录下),如安装到/root
# 安装
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
反向代理
程序默认监听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;
}
⚠️已如果你使用宝塔,请务必删除以下默认配置⚠️
- location ~ ^/(.user.ini|.htaccess|.git|.svn|.project|LICENSE|README.md
- location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
- location ~ .*.(js|css)?$
Apache
在VirtualHost字段下加入反代配置项ProxyPass,比如:
<VirtualHost*:80>
ServerName myapp.example.com
ServerAdmin webmaster@example.com
DocumentRoot /www/myapp/public
AllowEncodedSlashes NoDecode
ProxyPass "/" "http://127.0.0.1:5244/" nocanon
</VirtualHost>
Caddy
在Caddyfile文件下加入反代配置项reverse_proxy,比如:
:80 {
reverse_proxy 127.0.0.1:5244
}