云服务器搭建小雅Alist全流程

购买云服务器

当前使用的为京东云50一年的云服务器, 其他品牌服务器步骤类似

京东云购买链接

相关教程

当前部署小雅Alist的过程参考了很多此视频的教程

部署过程

打开终端工具,连接服务器后执行如下流程开始部署

1.0 更新软件源

1
apt update

除了使用此方式更新软件源、也可以通过下面步骤中提到的安装脚本进行更新

1.1 修改时区(当前服务器不需要)

1
sudo timedatectl set-timezone Asia/Shanghai

1.2 测试服务器性能(非必选)

1
wget -qO- bench.sh | bash

1.3 修改服务器DNS

云服务器默认的DNS无法解析小雅的网址,需要修改DNS。修改/etc/systemd/resolved.conf文件,参考配置如下。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#  This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.

[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
#DNS=
#FallbackDNS=
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
DNS=114.114.114.114
DNS=8.8.8.8

验证是否安装成功,执行

1
nslookup docker.xiaoya.pro

如果有解析结果,说明安装成功

1
2
3
4
5
6
7
8
9
10
11
12
Server:         114.114.114.114
Address: 114.114.114.114#53

Non-authoritative answer:
Name: docker.xiaoya.pro
Address: 172.67.178.229
Name: docker.xiaoya.pro
Address: 104.21.17.247
Name: docker.xiaoya.pro
Address: 2606:4700:3036::ac43:b2e5
Name: docker.xiaoya.pro
Address: 2606:4700:3030::6815:11f7
1.4 一键安装小雅脚本

此脚本使用的为上述视频中提到的脚本、如果有其他需求可根据需求进行添加。安装的脚本为“7. 安装小雅alist”及“8. 安装小雅转存清理工具”

1
wget -qO pi.sh https://cafe.cpolar.cn/wkdaily/zero3/raw/branch/main/zero3/pi.sh && chmod +x pi.sh && ./pi.sh
1.5 服务器开启外部端口

进入京东云控制台, 开启5244和5678端口。

https://console.jdcloud.com/next-overview




等待小雅安装完成后就可以通过IP+5678端口访问小雅


云服务器搭建小雅Alist全流程
https://www.eldpepar.com/deploy/65171/
作者
EldPepar
发布于
2024年5月25日
许可协议