1. 安装所需的软件包
yum install -y yum-utils device-mapper-persistent-data lvm2
2. 设置阿里云仓库(国内仓库稳定)
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3. 查看docker容器版本
yum list docker-ce --showduplicates | sort -r
4.选择安装所需的版本
[root@minio ~]# yum install docker-ce-20.10.6
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.163.com
软件包 3:docker-ce-20.10.6-3.el7.x86_64 已安装并且是最新版本
无须任何处理
5.设置自动启动
systemctl enable docker
systemctl start dockre
6. docker的 Server端和clinet 版本
安装的时候会指定Server版本,client没指定默认最新的。
[root@minio ~]# docker version
Client: Docker Engine - Community
Version: 24.0.6
API version: 1.41 (downgraded from 1.43)
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:35:25 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:43:57 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.24
GitCommit: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
runc:
Version: 1.1.9
GitCommit: v1.1.9-0-gccaecfc
docker-init:
Version: 0.19.0
GitCommit: de40ad0
7. docker安装neo4j
#新建文件夹 #data数据存放的文件夹;logs:运行的日志文件夹;conf:数据库配置文件夹;import:大批量导入文件;
mkdir -p /opt/module/neo4j/data
mkdir -p /opt/module/neo4j/logs
mkdir -p /opt/module/neo4j/conf
mkdir -p /opt/module/neo4j/metrics
mkdir -p /opt/module/neo4j/plugins
mkdir -p /opt/module/neo4j/import
chmod 777 -R conf
chmod 777 -R data
chmod 777 -R logs
chmod 777 -R import
# 运行容器
docker run --name neo4j -d -p 7474:7474 -p 7687:7687 -v /opt/neo4j/data:/data -v /opt/neo4j/logs:/logs -v /opt/neo4j/conf:/var/lib/neo4j/conf -v /opt/neo4j/import:/var/lib/neo4j/import --env NEO4J_AUTH=neo4j/Auth_3456 neo4j:3.5.5
#修改配置文件
cd /opt/module/neo4j/conf
vim neo4j.conf
dbms.default_database=test.db
dbms.default_listen_address=0.0.0.0
dbms.memory.pagecache.size=512M
dbms.connector.bolt.enabled=true
dbms.connector.bolt.listen_address=0.0.0.0:7687
dbms.connector.http.listen_address=0.0.0.0:7474
#修改容器为自启动
docker container update --restart=always neo4j
8 .登录neo4j数据库验证
标签:opt,mkdir,module,conf,neo4j,docker,安装 From: https://www.cnblogs.com/vzhangxk/p/17746176.html