在Docker环境中启动Apache NiFi

安装Docker

Docker在CentOS 7上:
操作系统:CentOS 7.x。

#!/usr/bin/env bash


# Install Docker
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

# sudo yum install docker -y
# sudo systemctl enable docker

# yum remove docker docker-common
sudo yum install docker-ce docker-ce-cli containerd.io -y
sudo systemctl enable docker
sudo systemctl start docker

在Mac上安装Docker:
https://docs.docker.jp/docker-for-mac/toc.html

安装 NiFi Docker



# Install NiFi Docker
# https://hub.docker.com/r/apache/nifi/
docker run --name nifi \
  -p 8080:8080 \
  -d \
  apache/nifi:latest


# Access: Use
# http://hostname:8080/nifi/

CentOS 7.5安装界面

[root@zzeng-nipy ~]$ docker run --name nifi \
>   -p 8080:8080 \
>   -d \
>   apache/nifi:latest
Unable to find image 'apache/nifi:latest' locally
latest: Pulling from apache/nifi
741437d97401: Pull complete
34d8874714d7: Pull complete
0a108aa26679: Pull complete
eea0f08c7492: Pull complete
ca74b3d90c15: Pull complete
f11a643c4a85: Pull complete
05eafed73b65: Pull complete
c5ddb7ebf4a2: Pull complete
078ec62a70f5: Pull complete
a4904daa3c74: Pull complete
6ee7d3c8cf48: Pull complete
f1d46c7cfa83: Pull complete
Digest: sha256:85e22b320d9d44638e4847b6eb26800428d9bda61c100732a58c387fa8871ddc
Status: Downloaded newer image for apache/nifi:latest
b0964bb23aabbdfb67702153273c3c67a5276b2b55ae7d9bf8684110c5104a04
image.png

进入NiFi的Web界面

如果使用Mac环境,也可以通过Localhost访问:
http://localhost:8080/nifi/

image.png
image.png
广告
将在 10 秒后关闭
bannerAds