【HR】使用Alist搭建一个自己的云盘 糖巴 2022-12-14 关注 私信 10 由于我暂无云盘需求这里使用安卓模拟终端部署演示部署图文以及设置将在评论区展示。 如需部署至服务器请按下面的来 Linux一键脚本,以下脚本仅适用于Linux amd64/arm64 平台 安装 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 手动安装 打开下面github链接下载待部署系统对应的文件 https://github.com/Xhofe/alist/releases Linux/macOS # 解压下载的文件,得到可执行文件: tar -zxvf alist-xxxx.tar.gz # 授予程序执行权限: chmod +x alist # 运行程序 ./alist server # 获得管理员信息 ./alist admin Windows # 解压下载的文件,得到可执行文件: unzip alist-xxxx.zip # 运行程序 .\alist.exe server # 获得管理员信息 .\alist.exe admin win(scoop) # 安装 scoop install alist # 运行 alist server xxxx 指的是不同系统/架构对应的名称,一般 Linux-x86/64 为 alist-linux-amd64。如果你的 glibc 版本太低,建议下载 musl 版本 守护进程(Linux) 使用任意方式编辑 /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 反向代理 程序默认监听 5244 端口。如有修改,请一并修改下列配置中的端口号。如果你使用反向代理,建议你设置site_url,以帮助alist更好的工作。 #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_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_redirect off; proxy_pass http://127.0.0.1:5244; # the max size of file to upload 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 反向代理,由于帖子字数限制,后面的教程在评论区。 这是搭建成功的展示网站:http://yunpan.guyinga.top 下载地址 图片 ? 版权声明内容均来自互联网,如有侵权,请与我联系 本文链接:http://wu.shouluku.com/showinfo-18-3109-0.html THE END 网站源码 源码分享 网站源码分享 app源码下载 喜欢就支持以下吧 点赞 分享QQ空间微博QQ好友海报分享复制链接收藏2