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

news2024/9/19 10:42:47

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

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Apache Flink 运行时架构

Flink 运行时架构 Flink整个系统由两个主要部分组成JobManager和TaskManager&#xff0c;Flink架构也遵循Master-Slave架构设计原则&#xff0c;JobManager为Master节点&#xff0c;TaskManager为worker&#xff08;Slave&#xff09;节点&#xff0c;所有组件之间通讯都是借助…

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

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

CinemachineBrain的属性简介

CinemachineBrain的属性简介 CinemachineBrain是Unity Cinemachine的核心组件&#xff0c;它和Camera组件挂载在一起&#xff0c;监控场景中所有的virtual camera。CinemachineBrain在inspector中暴露的属性如下&#xff1a; Live Camera和Live Blend分别表示当前active的virtu…

深度学习和NLP中的注意力和记忆

深度学习和NLP中的注意力和记忆 文章目录 一、说明二、注意力解决了什么问题&#xff1f;#三、关注的代价#四、机器翻译之外的关注#五、注意力&#xff08;模糊&#xff09;记忆&#xff1f;# 一、说明 深度学习的最新趋势是注意力机制。在一次采访中&#xff0c;现任 OpenAI 研…

矩阵分解及其在机器学习中的应用

阵分解是一种广泛应用于数据挖掘和机器学习领域的技术&#xff0c;它通过将一个高维数据集分解为多个低维的数据集&#xff0c;以降低数据的复杂性、提高计算效率&#xff0c;并发现数据中的隐含结构。本文将详细介绍矩阵分解的基本概念、主要方法及其在机器学习中的应用。 一、…

Spark项目通用开发框架

文章目录 1. 大数据项目结构2. 类说明2.1 公共接口类2.2 TaskNameEnum指定每个任务的名称2.3 TaskRunner中编写任务的业务逻辑 3. 任务执行脚本 每个公司内部都有一套自己的架子&#xff0c;一般新人来了就直接在已有的架子上开发业务。 以下仅仅作为记录下自己使用的架子&…

低代码平台赋能企业全面数字化转型

引言&#xff1a;在当今这个日新月异的数字化时代&#xff0c;企业正面临着前所未有的机遇与挑战。为了保持竞争力并实现可持续发展&#xff0c;企业亟需进行全面的数字化转型。而低代码平台作为数字化转型的重要工具&#xff0c;正以其独特的优势赋能企业&#xff0c;推动其向…

SQL Server 查询死锁以及解决死锁的基本知识(图文)

目录 1. 基本知识2. 查看和解锁被锁的表3. 查看和处理数据库堵塞 1. 基本知识 在 SQL Server 中&#xff0c;死锁是指两个或多个进程互相等待对方持有的资源&#xff0c;从而无法继续执行的现象 要解决死锁问题&#xff0c;首先需要识别并分析死锁的发生原因&#xff0c;然后…

C++基础语法:链表和数据结构

前言 "打牢基础,万事不愁" .C的基础语法的学习 引入 链表是最基础的数据集合,对标数组.数组是固定长度,随机访问,链表是非固定长度,不能随机访问.数组查找快,插入慢;链表是插入快,查找慢. 前面推导过"数据结构算法数据集合".想建立一个数据集合,就要设计数…

K8S中部署 Nacos 集群

1. 准备 GitK8Skubectlhelm 咱也没想到 K8S 部署系列能搞这么多次&#xff0c;我一个开发天天干运维的活&#xff0c;前端后端运维测试工程师实至名归。 2. 方案选择 https://github.com/nacos-group/nacos-k8s 我替你们看了一下&#xff0c;有好几种方式能部署&#xff…

极狐Gitlab安装部署

GitLab 是一个基于 Git 的开源 DevOps 平台&#xff0c;提供代码仓库管理、CI/CD&#xff08;持续集成和持续交付&#xff09;、项目管理、监控和安全等功能。它集成了多种工具&#xff0c;帮助开发团队在一个平台上进行代码开发、测试、部署和运维。以下是 GitLab 的主要功能和…

LLM - 绝对与相对位置编码 与 RoPE 旋转位置编码 源码

欢迎关注我的CSDN:https://spike.blog.csdn.net/ 本文地址:https://spike.blog.csdn.net/article/details/140281680 免责声明:本文来源于个人知识与公开资料,仅用于学术交流,欢迎讨论,不支持转载。 Transformer 是基于 MHSA (多头自注意力),然而,MHSA 对于位置是不敏感…

自定义类型:联合体

像结构体一样&#xff0c;联合体也是由一个或者多个成员组成&#xff0c;这些成员可以是不同的类型。 联合体类型的声明 编译器只为最⼤的成员分配⾜够的内存空间。联合体的特点是所有成员共⽤同⼀块内存空间。所以联合体也叫&#xff1a;共⽤体。 输出结果&#xff1a; 联合体…

AcWing 3381:手机键盘

【题目来源】https://www.acwing.com/problem/content/3384/【题目描述】 请你计算按照手机键盘&#xff08;9键输入法&#xff09;输入字母的方式&#xff0c;键入给定字符串&#xff08;由小写字母构成&#xff09;所花费的时间。 具体键入规则和花费时间如下描述&#xff1a…

科普文:Java对象在堆中的内存结构

概叙 今天来讲些抽象的东西 -- 对象头&#xff0c;因为我在学习的过程中发现很多地方都关联到了对象头的知识点&#xff0c;例如JDK中的 synchronized锁优化 和 JVM 中对象年龄升级等等。 对象内存构成# Java 中通过 new 关键字创建一个类的实例对象&#xff0c;对象存于内存的…

【人工智能】-- 反向传播

个人主页&#xff1a;欢迎来到 Papicatch的博客 课设专栏 &#xff1a;学生成绩管理系统 专业知识专栏&#xff1a; 专业知识 文章目录 &#x1f349;引言 &#x1f349;反向传播 &#x1f348;定义 &#x1f348;反向传播的作用 &#x1f34d;参数优化 &#x1f34d;学…

软件测试学习之-ADB命令

ADB命令 adb工具即Android Debug Bridge&#xff08;安卓调试桥&#xff09; tools。它就是一个命令行窗口&#xff0c;用于通过电脑端与模拟器或者真实设备交互。在某些特殊的情况下进入不了系统&#xff0c;adb就派上用场啦&#xff01; Android程序的开发通常需要使用到一…

解决Anaconda下载pytorch常见问题

1.问题一 安装完Anaconda后&#xff0c;输入conda命令&#xff0c;出现 conda不是内部或外部命令&#xff0c;也不是可运行的程序 或批处理文件。 分析原因&#xff1a;未配置环境到系统变量 解决方法&#xff1a;将Anaconda安装路径和Anaconda目录下的Scripts文件的路径配…

本地部署,GFPGAN: 实用的面部修复算法

目录 什么是 GFPGAN&#xff1f; 技术原理 主要功能 应用场景 本地安装 运行结果 结语 Tip&#xff1a; 在图像处理和计算机视觉领域&#xff0c;面部修复是一个重要且具有挑战性的研究方向。随着深度学习技术的不断进步&#xff0c;许多新的算法被提出&#xff0c;用于…

Linux笔记之使用系统调用sendfile高速拷贝文件

Linux笔记之使用系统调用sendfile高速拷贝文件 code review! 文章目录 Linux笔记之使用系统调用sendfile高速拷贝文件sendfile 性能优势sendfile 系统调用优点&#xff1a;缺点&#xff1a; cp 命令优点&#xff1a;缺点&#xff1a; 实际测试&#xff1a;拷贝5.8个G的文件&a…