Linux系统之部署Linux管理面板1Panel

一、介绍
1.1简介
1Panel 是一个现代化、开源的 Linux 服务器运维管理面板。
1.2特点
快速建站:深度集成 Wordpress 和 Halo,域名绑定、SSL 证书配置等一键搞定;
高效管理:通过 Web 端轻松管理 Linux 服务器,包括应用管理、主机监控、文件管理、数据库管理、容器管理等;
安全可靠:最小漏洞暴露面,提供防火墙和安全审计等功能;
一键备份:支持一键备份和恢复,备份数据云端存储,永不丢失。

二、环境准备
关闭防火墙、selinux

systemctl stop firewalld  && systemctl disable  firewalld  
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config 

内核、系统查看(内核版本5.10,系统采用的Euler22.03版本):

[root@cdn ~]# uname -r
5.10.0-153.12.0.92.oe2203sp2.x86_64
[root@cdn ~]# cat  /etc/os-release
NAME="openEuler"
VERSION="22.03 (LTS-SP2)"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 (LTS-SP2)"
ANSI_COLOR="0;31"

三、部署
创建1Panel的安装目录

mkdir -p /data/1panel 

执行一键部署:

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
[root@cdn ~]# curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
开始下载 1Panel v1.9.1 版本在线安装包
安装包下载地址: https://resource.fit2cloud.com/1panel/package/stable/v1.9.1/release/1panel-v1.9.1-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  14.6M      0  0:00:02  0:00:02 --:--:-- 14.6M
1panel-v1.9.1-linux-amd64/1panel.service
1panel-v1.9.1-linux-amd64/1pctl
1panel-v1.9.1-linux-amd64/LICENSE
1panel-v1.9.1-linux-amd64/README.md
1panel-v1.9.1-linux-amd64/install.sh
1panel-v1.9.1-linux-amd64/1panel

 ██╗    ██████╗  █████╗ ███╗   ██╗███████╗██╗
███║    ██╔══██╗██╔══██╗████╗  ██║██╔════╝██║
╚██║    ██████╔╝███████║██╔██╗ ██║█████╗  ██║
 ██║    ██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝  ██║
 ██║    ██║     ██║  ██║██║ ╚████║███████╗███████╗
 ╚═╝    ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝╚══════╝
[1Panel Log]: ======================= 开始安装 =======================
设置 1Panel 安装目录(默认为/opt):^C
[root@cdn ~]#
[root@cdn ~]# mkdir -p /data/1panel
[root@cdn ~]#
[root@cdn ~]# curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
安装包已存在,跳过下载
1panel-v1.9.1-linux-amd64/1panel.service
1panel-v1.9.1-linux-amd64/1pctl
1panel-v1.9.1-linux-amd64/LICENSE
1panel-v1.9.1-linux-amd64/README.md
1panel-v1.9.1-linux-amd64/install.sh
1panel-v1.9.1-linux-amd64/1panel

 ██╗    ██████╗  █████╗ ███╗   ██╗███████╗██╗
███║    ██╔══██╗██╔══██╗████╗  ██║██╔════╝██║
╚██║    ██████╔╝███████║██╔██╗ ██║█████╗  ██║
 ██║    ██╔═══╝ ██╔══██║██║╚██╗██║██╔══╝  ██║
 ██║    ██║     ██║  ██║██║ ╚████║███████╗███████╗
 ╚═╝    ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═══╝╚══════╝╚══════╝
[1Panel Log]: ======================= 开始安装 =======================
设置 1Panel 安装目录(默认为/opt):/data/1panel
[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  16.0M      0  0:00:03  0:00:03 --:--:-- 16.0M
[1Panel Log]: docker-compose 安装成功
设置 1Panel 端口(默认为18077):18077
[1Panel Log]: 您设置的端口为:18077
[1Panel Log]: 防火墙未开启,忽略端口开放
设置 1Panel 面板用户(默认为8a2c2a0bf7):admin
[1Panel Log]: 您设置的面板用户为:admin
设置 1Panel 面板密码(默认为e0cc9faed3):
错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位
设置 1Panel 面板密码(默认为e0cc9faed3):
错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位
设置 1Panel 面板密码(默认为e0cc9faed3):
[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://N/A:18077/dc8ad56460
[1Panel Log]: 内网地址: http://192.168.100.21:18077/dc8ad56460
[1Panel Log]: 面板用户: admin
[1Panel Log]: 面板密码: admin@1234
[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]: 如果使用的是云服务器,请至安全组开放 18077 端口
[1Panel Log]:
[1Panel Log]: ================================================================

四、检查

[root@cdn ~]# 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 Tue 2023-12-19 22:04:58 CST; 9min ago
   Main PID: 2068 (1panel)
      Tasks: 5 (limit: 21391)
     Memory: 71.6M
     CGroup: /system.slice/1panel.service
             └─ 2068 /usr/bin/1panel

Dec 19 22:10:28 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:28 | 200 |    4.111731ms |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |     101.142µs |   192.168.100.1 | GET      "/d>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |    2.960293ms |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |    3.777246ms |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |     539.619µs |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |     827.979µs |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |    1.120943ms |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |    1.242231ms |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |     417.176µs |   192.168.100.1 | GET      "/a>
Dec 19 22:10:59 cdn.tym.com 1panel[2068]: [GIN] 2023/12/19 - 22:10:59 | 200 |    1.869538ms |   192.168.100.1 | GET      "/a>
[root@cdn ~]# ss -tunlp |grep 18077
tcp   LISTEN 0      4096         0.0.0.0:18077      0.0.0.0:*    users:(("1panel",pid=2068,fd=25))

五、页面访问
Linux系统之部署Linux管理面板1Panel_第1张图片Linux系统之部署Linux管理面板1Panel_第2张图片
Linux系统之部署Linux管理面板1Panel_第3张图片

六、运维工具使用
1Panel 默认内置了命令行运维工具 1pctl,通过执行 1pctl help,可以查看相关的命令说明。

[root@cdn ~]# 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 服务及数据

你可能感兴趣的:(linux,运维,服务器)