说明
从目前的行业发展中,博主多年前开始一直从事容器方面的运维工作,为了更好的技术发展,后续将全面拥抱容器化技术。同时,由于维护OneinStack变得困难,并且各种环境适配也耗费了大量时间(相比容器更适合于跨平台、轻量级、高度可移植性和隔离性等方面)。因此,已于23年8月份出售了OneinStack(具体细节不方便透露),后续将更多精力和资源投入到一个新项目中,bypanel是一个基于容器构建安装环境,支持amd64、arm64平台。
支持操作系统
CentOS | RedHat | Alpine Linux | Debian | Ubuntu |
AlmaLinux | Fedora | Rocky Linux | openSUSE | Anolis |
OpencloudOS | TencentOS | Amazon Linux | EulerOS | openEuler |
Kylin | LinuxMint | Alibaba Linux | Elementary | Uos |
Deepin | KylinsecOS | Oracle Linux | Kali Linux | Arch Linux |
... |
镜像说明
镜像地址:https://hub.docker.com/repositories/bypanel
使用github Action全自动化:
- nginx:https://github.com/linuxeye/docker-nginx
- openresty: https://github.com/linuxeye/docker-openresty
- php-fpm:https://github.com/linuxeye/docker-php-fpm
- mysql:https://github.com/linuxeye/docker-mysql
安装
curl -sSL https://mirrors.linuxeye.com/bypanel/quick_install.sh | bash
-
默认安装路径:
/opt/bypanel
-
bypctl安装路径:
/usr/bin/bypanel
bypanel二进制下载地址
配置
bypanel configure
- 配置部署bypanel参数,即修改
/usr/bin/bypanel
命令帮助
bypanel help
创建和启动
bypanel up -d
- 创建和启动容器, 其中
-d
参数: 容器后台运行
虚拟主机
添加
bypanel vhost add
删除
bypanel vhost del
列表
bypanel vhost list
重载web服务
bypanel reload
日志
bypanel logs -f
- 显示日志, 如显示nginx实时日志:
bypanel logs nginx -f
, 其中`-f`参数: 打印日志输出
服务状态
bypanel status
- 查看容器状态, 或执行命令
bypctl ps
作用相同
停止、删除容器和网络
bypanel down
重启服务
bypanel restart
启动服务
bypanel start
停止服务
bypanel stop
执行命令
bypanel exec SERVICE COMMAND [ARGS...]
如:登陆nginx容器
bypanel exec nginx sh
升级命令
bypanel upgrade
版本显示
bypanel version
环境变量
/opt/bypanel/.env
包含非常多参数,如
- NEW_UID: 容器运行用户Id,网站根目录权限需为此用户Id,可通过
chown -R 1000:1000 /data/webroot
修改网站根目录权限 - NEW_GID: 容器运行用户组Id
- TIMEZONE: 容器时区
- NGINX_SERVER: Nginx镜像版本
- MYSQL_SERVER: MySQL镜像版本
- PGSQL_SERVER: PostgreSQL镜像版本
- REDIS_SERVER: Redis镜像版本
- MEMCACHED_SERVER: Memcached镜像版本
- MONGO_SERVER: MongoDB镜像版本
- PMA_SERVER: phpMyAdmin镜像版本
- PMA_ARBITRARY: phpMyAdmin参数,当设置为 1 时,将允许与任意服务器的连接
- PMA_ABSOLUTE_URI: phpMyAdmin参数,phpMyAdmin的完整 URL。 有时在反向代理配置中使用时需要。
- SFTPGO_SERVER: SFTPGo镜像版本
- SFTPGO_FTPD_WEB_ADMIN_PORT: SFTPGo web管理端口,创建第一个管理员和一个新的 SFTPGo 用户,注意安全组端口
- SFTPGO_FTPD_PORT: FTP服务端口,注意安全组端口
- SFTPGO_FTPD_PASSIVE_PORT_RANGE_START: FTP服务被动开始的端口,注意安全组端口
- SFTPGO_FTPD_PASSIVE_PORT_RANGE_END: FTP服务被动结束的端口,注意安全组端口
- PHP_MODULES_ENABLE: PHP启用模块
- PHP_MODULES_DISABLE: PHP禁用模块
- HOST_PORT_NGINX: Nginx端口
- HOST_PORT_NGINX_SSL: Nginx SSL端口
- HOST_PORT_OPENRESTY: OpenResty端口
- HOST_PORT_OPENRESTY_SSL: OpenResty SSL端口
- HOST_PORT_APACHE: Apache端口
- HOST_PORT_APACHE_SSL: Apache SSL端口
- MYSQL_ROOT_PASSWORD: MySQL数据库root密码
- HOST_PORT_MYSQL: MySQL端口
- PGSQL_ROOT_USER: PostgreSQL根用户
- PGSQL_ROOT_PASSWORD: PostgreSQL根用户密码
- PGSQL_HOST_AUTH_METHOD: 为了不使用 PostgreSQL 的密码,请将此值保留为"trust"
- HOST_PORT_PGSQL: PostgreSQL端口
- HOST_PORT_REDIS: Redis端口
- REDIS_ARGS: Redis启动参数
- HOST_PORT_MEMCACHED: Memcached端口
- HOST_PORT_MONGO: MongoDB端口
数据目录结构
默认数据目录结构如下:
[root@linuxeye ~]# tree -L 2 /data /data ├── backups │ ├── 202312090300.linuxeye.sql.gz │ ├── 202312100300.linuxeye.sql.gz │ ├── 202312110300.linuxeye.sql.gz │ └── latest.linuxeye.sql.gz -> 202312110300.linuxeye.sql.gz ├── logs │ ├── nginx │ └── php-fpm-8.2 ├── mariadb-10.11 │ ├── aria_log.00000001 │ ├── aria_log_control │ ├── ddl_recovery.log │ ├── ib_buffer_pool │ ├── ibdata1 │ ├── ib_logfile0 │ ├── ibtmp1 │ ├── linuxeye │ ├── multi-master.info │ ├── mysql │ ├── mysql-bin.000001 │ ├── mysql-bin.000002 │ ├── mysql-bin.index │ ├── mysql-slow.log │ ├── mysql_upgrade_info │ ├── performance_schema │ └── sys └── webroot ├── default └── linuxeye
1F
谢谢两位军哥多年的坚持,让我学会这么多
2F
没有用过docker,有其他教程吗?
比如怎么绑定域名,备份网站到云端这些。
3F
能不能做一个和之前 oneinstack 一样类似的生成配置命令的网站,目前安装的过程感觉能选的很少(实际上很全,但没有引导)
4F
还是习惯oneinstack,现在用的这个mirrors.linuxeye.com
5F
caddy无法安装
stat /opt/bypanel/app/latest/docker-compose.yml:没有这样的文档或目录
panic:模板::1:23:在 处执行“”:无法评估字符串类型中的字段 Err
B1
@ CL1
bypanel upgrade
升级之后再试试昵6F
一个bypanel vhost del 指定一个域,却跳出 os.RemoveAll failed for path “/data/webroot”: unlinkat….: device or resource busy
预览一下,被清空整个/data/webroot
B1
@ CL1
bypanel upgrade
升级之后再试试昵7F
大佬,输入 bypanel upgrade 是否对整站有啥影响吗?
这个升级是脚本,还是针对web服务器升级,比如nginx mysql php等
B1
@ dcpk bypanel upgrade 不影响
bypanel pull 需要bypanel down && bypanel up -d重新启动下
B2
@ yeho 大佬,抽空写个教程,咋备份
8F
刚刚bypanel pull 拉取了最新镜像
9F
大量报错,服务器debian 双核 4G
[05-Nov-2024 17:22:46] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 15 total children
[05-Nov-2024 17:22:47] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 17 total children
[05-Nov-2024 17:22:48] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 19 total children
[05-Nov-2024 17:26:48] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 11 total children
[05-Nov-2024 17:26:49] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 13 total children
[05-Nov-2024 17:26:50] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 15 total children
[05-Nov-2024 17:30:50] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 10 total children
[05-Nov-2024 17:30:51] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 16 children, there are 0 idle, and 12 total children
[05-Nov-2024 17:30:52] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 1 idle, and 14 total children
B1
@ dcpk php-fpm进程数可能不够
bypanel upgrade
cd /opt/bypanel/cfg/php-fpm-8.0/
cp fpm.conf-default fpm.conf
修改里面进程数量试试。
10F
bypanel upgrade 这步昨天操作了
后面两步一会试试看
B1
@ dcpk 默认是php82