首页 > 编程学习 > Linux运维笔记[2]-宝塔面板

Linux运维笔记[2]-宝塔面板

发布时间:2022/9/19 1:43:14

宝塔面板

宝塔Linux面板是提升运维效率的服务器管理软件,支持一键LAMP/LNMP/集群/监控/网站/FTP/数据库/JAVA等100多项服务器管理功能。
有30个人的专业团队研发及维护,经过200多个版本的迭代,功能全,少出错且足够安全,已获得全球百万用户认可安装。

openEuler安装宝塔面板-失败😡

面板官网
选择Centos安装脚本或万能安装脚本

使用 SSH 连接工具,如 堡塔SSH终端 连接到您的 Linux 服务器后, 挂载磁盘 ,根据系统执行相应命令开始安装(大约2分钟完成面板安装)
注意:必须为没装过其它环境如Apache/Nginx/php/MySQL的新系统,推荐使用centos 7.X的系统安装宝塔面板
推荐使用Chrome、火狐、edge浏览器,国产浏览器请使用极速模式访问面板登录地址
如果不确定使用哪个Linux系统版本的,可以使用万能安装脚本
国产龙芯架构CPU安装命令,支持龙芯架构的loongnix 8.x、统信UOS 20、kylin v10系统
管理员权限执行:

if [ -f /usr/bin/curl ];then curl -sSO https://download.bt.cn/install/install_panel.sh;else wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh;fi;bash install_panel.sh ed8484bec


可以看到启动Bt-Task失败

错误处理

按照指示,打开登录网页,显示错误:

内网面板地址: http://192.168.50.80:8888/aff***04e
*以下仅为初始默认账户密码,若无法登录请执行bt命令重置账户/密码登录
Traceback (most recent call last):
  File "/www/server/panel/tools.py", line 679, in <module>
    set_panel_username()
  File "/www/server/panel/tools.py", line 369, in set_panel_username
    import db
  File "/www/server/panel/class/db.py", line 10, in <module>
    import sqlite3
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
查看面板入口:/etc/init.d/bt default
  • 解决方案[https://www.bt.cn/bbs/thread-76563-1-1.html]

yum install sqlite-devel -y
依然有报错:

Error: 
 Problem: package sqlite-devel-3.24.0-9.oe1.x86_64 requires sqlite(x86-64) = 3.24.0-9.oe1, but none of the providers can be installed
  - package sqlite-3.24.0-9.oe1.x86_64 requires libreadline.so.7()(64bit), but none of the providers can be installed
  - cannot install both readline-7.0-13.oe1.x86_64 and readline-8.1-1.oe2203.x86_64
  - package mozjs91-91.6.0-2.oe2203.x86_64 requires libreadline.so.8()(64bit), but none of the providers can be installed
  - 无法为该任务安装最佳候选
  - 安装的软件包的问题 mozjs91-91.6.0-2.oe2203.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

yum install sqlite-devel -y --skip-broken

  • 解决方案[https://www.xueyidian.cn/server/626.html]

rm -rf /www/server/panel/pyenv
curl https://download.bt.cn/install/update_panel.sh|bash
依然是sqlite无法导入


/www/server/panel/pyenv/bin/python3.7

import sqlite3

报错

[root@localhost qsbye]# /www/server/panel/pyenv/bin/python3.7
Python 3.7.9 (default, Sep 19 2022, 00:50:18) 
[GCC 10.3.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
  • 解决方案[https://blog.csdn.net/mx_steve/article/details/108883050]
    [https://panguangyu.blog.csdn.net/article/details/93906484?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-93906484-blog-108883050.pc_relevant_multi_platform_whitelistv3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-93906484-blog-108883050.pc_relevant_multi_platform_whitelistv3&utm_relevant_index=2]

安装sqlite3重新编译python3.7或者复制现成的_sqlite3.so
欧拉这里已经装有sqlite3了
find / -name _sqlite3.so #找不到是因为名字有不同,见下
直接重新编译pyhton3.7

找到python3.9的sqlite3:
python3
```Python
import sys
print(sys.path)

顺藤摸瓜找到_sqlite3.cpython-39-x86_64-linux-gnu.so,路径:/usr/lib64/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so
然后找到python3.7的相应目录
/www/server/panel/pyenv/bin/python3.7

import sys
print(sys.path)

目录为:/www/server/panel/pyenv/lib/python3.7/lib-dynload
复制过去:

cp /usr/lib64/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so /www/server/panel/pyenv/lib/python3.7/lib-dynload
#重命名文件
mv /www/server/panel/pyenv/lib/python3.7/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so /www/server/panel/pyenv/lib/python3.7/lib-dynload/_sqlite3.so

继续报错🥱:

>>> import sqlite3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/www/server/panel/pyenv/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: /www/server/panel/pyenv/lib/python3.7/lib-dynload/_sqlite3.so: undefined symbol: PyObject_CheckBuffer

最后想说


[https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=94283]

Copyright © 2010-2022 mfbz.cn 版权所有 |关于我们| 联系方式|豫ICP备15888888号