Flume download and install tutorial

1. Download and upload the flume installation package to the virtual machine

click to download

Extraction code:bxi2

2. Unzip the flume installation package and rename it for easy use

		tar -zxvf flume-ng-1.6.0-cdh5.14.0.tar.gz -C /opt
		mv apache-flume-1.6.0-cdh5.14.0-bin flume

3. Modify the configuration file

  • Enter the /opt/flume/confdirectory
  • Copy the flume-env.sh.templatefile and rename it toflume-env.sh
  • Modify flume-env.shfile
		cd /opt/flume/conf
		cp flume-env.sh.template flume-env.sh
		vi flume-env.sh
  • In the flume-env.shAdd the following files
		export JAVA_HOME=/opt/jdk8
		export JAVA_OPTS="-Xms2048m -Xmx2048m -Dcom.sun.management.jmxremote"

4. Create a flume working directory

  • The working directory is recommended to be created under the flume/confdirectory
		mkdir -p /opt/flume/conf/job

5. Install NetCat server and telnet client

		yum install -y nc
		
		yum list telnet*
		yum install -y telnet-server.x86_64
		yum install -y telnet.x86_64
  • When installing the client, first check the client list, as shown below
  • Then install the two in the list in ordertelnet-server.x86_64、telnet.x86_64

Insert picture description here

6. Test installation

1) Start the server

  • 7777 is a custom port number, be careful not to conflict with other port numbers
		nc -lk 7777

2) Start the client

  • Start in another window
  • 7777 is the port number
  • localhost can change the host name of other nodes
		telnet localhost 7777

3) Input synchronization test

  • Enter content in one of the windows, and check whether the entered content appears in the other window simultaneously
  • If synchronization occurs, flume is installed and configured
  • The successful result is shown in the figure below

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42578036/article/details/110398053