1Panel 是一个现代化、开源的 Linux 服务器运维管理面板。
特点:
前提条件:本文演示使用Vmware 虚拟机安装Cent OS-7,相关信息如下:
主机名称 | IP地址 | 操作系统 | 1Panel版本 |
localhost.localdomain |
192.168.43.10 | CentOS Linux release 7.9.2009 (Core) | V1.9.2 |
第一步:切换至1Panel 存放目录地址,我这里是存放在(/usr/local)目录中。
[root@localhost ~]# cd /usr/local
第二步:使用如下指令,实现一键安装1Panel.
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sh quick_start.sh
[root@localhost local]# curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sh quick_start.sh
开始下载 1Panel v1.9.2 版本在线安装包
安装包下载地址: https://resource.fit2cloud.com/1panel/package/stable/v1.9.2/release/1panel-v1.9.2-linux-amd64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 39.9M 100 39.9M 0 0 3950k 0 0:00:10 0:00:10 --:--:-- 5015k
1panel-v1.9.2-linux-amd64/1panel.service
1panel-v1.9.2-linux-amd64/1pctl
1panel-v1.9.2-linux-amd64/LICENSE
1panel-v1.9.2-linux-amd64/README.md
1panel-v1.9.2-linux-amd64/install.sh
1panel-v1.9.2-linux-amd64/1panel
██╗ ██████╗ █████╗ ███╗ ██╗███████╗██╗
███║ ██╔══██╗██╔══██╗████╗ ██║██╔════╝██║
╚██║ ██████╔╝███████║██╔██╗ ██║█████╗ ██║
██║ ██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝ ██║
██║ ██║ ██║ ██║██║ ╚████║███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝
[1Panel Log]: ======================= 开始安装 =======================
设置 1Panel 安装目录(默认为/opt):/usr/local
[1Panel Log]: 检测到 Docker 已安装,跳过安装步骤
[1Panel Log]: 启动 Docker
[1Panel Log]: ... 在线安装 docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 56.8M 100 56.8M 0 0 4890k 0 0:00:11 0:00:11 --:--:-- 5282k
[1Panel Log]: docker-compose 安装成功
设置 1Panel 端口(默认为12483):
[1Panel Log]: 您设置的端口为:12483
[1Panel Log]: 防火墙未开启,忽略端口开放
设置 1Panel 面板用户(默认为096a3ebb43):1Panel
[1Panel Log]: 您设置的面板用户为:1Panel
设置 1Panel 面板密码(默认为c5930bf453):
错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位
设置 1Panel 面板密码(默认为c5930bf453):
[1Panel Log]: 配置 1Panel Service
Created symlink from /etc/systemd/system/multi-user.target.wants/1panel.service to /etc/systemd/system/1panel.service.
[1Panel Log]: 启动 1Panel 服务
[1Panel Log]: 1Panel 服务启动成功!
[1Panel Log]:
[1Panel Log]: =================感谢您的耐心等待,安装已经完成==================
[1Panel Log]:
[1Panel Log]: 请用浏览器访问面板:
[1Panel Log]: 外网地址: http://163.125.205.3:12483/e5140280b6
[1Panel Log]: 内网地址: http://192.168.43.10:12483/e5140280b6
[1Panel Log]: 面板用户: 1Panel
[1Panel Log]: 面板密码: Qwe102938
[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]: 如果使用的是云服务器,请至安全组开放 12483 端口
[1Panel Log]:
记录1Panel的重点配置信息
1Panel 的安装目录:/usr/local
1Panel 的端口:12483
1Panel 的用户:1Panel
1Panel 的密码: Qwe102938
第三步:检查1Panel.service 服务状态,请执行如下指令:
systemctl status 1panel.service
[root@localhost bin]# systemctl status 1panel.service
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; vendor preset: disabled)
Active: active (running) since 六 2023-12-30 22:21:05 CST; 20min ago
Main PID: 32666 (1panel)
Tasks: 7
Memory: 76.9M
CGroup: /system.slice/1panel.service
└─32666 /usr/bin/1panel
第四步:检查1Panel 应用对应的端口12483 是否正常启动,请执行如下指令:
ss -tunlp |grep 12483
[root@localhost bin]# ss -tunlp |grep 12483
tcp LISTEN 0 128 *:12483 *:* users:(("1panel",pid=32666,fd=19))
至此,说明 1Panel 应用部署成功。
前提条件:1Panel 运维管理平台访问地址:http://192.168.43.10:12483/e5140280b6
安装1Panel 设置的用户名和密码:
1Panel 的用户:1Panel
1Panel 的密码: Qwe102938
1Panel可以对宿主机容器进行管理,包括对宿主机内的容器、镜像、容器编排、网络、存储卷、容器仓库、docker基本配置等进行管理操作。
1Panel 默认内置了命令行运维工具 1pctl,通过执行 1pctl help,可以查看相关的命令说明。
[root@localhost bin]# 1pctl --help
1Panel 控制脚本
Usage:
./1pctl [COMMAND] [ARGS...]
./1pctl --help
Commands:
status 查看 1Panel 服务运行状态
start 启动 1Panel 服务
stop 停止 1Panel 服务
restart 重启 1Panel 服务
uninstall 卸载 1Panel 服务
user-info 获取 1Panel 用户信息
listen-ip 切换 1Panel 监听 IP
version 查看 1Panel 版本信息
update 修改 1Panel 系统信息
reset 重置 1Panel 系统信息
restore 恢复 1Panel 服务及数据
如果想关闭1Panel 应用,请执行如下指令:
1pctl stop
[root@localhost bin]# 1pctl stop
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; vendor preset: disabled)
Active: inactive (dead) since 六 2023-12-30 23:27:49 CST; 29ms ago
Process: 32666 ExecStart=/usr/bin/1panel (code=killed, signal=TERM)
Main PID: 32666 (code=killed, signal=TERM)
12月 30 23:24:54 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:24:54 | 200 | 8.944312ms | 192.168.43.1 | POST "...earch"
12月 30 23:24:54 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:24:54 | 200 | 10.760219ms | 192.168.43.1 | GET "...lable"
12月 30 23:24:56 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:24:56 | 200 | 19.146582ms | 192.168.43.1 | POST "...ation"
12月 30 23:25:07 localhost.localdomain sudo[55438]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ls
12月 30 23:25:07 localhost.localdomain sudo[55442]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/sbin/swapon --summary
12月 30 23:25:07 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:25:07 | 200 | 352.527819ms | 192.168.43.1 | POST ".../base"
12月 30 23:25:08 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:25:08 | 200 | 6.208913ms | 192.168.43.1 | POST "...earch"
12月 30 23:25:09 localhost.localdomain 1panel[32666]: [GIN] 2023/12/30 - 23:25:09 | 200 | 13.89169ms | 192.168.43.1 | POST "...ation"
12月 30 23:27:49 localhost.localdomain systemd[1]: Stopping 1Panel, a modern open source linux panel...
12月 30 23:27:49 localhost.localdomain systemd[1]: Stopped 1Panel, a modern open source linux panel.
Hint: Some lines were ellipsized, use -l to show in full.
Google 浏览器访问1Panel 运维管理平台效果:
参考文章地址:
1Panel 官方文档:https://1panel.cn/docs/