Linux管理面板1Panel

发布时间:2023年12月24日

一、1Panel介绍

1.1、介绍

1Panel是国内飞致云旗下开源产品。整个界面简洁清爽,后端使用GO开发,前端使用VUE的Element-Plus作为UI框架,整个面板的管理都是基于docker的。

1.2、特点

1Panel 是一个现代化、开源的 Linux 服务器运维管理面板。

  • 快速建站:深度集成 Wordpress 和 Halo,域名绑定、SSL 证书配置等一键搞定;

  • 高效管理:通过 Web 端轻松管理 Linux 服务器,包括应用管理、主机监控、文件管理、数据库管理、容器管理等;

  • 安全可靠:最小漏洞暴露面,提供防火墙和安全审计等功能;

  • 一键备份:支持一键备份和恢复,备份数据云端存储,永不丢失。

官网:?https://1panel.cn/

二、1Panel安装

2.1、安装1Panel代码

curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh

2.2、安装1Panel过程

[root@node5 bigdata]# curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash 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  4484k      0  0:00:09  0:00:09 --:--:-- 4510k
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):
[1Panel Log]: 您选择的安装路径为 /opt 
[1Panel Log]: ... 在线安装 docker 

# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b8de
+ sh -c 'yum install -y -q yum-utils'
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#7 - "Failed to connect to 2a05:d012:8b5:6503:9efb:5cad:348f:e826: 网络不可达"
软件包 yum-utils-1.1.31-54.el7_8.noarch 已安装并且是最新版本
+ sh -c 'yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo'
已加载插件:fastestmirror
adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.tuna.tsinghua.edu.cn
 * epel: mirrors.bfsu.edu.cn
 * extras: mirrors.bfsu.edu.cn
 * updates: mirrors.bfsu.edu.cn
元数据缓存已建立
+ sh -c 'yum install -y -q docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin'
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-buildx-plugin-0.11.2-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
docker-buildx-plugin-0.11.2-1.el7.x86_64.rpm 的公钥尚未安装
导入 GPG key 0x621E9F35:
 用户ID     : "Docker Release (CE rpm) <docker@docker.com>"
 指纹       : 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 来自       : https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
setsebool:  SELinux is disabled.

================================================================================

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 
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[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  3939k      0  0:00:14  0:00:14 --:--:-- 3913k
[1Panel Log]: docker-compose 安装成功 
设置 1Panel 端口(默认为15703):[1Panel Log]: 您设置的端口为:15703 
[1Panel Log]: 防火墙未开启,忽略端口开放 
设置 1Panel 面板用户(默认为847c567845):输入账号
[1Panel Log]: 您设置的面板用户为:xgr 
设置 1Panel 面板密码(默认为a7e47844ff):
错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位
设置 1Panel 面板密码(默认为a7e47844ff):
错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位
设置 1Panel 面板密码(默认为a7e47844ff):
[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://111.203.153.247:15703/6ef14fc8ec 
[1Panel Log]: 内网地址: http://192.168.42.143
192.168.42.147:15703/6ef14fc8ec 
[1Panel Log]: 面板用户: 账号
[1Panel Log]: 面板密码: a7e47844ff 
[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]: 如果使用的是云服务器,请至安全组开放 15703 端口 
[1Panel Log]:  
[1Panel Log]: ================================================================ 

三、访问1Panel

http://192.168.42.147:15703/

四、1Panel界面

主机管理

?ssh管理

终端

五、服务状态

./lpctl status

[root@node5 1panel-v1.9.2-linux-amd64]# ./1pctl status
● 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-24 11:21:01 CST; 4min 41s ago
 Main PID: 81730 (1panel)
    Tasks: 5
   Memory: 100.1M
   CGroup: /system.slice/1panel.service
           └─81730 /usr/bin/1panel

12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |     207.374μs |    192.168.42.1 | GET      "/assets/css/index-eb9ecf5a.css"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |     103.598μs |    192.168.42.1 | GET      "/assets/css/index-c270f29e.css"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |     144.529μs |    192.168.42.1 | GET      "/assets/css/index-0c58b0e9.css"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |     202.179μs |    192.168.42.1 | GET      "/assets/js/index-e29b87ab.js"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |     175.024μs |    192.168.42.1 | GET      "/assets/js/index-e8476a7a.js"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |   10.316087ms |    192.168.42.1 | GET      "/assets/js/index-53d38ca1.js"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |    2.428169ms |    192.168.42.1 | GET      "/api/v1/containers/docker/status"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |    3.203399ms |    192.168.42.1 | GET      "/api/v1/containers/list/stats"
12月 24 11:24:30 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:30 | 200 |    3.382542ms |    192.168.42.1 | POST     "/api/v1/containers/search"
12月 24 11:24:31 node5 1panel[81730]: [GIN] 2023/12/24 - 11:24:31 | 200 |    5.118897ms |    192.168.42.1 | POST     "/api/v1/files/search"

六、1pctl帮助

[root@node5 1panel-v1.9.2-linux-amd64]# ./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 服务及数据

文章来源:https://blog.csdn.net/itorac/article/details/135179846
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。