405 字
2 分钟

使用宝塔面板部署alis

2024-02-20
浏览量 加载中...

1.创建网站

部署好宝塔之后创建网站,不需要创建创建数据库,PHP版本纯静态。

2.部署alist

安装

curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install

更新

curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update

卸载

curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall

自定义安装目录的只需要将对应目录添加到命令尾部

curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install /www/wwwroot/pan.weirain.com

要记住alist的初始密码。

3.放行端口

把5244端口放行,同时在宝塔→安全也要对5244端口放行。

4.给alist添加反代

点击宝塔→网站菜单→对应网站设置→反向代理→添加反向代理。

点击开启代理,代理名称随意,目标URL设置为:

http://127.0.0.1:5244
``` ,其它默认即可
** 5.Alist管理命令**
启动:
```c
systemctl start alist

关闭:

systemctl stop alist

自启:

systemctl enable alist

状态:

systemctl status alist

重启:

systemctl restart alist

到这里alist就搭建成功了。

6.alist美化

自定义壁纸&文件列表透明30%

<style>
.hope-ui-light{
background-image: url("https://pic.wusuov.com/randimg/fengjing/") !important;
background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position-x:center;
}
.obj-box.hope-stack.hope-c-dhzjXW.hope-c-PJLV.hope-c-PJLV-igScBhH-css {
background-color: rgba(255, 255, 255, 0.3) !important;
}
.hope-c-PJLV.hope-c-PJLV-ikSuVsl-css{
background-color: rgba(255, 255, 255, 0.3) !important;
}
.hope-c-ivMHWx-hZistB-cv.hope-icon-button{
background-color: rgba(255, 255, 255, 0.3) !important;
}
.hope-c-PJLV-ijgzmFG-css{
background-color: rgba(255, 255, 255, 0.3) !important;

7.alist常见错误

解决Alist上传文件时,提示Request failed with status code 413的问题

如果使用的是宝塔建的反向代理,在宝塔的网站配置里找到”client_max_body_size”,原来是要在nginx的配置里修改。 宝塔面板——软件商店——应用搜索——nginx——设置 配置修改——34行的“client_max_body_size”——修改成你想要的最大上传大小,修改成99999M 最后——服务——重启nginx,这样就生效了。

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

使用宝塔面板部署alis
https://www.weirain.com/posts/246/
作者
风尘落微雨
发布于
2024-02-20
许可协议
CC BY-NC-SA 4.0
最后更新于 2024-02-20,距今已过 709 天

部分内容可能已过时

评论区

Profile Image of the Author
风尘落微雨
分享技术,记录生活,探索无限可能
公告
欢迎访问我的博客!
分类
标签
站点统计
文章
26
分类
2
标签
34
总字数
22,996
运行时长
0
最后活动
0 天前

目录