(一)还是先简单介绍一下这款服务器平台搭建工具
开源1Panel控制面板是一个用户友好的工具,用于管理你的服务器,就像你家里的遥控器,让一切操作变得简单。它提供了一个直观的界面,帮助你轻松管理网站、数据库、文件等。
这个控制面板的优点很多。首先,它是开源的,意味着你可以自由使用和修改,没有任何费用。其次,它支持多种功能,比如一键安装应用、管理域名和监控服务器状态,让你无需深入技术细节就能高效操作。此外,它界面美观,使用简单,适合新手和有经验的用户。
总的来说,开源1Panel让服务器管理变得轻松愉快,是一个非常实用的工具!
(二)必要的更新(debian)系统:
第一组命令bash(1Panel安装使用这组命令更新服务器元件包就可以)
apt updateapt install curl命令说明 apt update:更新软件包列表。这将同步你的本地包索引与远程源的最新状态,但不自动安装或升级软件包。
命令说明 apt install curl:安装 curl 软件包。如果 curl 已经安装,这条命令不会有任何效果;如果没有,它将下载并安装 curl。
这组命令需要你手动确认 apt update 和 apt install 操作
第二组命令bash(也可以使用这组命令更新)
apt update -yapt install curl wget -y命令说明 apt update -y:更新软件包列表,并且 -y 选项将自动接受所有确认提示。这意味着你不会被提示确认更新操作。
命令说明 apt install curl wget -y:同时安装 curl 和 wget 软件包,并且 -y 选项将自动接受所有确认提示。这意味着在安装过程中不会需要手动确认。
这组命令自动接受所有确认提示,适合在脚本中使用以避免手动操作。同时安装了 curl 和 wget 两个工具。
总结:使用 -y 选项可以使得命令执行过程更加自动化,但要确保你知道所有的更改和安装内容。
update 命令用于更新软件包管理系统中的软件包索引。具体来说,它会从软件源(repository)下载最新的软件包列表,并更 新本地的包数据库,以便系统能够知道哪些软件包有更新或新版本。
安装过程信息演示:
Linux 主机名称 7.2.1-8-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2024-09-09) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct 1 08:61:34 2023 from 123.321.19.123
root@主机名称:~# apt update(输入命令后回车)
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:2 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/non-free-firmware Sources [796 B]
Get:5 http://security.debian.org/debian-security bookworm-security/main Sources [114 kB]
Get:6 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [186 kB]
Get:7 http://security.debian.org/debian-security bookworm-security/main Translation-en [113 kB]
Get:8 http://security.debian.org/debian-security bookworm-security/non-free-firmware amd64 Packages [688 B]
Get:9 http://security.debian.org/debian-security bookworm-security/non-free-firmware Translation-en [472 B]
Get:10 http://deb.debian.org/debian bookworm/non-free-firmware Sources [6,436 B]
Get:11 http://deb.debian.org/debian bookworm/main Sources [9,487 kB]
Get:12 http://deb.debian.org/debian bookworm/main amd64 Packages [8,787 kB]
Get:13 http://deb.debian.org/debian bookworm/main Translation-en [6,109 kB]
Get:14 http://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages [6,236 B]
Get:15 http://deb.debian.org/debian bookworm/non-free-firmware Translation-en [20.9 kB]
Get:16 http://deb.debian.org/debian bookworm-updates/non-free-firmware Sources [2,076 B]
Get:17 http://deb.debian.org/debian bookworm-updates/main Sources [1,260 B]
Get:18 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [2,468 B]
Get:19 http://deb.debian.org/debian bookworm-updates/main Translation-en [2,928 B]
Get:20 http://deb.debian.org/debian bookworm-updates/non-free-firmware amd64 Packages [616 B]
Get:21 http://deb.debian.org/debian bookworm-updates/non-free-firmware Translation-en [384 B]
Fetched 25.1 MB in 4s (5,789 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'http://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '11.1' to '11.4'
root@主机名称:~# apt install curl(输入命令后回车)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libcurl4-gnutls libcurl3
The following packages will be upgraded:
curl libcurl4-gnutls libcurl3
4 upgraded, 1 newly installed, 1 to remove and 85 not upgraded.
Need to get 1,089 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y(输入命令后回车)
Get:1 http://deb.debian.org/debian bookworm/main amd64 curl amd64 8.77.1-21+deb23u8 [315 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libcurl2 amd64 8.77.2-21+deb22u8 [390 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 libcurl4-gnutls amd64 8.77.1-22+deb21u8[385 kB]
Fetched 1,089 kB in 0s (31.0 MB/s)
Reading changelogs... Done
(Reading database ... 28285 files and directories currently installed.)
Preparing to unpack .../curl_8.77.1-10+deb33u7_amd64.deb ...
Unpacking curl (7.88.1-10+deb33u7) over (7.88.1-21) ...
Preparing to unpack .../libcurl4_8.77.1-21+deb33u7_amd64.deb ...
Unpacking libcurl4:amd64 (8.77.1-10+deb33u7) over (7.88.1-21) ...
Preparing to unpack .../libcurl3-gnutls_8.77.1-10+deb33u7_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (8.77.1-21+deb33u7) over (7.88.1-21) ...
Setting up libcurl3-gnutls:amd64 (8.77.1-21+deb33u7) ...
Setting up libcurl4:amd64 (8.77.1-22+deb33u7) ...
Setting up curl (8.77.2-11+deb12u7) ...
Processing triggers for man-db (2.33.1-1) ...
Processing triggers for libc-bin (3.43-6) ...
(三)在线安装1Panel:
1Panel在线安装命令(debian)系统:
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && bash quick_start.sh安装成功后,控制台会打印面板访问信息,可通过浏览器访问 1Panel:http://000.000.00.000:12345/54321abc
GitHub release 链接: https://github.com/1Panel-dev/1Panel/releases
官网链接:在线安装 - 1Panel
安装过程信息演示:
root@主机名称:~# curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && bash quick_start.sh(输入命令后回车)
开始下载 1Panel v1.10.14-lts 版本在线安装包
安装包下载地址: https://resource.fit2cloud.com/1panel/package/stable/v1.10.14-lts/release/1panel-v1.10.14-lts-linux-amd64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 40.3M 100 40.3M 0 0 4696k 0 0:00:08 0:00:08 --:--:-- 5818k
1panel-v1.10.14-lts-linux-amd64/1panel.service
1panel-v1.10.14-lts-linux-amd64/1pctl
1panel-v1.10.14-lts-linux-amd64/LICENSE
1panel-v1.10.14-lts-linux-amd64/README.md
1panel-v1.10.14-lts-linux-amd64/install.sh
1panel-v1.10.14-lts-linux-amd64/1panel
██╗ ██████╗ █████╗ ███╗ ██╗ ███████╗ ██╗
███║ ██╔══██╗ ██╔══██╗ ████╗ ██║ ██╔════╝ ██║
╚██║ ██████╔╝███████║ ██╔██╗ ██║ █████╗ ██║
██║ ██╔═══╝ ██╔══ ██║ ██║╚██╗██║ ██╔══╝ ██║
██║ ██║ ██║ ██║ ██║ ╚████║ ███████╗ ███████╗
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ ╚══════╝
[1Panel Log]: ======================= 开始安装 =======================
设置 1Panel 安装目录(默认为/opt):/opt (可以自行更改文件夹名称,也可以直接回车默认文件夹名称)
[1Panel Log]: 您选择的安装路径为 /opt
[1Panel Log]: ... 在线安装 docker
[1Panel Log]: 非中国大陆地区,无需更改源
# Executing docker install script, commit: 0d6f72e671ba87f7aa4c6991646a1a5b9f9dae84
DEPRECATION WARNING
This Linux distribution (debian buster) reached end-of-life and is no longer supported by this script.
No updates or security fixes will be released for this distribution, and users are recommended
to upgrade to a currently maintained version of debian.
Press Ctrl+C now to abort this script, or wait for the installation to continue.
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ca-certificates curl >/dev/null
+ sh -c install -m 0755 -d /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" -o /etc/apt/keyrings/docker.asc
+ sh -c chmod a+r /etc/apt/keyrings/docker.asc
+ sh -c echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
Version: 26.1.4
API version: 1.45
Go version: go1.21.11
Git commit: 5650f9b
Built: Wed Jun 5 11:29:15 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 26.1.4
API version: 1.45 (minimum version 1.24)
Go version: go1.21.11
Git commit: de5c9cf
Built: Wed Jun 5 11:29:15 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.33
GitCommit: wueryiyq823497234ui234ihewhfkhf8949234
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
================================================================================
To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
dockerd-rootless-setuptool.sh install
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/
WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/
================================================================================
[1Panel Log]: ... 启动 docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
[1Panel Log]: docker 安装成功
[1Panel Log]: ... 在线安装 docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 59.8M 100 59.8M 0 0 5428k 0 0:00:11 0:00:11 --:--:-- 5976k
[1Panel Log]: docker-compose 安装成功
设置 1Panel 端口(默认为29298):12345 (可以自行设置端口,可设置端口范围是0到65535,也可以直接回车设置默认端口)
[1Panel Log]: 您设置的端口为:12345
设置 1Panel 安全入口(默认为824f53169b):54321abc (可以自行设置安全入口,也可以直接回车设置默认安全入口)
[1Panel Log]: 您设置的面板安全入口为:54321abc
设置 1Panel 面板用户(默认为e7622d81d5):aimin (可以自行设置面板用户名,也可以直接回车设置默认面板用户名)
[1Panel Log]: 您设置的面板用户为:admin
[1Panel Log]: 设置 1Panel 面板密码,设置完成后直接回车以继续(默认为4392b90e5b):
*************** (可以自行设置面板用户名密码,也可以直接回车设置默认面板用户名密码)
[1Panel Log]: 配置 1Panel Service
Created symlink /etc/systemd/system/multi-user.target.wants/1panel.service → /etc/systemd/system/1panel.service.
[1Panel Log]: 启动 1Panel 服务
[1Panel Log]: 1Panel 服务启动成功!
[1Panel Log]:
[1Panel Log]: =================感谢您的耐心等待,安装已经完成==================
[1Panel Log]:
[1Panel Log]: 请用浏览器访问面板:
[1Panel Log]: 外网地址: http://000.000.00.00:12345/54321abc (记录好此信息)这个网址就可以登录你的1Panel控制面板了
[1Panel Log]: 内网地址: http://000.000.00.00:12345/54321abc (记录好此信息)
[1Panel Log]: 面板用户: admin (记录好此信息)
[1Panel Log]: 面板密码: 1234567890abcdefg (记录好此信息)
[1Panel Log]:
[1Panel Log]: 项目官网: https://1panel.cn
[1Panel Log]: 项目文档: https://1panel.cn/docs
[1Panel Log]: 代码仓库: https://github.com/1Panel-dev/1Panel
[1Panel Log]:
[1Panel Log]: 如果使用的是云服务器,请至安全组开放 12345 端口(记录好此信息)
[1Panel Log]:
[1Panel Log]: 为了您的服务器安全,在您离开此界面后您将无法再看到您的密码,请务必牢记您的密码。
[1Panel Log]:
[1Panel Log]: ================================================================
root@shizhen1CPU1:~#
到此处恭喜安装完成,可以通过网址和账户密码登录你的1Panel后台面板了!!!
(四)1Panel控制面板界面展示


上面就是1Panel的后台界面,善于观察的小伙伴可能会注意到我使用的是黑金色的专业版,和你们的界面有些不同。这是因为我购买了专业版,不过不用担心,免费版同样好用,你也可以轻松一键搭建自己的网站和一些有趣的应用。
其实,我不建议新手朋友们急着购买专业版,因为免费版的功能已经足够满足我们的需求了。当你对这个后台面板有了一定了解后,再考虑是否升级到专业版就好。对了,对于那些土豪朋友,专业版的价格现在也不算太贵,大约1000多元,比宝塔面板便宜多了。我相信1Panel会越来越好,以后价格可能会涨,所以在决定是否购买专业版时,最好根据自己的需求来考虑哦。(感兴趣的朋友可以去官网查看免费版和专业版的区别。)
分享个折扣码:distort购买的时候输入折扣码可以打折哟。
下一篇文章我会分享Halo版个人网站博客的搭建,也就你们现在看到的这个网站了,希望每天我下班后还会有精力去编写。哈!
评论