医院网站建设

当前位置: > 医院网站维护 >

宝塔面板安装fail2ban启动不了怎么解决

发布时间:2022-03-28 作者:医院网站制作 关键词: 宝塔面板fail2ban fail2ban启动不了
首先用root账户命令行登录,fail2ban需要centos7和centos8系统安装,低版本不支持
首先查看setuptools版本号,太高的版本不支持fail2ban
[root@izt4nhy3mj62nkq6xnraplz ~]# btpip list|grep setuptools
setuptools                61.2.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.
[root@izt4nhy3mj62nkq6xnraplz ~]#
[root@izt4nhy3mj62nkq6xnraplz ~]# setuptools                61.2.0
-bash: setuptools: command not found
[root@izt4nhy3mj62nkq6xnraplz ~]# WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
-bash: WARNING:: command not found
-bash: however,: command not found
[root@izt4nhy3mj62nkq6xnraplz ~]# You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.
-bash: You: command not found
[root@izt4nhy3mj62nkq6xnraplz ~]#
卸载它
[root@izt4nhy3mj62nkq6xnraplz ~]# btpip uninstall setuptools -y
Found existing installation: setuptools 61.2.0
Uninstalling setuptools-61.2.0:
  Successfully uninstalled setuptools-61.2.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
安装低版本
[root@izt4nhy3mj62nkq6xnraplz ~]# btpip install setuptools==57.5.0
Collecting setuptools==57.5.0
  Downloading setuptools-57.5.0-py3-none-any.whl (819 kB)
     |████████████████████████████████| 819 kB 24.6 MB/s
Installing collected packages: setuptools
Successfully installed setuptools-57.5.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.
.io/warnings/venv
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.
下面重启面板
[root@izt4nhy3mj62nkq6xnraplz ~]# bt reload
Reload Bt-Panel..       done
下面语句查看fail2ban状态
[root@izt4nhy3mj62nkq6xnraplz ~]# fail2ban-client status
Status
|- Number of jail:      2
`- Jail list:   ftpd, sshd

状态2表示没问题了,您就可以使用了
 
责任编辑:医院网站制作
医院网站维护
扫码咨询
医院网站建设