kali安装vulhub遇到的问题及解决方法(docker及docker镜像源更换)

kali安装vulhub:

提示:项目地址

https://github.com/vulhub/vulhub


项目安装:

git clone https://github.com/vulhub/vulhub.git  

安装docker

提示:普通用户请使用sudo:

首先安装 https 协议、CA 证书

apt-get install -y apt-transport-https ca-certificates 

安装 docker

apt-get update                #先更新
apt install docker.io             

查看版本,是否安装成功。 docker -v 启动 docker systemctl start docker 显示 docker 信息 docker ps -a

`┌──(root㉿192)-[~/Desktop]
└─# docker -v               
Docker version 20.10.25+dfsg1, build b82b9f3
                                                                             
┌──(root㉿192)-[~/Desktop]
└─# systemctl start docker

`—

安装docker-compose:

提示:kali新版系统自带的pip是从git下载的 按上述pip下载docker-compose会报错

报错提示:

┌──(root㉿192)-[~/Desktop]
└─# pip install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting docker-compose
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 114.8/114.8 kB 594.8 kB/s eta 0:00:00
Collecting PyYAML<6,>=3.10 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 796.0 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 970, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/dist.py", line 974, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/dist.py", line 989, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-zbabl_mq/overlay/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

提示:原因似乎是因为PyYaml版本过高,而docker-compose 仍支持的较低版本的 PyYaml (5.3.1),就不会出现此问题。


解决方案:降级PyYAML到特定版本(如5.3.1)以及可能情况下安装低版本的docker。

使用命令安装低版本的pyyaml。

┌──(root㉿192)-[~/Desktop]
└─# pip install pyyaml==5.3.1  -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyyaml==5.3.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz (269 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 269.4/269.4 kB 849.6 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyyaml
  Building wheel for pyyaml (setup.py) ... done
  Created wheel for pyyaml: filename=PyYAML-5.3.1-cp311-cp311-linux_x86_64.whl size=44636 sha256=e86de456f1486b49f5cc84b15eb0f666120263c4fc1aa6cfdeaa3888c0a1a01e
  Stored in directory: /root/.cache/pip/wheels/2f/3b/f6/34daeaf2860445f6e0004f86e23aff654a0bbec59683a966e6
Successfully built pyyaml
Installing collected packages: pyyaml
  Attempting uninstall: pyyaml
    Found existing installation: PyYAML 6.0.1
ERROR: Cannot uninstall PyYAML 6.0.1, RECORD file not found. Hint: The package was installed by debian.                                                   
                               

这里报错提示无法卸载高版本的pyyam,原因是高版本是从apt下载的,pip没有权限卸载。

解决方案

检查包的来源

首先,我们需要确定PyYAML包的来源。如果它是通过系统的包管理器安装的,那么我们应该使用相应的包管理器来卸载它。例如,在Ubuntu上,你可以使用apt命令来卸载:

sudo apt-get remove python3-yaml

重装旧版本pyymal
┌──(root㉿192)-[~/Desktop]
└─# pip install pyyaml==5.3.1  -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pyyaml==5.3.1
  Using cached PyYAML-5.3.1-cp311-cp311-linux_x86_64.whl
Installing collected packages: pyyaml
Successfully installed pyyaml-5.3.1            #无报错


引用https://blog.csdn.net/qq_38614074/article/details/139621698

继续安装docker-compose

