AlmaLinux os 9.3 安装 1panel 实战经历
AlmaLinux OS 9.3的安装镜像分 :
Boot ISO 可选安装镜像
Minimal ISO 最小化安装镜像
DVD ISO 完整版 三种
完整版是不建议的 因为太大 很多功能用不上
一般是用这个 Minimal ISO 最小化安装镜像
但是今天 由于狗云官方给了移机通知 原香港-CMI数据中心即将下架 让转移新的数据中心
公告如下
尊敬的用户您好,该服务器所在的数据中心无法扩容,宿主机也比较陈旧,我们将对其下架处理。现在需要您开通其它香港数据中心同等硬件配置的弹性云服务器,迁移数据后发送工单,旧机器将被删除,我们将转移您的折扣,并提供(机龄/6)+1个月的时间(机龄无法继承)。我们将于12月15开始关机召回。给您带来不便表示十分抱歉。
正好转移到MG中心 选了最低配置开机 AlmaLinux os 8.9+9.3的镜像
正常都是上Minimal 但是这次
8.9上Minimal
9.3给上的boot.iso 我还纳闷是不是上错了 还发工单回馈
但是今天经过我一天的测试 安装1panel这个新面板 发现了很多的问题 我一一来总结 并给出最完美的解决方案
首选是boot.iso也能安装minimal 最小化安装 这样安装1panel就会出现两个问题
1. -bash: tar: command not found///tar:未找到命令 解决 https://www.31du.cn/blog/tar-command-not-found.html
一条命令安装即可 yum install -y tar
解决 https://www.31du.cn/blog/docker-service-does-not-exist.html
这个其实在minimal 最小化安装 是无解的 但是
还会出现
2.1 防火墙启动失败 add (port: 20258/tcp strategy: accept) failed, err: stderr: FirewallD is not (firewalld.service: Failed with result 'exit-code'.)目前无解
2.2 docker启动失败 错误代码如下 目前无解
[root@localhost ~]# sudo systemctl start docker && sudo systemctl status docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.
I really dont know what was happening, but I run sudo dockerd --debug like Zeitounator orients me, reboot my pc and docker works perfectly.
这句话来自下面的论坛 我试过了无法解决
参考资料 https://stackoverflow.com/questions/55906503/docker-how-to-fix-job-for-docker-service-failed-because-the-control-process-ex
那怎么办呢? 要用boot.iso默认安装的桌面环境
这样只会遇上下面的问题
1panel 安装 提示Failed to enable unit: Unit file docker.service does not exist.Failed to start docker.service: Unit docker.service not found.
解决 https://www.31du.cn/blog/docker-service-does-not-exist.html
带桌面环境 的安装是可以解决的
防火墙启动成功 docker也启动成功
1panel是基于docker的 所有app都是在docker上安装 所以必须启动成功 否则没得玩
最后你都弄完了 以为解决了
nginx用的OpenResty代替这个倒没什么
mysql 和 MariaDB也都是最新版的 安装很快 很快就装好了 跟宝塔动辄一小时的安装 真的不敢相信
但是呢 我安装WordPress 和 chevereto 都连不上服务器
错误代码
Aw, snap! Internal Server Error [debug @ `error_log`] - https://v3-docs.chevereto.com/setup/debug.html
Aw, snap! Internal Server Error [debug @ print,`error_log`] -
Fatal error [400]: SQLSTATE[HY000] [2002] Connection refused
Triggered in /lib/G/classes/class.db.php at line 99
Stack trace:
#0 /lib/G/classes/class.db.php(110): G\DB->__construct()
#1 /app/loader.php(65): G\DB::getInstance()
#2 /index.php(17): include_once('/app/loader.php')
User
class.db.php 的第99行 throw new DBException($e->getMessage(), 400);
把这些抛给chatgpt都无法解决
因为 mysql服务没有启动
你去检查
sudo service mysql status
直接给你
Unit mysql.service could not be found.
你花大量时间去找解决方法 根本没用 所以放弃!