Alist搭建

Oneindex日常抽风,所以决定对世纪互联的Oneindex弃用,启用Alist。

  1. 宝塔搭建Alist前台站环境,新建站点,FTP和数据库什么的都不需要,PHP版本也不要,纯静态即可,记录下存放网站的根目录。

  2. 下面代码分别是安装、升级和卸载:

    curl -fsSL "https://nn.ci/alist.sh" | bash -s install /www/wwwroot/xxx.com
    curl -fsSL "https://nn.ci/alist.sh" | bash -s update /www/wwwroot/xxx.com
    curl -fsSL "https://nn.ci/alist.sh" | bash -s uninstall /www/wwwroot/xxx.com
  3. 开放端口,反向代理即可访问。

  4. Alist相关指令如下:

    启动: systemctl start alist
    关闭: systemctl stop alist
    自启: systemctl enable alist
    状态: systemctl status alist
    重启: systemctl restart alist
  5. 令牌有效期为90天。到期后,将client_id和client_secret填入https://tool.nn.ci/onedrive/request,点击获取刷新令牌,得到刷新令牌。

Updated 20230304:
alist 由v2更新至v3,不兼容,升级办法如下:

#卸载v2 alist
curl -fsSL "https://nn.ci/alist.sh" | bash -s uninstall /www/wwwroot/xxx.com
#安装v3 alist
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install
#更新v3 alist
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update
#删除v3 alist
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall

参考链接:
https://www.bangshun.com/post/69.html
https://alist-doc.nn.ci/docs/intro
https://www.lizi.tw/web/22262.html

本文链接:

https://ma.ge/archives/565.html