┌──(root㉿192)-[~/Desktop]
└─# pip install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting docker-compose
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (5.3.1)
Requirement already satisfied: distro<2,>=1.5.0 in /usr/lib/python3/dist-packages (from docker-compose) (1.9.0)
Collecting docker>=5 (from docker[ssh]>=5->docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e3/26/57c6fb270950d476074c087527a558ccb6f4436657314bfb6cdf484114c4/docker-7.1.0-py3-none-any.whl (147 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 147.8/147.8 kB 1.8 MB/s eta 0:00:00
Collecting dockerpty<1,>=0.4.1 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8d/ee/e9ecce4c32204a6738e0a5d5883d3413794d7498fe8b06f44becc028d3ba/dockerpty-0.4.1.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: docopt<1,>=0.6.1 in /usr/lib/python3/dist-packages (from docker-compose) (0.6.2)
Collecting jsonschema<4,>=2.5.1 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.3/56.3 kB 4.4 MB/s eta 0:00:00
Collecting python-dotenv<1,>=0.13.0 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/64/62/f19d1e9023aacb47241de3ab5a5d5fedf32c78a71a9e365bb2153378c141/python_dotenv-0.21.1-py3-none-any.whl (19 kB)
Requirement already satisfied: requests<3,>=2.20.0 in /usr/lib/python3/dist-packages (from docker-compose) (2.31.0)
Collecting texttable<2,>=0.9.0 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/24/99/4772b8e00a136f3e01236de33b0efda31ee7077203ba5967fcc76da94d65/texttable-1.7.0-py2.py3-none-any.whl (10 kB)
Collecting websocket-client<1,>=0.32.0 (from docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/0c/d52a2a63512a613817846d430d16a8fbe5ea56dd889e89c68facf6b91cb6/websocket_client-0.59.0-py2.py3-none-any.whl (67 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.2/67.2 kB 3.8 MB/s eta 0:00:00
Requirement already satisfied: urllib3>=1.26.0 in /usr/lib/python3/dist-packages (from docker>=5->docker[ssh]>=5->docker-compose) (1.26.18)
Requirement already satisfied: paramiko>=2.4.3 in /usr/lib/python3/dist-packages (from docker[ssh]>=5->docker-compose) (3.4.0)
Requirement already satisfied: six>=1.3.0 in /usr/lib/python3/dist-packages (from dockerpty<1,>=0.4.1->docker-compose) (1.16.0)
Requirement already satisfied: attrs>=17.4.0 in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (23.2.0)
Collecting pyrsistent>=0.14.0 (from jsonschema<4,>=2.5.1->docker-compose)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/94/9808e8c9271424120289b9028a657da336ad7e43da0647f62e4f6011d19b/pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (120 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.0/120.0 kB 2.8 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (68.1.2)
Building wheels for collected packages: dockerpty
  Building wheel for dockerpty (setup.py) ... done
  Created wheel for dockerpty: filename=dockerpty-0.4.1-py3-none-any.whl size=16596 sha256=6b1ed8fa013ad102b4ab2b3807fc5ebd10aa578814db10280b6a189d7aa1b42d
  Stored in directory: /root/.cache/pip/wheels/4b/23/8a/796cda3557ec7067092ef780992049870652e0da656114e937
Successfully built dockerpty
Installing collected packages: texttable, websocket-client, python-dotenv, pyrsistent, dockerpty, docker, jsonschema, docker-compose
  Attempting uninstall: websocket-client
    Found existing installation: websocket-client 1.7.0
    Uninstalling websocket-client-1.7.0:
      Successfully uninstalled websocket-client-1.7.0
  Attempting uninstall: python-dotenv
    Found existing installation: python-dotenv 1.0.1
    Uninstalling python-dotenv-1.0.1:
      Successfully uninstalled python-dotenv-1.0.1
  Attempting uninstall: jsonschema
    Found existing installation: jsonschema 4.19.2
ERROR: Cannot uninstall jsonschema 4.19.2, RECORD file not found. Hint: The package was installed by debian.    

提示未成功卸载jsonschema,方法一样 重新卸载


sudo apt-get remove python3-jsonschema #运行


重新安装docker-compose

┌──(root㉿192)-[~/Desktop]
└─# pip install docker-compose -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting docker-compose
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f3/3e/ca05e486d44e38eb495ca60b8ca526b192071717387346ed1031ecf78966/docker_compose-1.29.2-py2.py3-none-any.whl (114 kB)
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (5.3.1)
Requirement already satisfied: distro<2,>=1.5.0 in /usr/lib/python3/dist-packages (from docker-compose) (1.9.0)
Requirement already satisfied: docker>=5 in /usr/local/lib/python3.11/dist-packages (from docker[ssh]>=5->docker-compose) (7.1.0)
Requirement already satisfied: dockerpty<1,>=0.4.1 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (0.4.1)
Requirement already satisfied: docopt<1,>=0.6.1 in /usr/lib/python3/dist-packages (from docker-compose) (0.6.2)
Collecting jsonschema<4,>=2.5.1 (from docker-compose)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Requirement already satisfied: python-dotenv<1,>=0.13.0 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (0.21.1)
Requirement already satisfied: requests<3,>=2.20.0 in /usr/lib/python3/dist-packages (from docker-compose) (2.31.0)
Requirement already satisfied: texttable<2,>=0.9.0 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (1.7.0)
Requirement already satisfied: websocket-client<1,>=0.32.0 in /usr/local/lib/python3.11/dist-packages (from docker-compose) (0.59.0)
Requirement already satisfied: urllib3>=1.26.0 in /usr/lib/python3/dist-packages (from docker>=5->docker[ssh]>=5->docker-compose) (1.26.18)
Requirement already satisfied: paramiko>=2.4.3 in /usr/lib/python3/dist-packages (from docker[ssh]>=5->docker-compose) (3.4.0)
Requirement already satisfied: six>=1.3.0 in /usr/lib/python3/dist-packages (from dockerpty<1,>=0.4.1->docker-compose) (1.16.0)
Requirement already satisfied: attrs>=17.4.0 in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (23.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /usr/local/lib/python3.11/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (0.20.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from jsonschema<4,>=2.5.1->docker-compose) (68.1.2)
Installing collected packages: jsonschema, docker-compose
Successfully installed docker-compose-1.29.2 jsonschema-3.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用户操作下的风险 ,不用管

docker启动靶场环境

安装完毕后cd进入到/home/vulhub文件夹下,这里以log4j/CVE-2021-44228为例:

进入对应目录下,使用以下命令启动该漏洞靶场环境

如果你后面docker-compose build又报错:TypeError: kwargs_from_env() got an unexpected keyword argument ‘ssl_version’

解决办法:安装低版本的docker

┌──(root㉿192)-[~/Desktop/vulhub-master/log4j/CVE-2021-44228]
└─# docker-compose build
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
             ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
             ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/compose/cli/docker_client.py", line 124, in docker_client
    kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'
                                                                             
┌──(root㉿192)-[~/Desktop/vulhub-master/log4j/CVE-2021-44228]
└─# pip install docker==6.1.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting docker==6.1.3
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/db/be/3032490fa33b36ddc8c4b1da3252c6f974e7133f1a50de00c6b85cca203a/docker-6.1.3-py3-none-any.whl (148 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.1/148.1 kB 626.7 kB/s eta 0:00:00
Requirement already satisfied: packaging>=14.0 in /usr/lib/python3/dist-packages (from docker==6.1.3) (24.0)
Requirement already satisfied: requests>=2.26.0 in /usr/lib/python3/dist-packages (from docker==6.1.3) (2.31.0)
Requirement already satisfied: urllib3>=1.26.0 in /usr/lib/python3/dist-packages (from docker==6.1.3) (1.26.18)
Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.11/dist-packages (from docker==6.1.3) (0.59.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from websocket-client>=0.32.0->docker==6.1.3) (1.16.0)
Installing collected packages: docker
  Attempting uninstall: docker
    Found existing installation: docker 7.1.0
    Uninstalling docker-7.1.0:
      Successfully uninstalled docker-7.1.0
Successfully installed docker-6.1.3
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㉿192)-[~/Desktop/vulhub-master/log4j/CVE-2021-44228]
└─# docker-compose up -d                                                 
Creating network "cve-2021-44228_default" with the default driver
Pulling solr (vulhub/solr:8.11.0)...
8.11.0: Pulling from vulhub/solr
43c265008fae: Pulling fs layer
af36d2c7a148: Pulling fs layer
2b7b4d10e1c1: Pulling fs layer
f264389d8f2f: Waiting
1a2c46e93f4a: Waiting
f9506bb322c0: Waiting
96f5dad14c2c: Waiting
00cc69e6b3f8: Waiting
7deb39580f8e: Waiting
4f4fb700ef54: Waiting

这里我们等了许久发现根本完成不了启动

解决方法

更换docker源

┌──(root㉿192)-[~/Desktop/vulhub-master/log4j/CVE-2021-44228]
└─# cd /etc/docker 
                                                                             
┌──(root㉿192)-[/etc/docker]
└─# touch daemon.json
                                                                             
┌──(root㉿192)-[/etc/docker]
└─# vim daemon.json 


{
"registry-mirrors":["https://6kx4zyno.mirror.aliyuncs.com"]
}
:wq
                                      

重新加载源 重新重启docker服务

  • [ systemctl daemon-reload ]
  • [systemctl restart docker ]
┌──(root㉿192)-[/etc/docker]
└─# systemctl daemon-reload 
                                                                             
┌──(root㉿192)-[/etc/docker]
└─# systemctl restart docker
                               

在这里插入图片描述
我们看到速度很快 基本就5秒

##引用 https://blog.csdn.net/m0_73615178/article/details/136282974

使用docker-compose查看进程端口 再访问

在这里插入图片描述

┌──(root㉿192)-[~/Desktop/vulhub-master/log4j/CVE-2021-44228]
└─# ifconfig
br-76fd4b9f6713: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:88ff:fe4a:617c  prefixlen 64  scopeid 0x20<link>
        ether 02:42:88:4a:61:7c  txqueuelen 0  (Ethernet)
        RX packets 198  bytes 485887 (474.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 273  bytes 66974 (65.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:8a:f5:bc:cf  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.70.131  netmask 255.255.255.0  broadcast 192.168.70.255
        inet6 fe80::20c:29ff:fea9:70ef  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:a9:70:ef  txqueuelen 1000  (Ethernet)
        RX packets 607076  bytes 621908988 (593.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 304754  bytes 23586908 (22.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 450  bytes 547951 (535.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 450  bytes 547951 (535.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth1a7f791: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::5063:33ff:fe92:2152  prefixlen 64  scopeid 0x20<link>
        ether 52:63:33:92:21:52  txqueuelen 0  (Ethernet)
        RX packets 198  bytes 488659 (477.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 284  bytes 67840 (66.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


本机访问端口192.168.70.131:8973
在这里插入图片描述修改了ip地址

https://blog.csdn.net/ldl345/article/details/137604277

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/789637.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【昆工主办|7月昆明】第三届绿色建筑、土木工程与智慧城市国际会议(GBCESC 2024)

随着全球城市化进程的加速&#xff0c;绿色建筑、土木工程与智慧城市等议题逐渐成为了行业内外关注的焦点。在这一背景下&#xff0c;第三届绿色建筑、土木工程与智慧城市国际会议&#xff08;GBCESC 2024&#xff09;的召开&#xff0c;无疑将为相关领域的研究者、学者及从业者…

如何保障生物制药中试验网和办公网之间的跨网安全文件交换数据?

在针对数据化大环境下&#xff0c;生物制药企业的数据安全尤为关键&#xff0c;尤其是试验网与办公网之间的数据交换。这些数据不仅包含新药品研发成果、临床试验数据&#xff0c;还有健康医疗数据等&#xff0c;都是企业的核心竞争力和商业秘密 。因此&#xff0c;安全地进行跨…

flask模块化、封装使用缓存cache(flask_caching)

1.安装flask_caching库 pip install flask_caching 2.创建utils Python 软件包以及cache_helper.py 2.1cache_helper.py代码 from flask_caching import Cachecache Cache()class CacheHelper:def __init__(self, app, config):cache.init_app(app, config)staticmethoddef…

你明白C++中的多态吗?(暑假提升-多态专题)

内不欺己&#xff0c;外不欺人。———孔子 有趣的多态 1、前言2、概念3、多态定义与产生条件4、多态的重要组成成员-(虚函数)5、虚函数的重写(覆盖)6、辅助关键字override与final(了解即可)7、重载&#xff0c;重定义(隐藏)&#xff0c;重写(覆盖)8、抽象类9、多态的原理9、1、…

微信定时推送LeetCode每日一题,再也不怕没人喊你刷题了

前段时间发过一篇关于微信机器人开发的文章&#xff0c;讲述了如何快速开发一个微信机器人&#xff0c;本篇文章就来实现一个最近开发的一个功能案例&#xff0c;在这个案例中会遇到了各种问题&#xff0c;可以帮助大家减少自己去踩坑的时间。通过此案例也可以帮助你去扩想一些…

HarmonyOS Next应用开发之系统概述

一、鸿蒙系统概述 鸿蒙系统可以分为华为鸿蒙系统&#xff08;HUAWEI HarmonyOS&#xff09;和开源鸿蒙系统&#xff08;OpenHarmony&#xff09;&#xff0c;华为鸿蒙系统是基于OpenHarmony基础之上开发的商业版操作系统。他们二者的关系可以用下图来表示&#xff1a; 1.1、…

Python 轻松生成多种条形码、二维码 (Code 128、EAN-13、QR code等)

条形码和二维码是现代信息交换和数据存储的重要工具&#xff0c;它们将信息以图形的形式编码&#xff0c;便于机器识别和数据处理&#xff0c;被广泛应用于物流、零售、医疗、教育等各领域。 本文将介绍如何使用Python快速生成各种常见的条形码如Code 128、EAN-13&#xff0c;…

CentOS7 安装 git 命令

通过yum源install下载的git版本比较低&#xff0c;不推荐此方式安装。 官网下载最新版git源码&#xff1a;Git 1. 解压安装包 tar -xzvf git-2.45.2.tar.gz 2. 安装相关依赖 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils…

如何用Vue3和Plotly.js创建交互式表格?

本文由ScriptEcho平台提供技术支持 项目地址&#xff1a;传送门 Plotly.js 动态生成 HTML 表格 应用场景介绍 在数据分析和可视化领域&#xff0c;经常需要以表格的形式展示数据。Plotly.js 是一款功能强大的 JavaScript 库&#xff0c;不仅可以创建交互式图表&#xff0c;…

【源码+文档+调试讲解】文物管理系统

摘 要 21世纪的今天&#xff0c;随着社会的不断发展与进步&#xff0c;人们对于信息科学化的认识&#xff0c;已由低层次向高层次发展&#xff0c;由原来的感性认识向理性认识提高&#xff0c;管理工作的重要性已逐渐被人们所认识&#xff0c;科学化的管理&#xff0c;使信息存…

前端与嵌入式开发通信之QWebChannel(Qt)

前端与嵌入式开发通信之QWebChannel 最近开发中需要用到和c开发的操作台进行通信的的需求&#xff0c;就找到了这个技术&#xff0c;记录一下 首先需要安装导入 qwebchannel npm i qwebchannel import { QWebChannel } from "qwebchannel"; 初始化qwebchannel并封…

嵌入式音频处理技术的现在发展及未来的方向

嵌入式音频处理技术&#xff1a;从音频流媒体到声音识别 嵌入式音频处理技术的迅猛发展正在改变我们的生活方式&#xff0c;从音频流媒体到声音识别&#xff0c;这个领域为人们的生活和工作带来了巨大的影响。本文将探讨嵌入式音频处理技术的最新趋势和应用&#xff0c;以及提…

安防管理平台LntonCVS视频汇聚融合云平台智慧火电厂安全生产管理应用方案

中国的电力产业作为国民经济发展的重要能源支柱&#xff0c;被视为国民经济的基础产业之一。目前&#xff0c;我国主要依赖火力发电&#xff0c;主要燃料包括煤炭、石油和天然气等&#xff0c;通过燃烧转化为动能&#xff0c;再转变为电能输送至全国各地。火力发电量占全国发电…

告别混乱,可道云企业网盘个人标签,让文件管理更轻松

在信息爆炸的时代&#xff0c;你是不是常常觉得自己的大脑就像一台过载的处理器&#xff0c;各种文件、资料、想法在脑海中“打架”&#xff0c;让你焦头烂额&#xff1f; 别担心&#xff0c;可道云企业网盘个人标签功能来拯救你的“大脑内存”了&#xff01; 我们需要告别无…

tensorflow之欠拟合与过拟合,正则化缓解

过拟合泛化性弱 欠拟合解决方法&#xff1a; 增加输入特征项 增加网络参数 减少正则化参数 过拟合的解决方法&#xff1a; 数据清洗 增大训练集 采用正则化 增大正则化参数 正则化缓解过拟合 正则化在损失函数中引入模型复杂度指标&#xff0c;利用给w增加权重&#xff0c;…

如何分析软件测试中发现的Bug!

假如你是一名软件测试工程师&#xff0c;每天面对的就是那些“刁钻”的Bug&#xff0c;它们像是隐藏在黑暗中的敌人&#xff0c;时不时跳出来给你一个“惊喜”。那么&#xff0c;如何才能有效地分析和处理这些Bug&#xff0c;让你的测试工作变得高效且有趣呢&#xff1f;今天我…

AWS-WAF-Log S3存放,通过Athena查看

1.创建好waf-cdn 并且设置好规则和log存储方式为s3 2. Amazon Athena 服务 使用 &#xff08;注意s3桶位置相同得区域&#xff09; https://docs.aws.amazon.com/zh_cn/athena/latest/ug/waf-logs.html#waf-example-count-matched-ip-addresses 官方文档参考,建一个分区查询表…

内容协商源码解析与自定义 MessageConverter

目录 内容协商 1、引入xml依赖 2、postman分别测试返回json和xml 3、开启浏览器参数方式内容协商功能 4、内容协商原理 5、自定义 MessageConverter 综上 内容协商 根据客户端接收能力不同&#xff0c;返回不同媒体类型的数据。 若客户端无法解析服务端返回的内容&#…

SAP SD销售订单的ATP检查简介

前面的文章中我们解释了PP模块中的ATP检查,也解释了MM模块中的ATP的检查,本文将说明一下SD模块中的ATP检查。 SAP 销售ATP(可用性检查)详解 ATP(Available-to-Promise)检查是SAP中的一项关键功能,用于确保在创建销售订单时能够满足客户需求。本文将详细介绍SAP销售ATP检…

【人工智能】-- 搜索技术(状态空间法)

个人主页&#xff1a;欢迎来到 Papicatch的博客 课设专栏 &#xff1a;学生成绩管理系统 专业知识专栏&#xff1a; 专业知识 文章目录 &#x1f349;引言 &#x1f348;介绍 &#x1f349;状态空间法 &#x1f348;状态空间的构成 &#x1f34d;状态 &#x1f34d;算符…