Skip to content
Ady Liu edited this page May 15, 2020 · 9 revisions

#Installation Document>>Installation


Download the package

Download address:

https://github.com/adyliu/jafka/releases

Unpack it. The directory tree likes this:

jafka-3.0.6
├── LICENSE
├── VERSION
├── bin
│   ├── admin-console.sh
│   ├── consumer-console.sh
│   ├── dumper.sh
│   ├── env.sh
│   ├── getoffset-console.sh
│   ├── jafka-linux-x86-32
│   ├── jafka-linux-x86-64
│   ├── jafka-macosx-universal-32
│   ├── jafka-macosx-universal-64
│   ├── jafka-windows-x86-32.exe
│   ├── jafka.conf
│   ├── optional
│   │   ├── libwrapper-linux-x86-32.so
│   │   ├── libwrapper-linux-x86-64.so
│   │   ├── libwrapper-macosx-universal-32.jnilib
│   │   ├── libwrapper-macosx-universal-64.jnilib
│   │   ├── wrapper-windows-x86-32.dll
│   │   └── wrapper.jar
│   ├── producer-console.sh
│   ├── run.sh
│   ├── server.sh
│   ├── simple-consumer-console.sh
│   └── zookeeper-server.sh
├── conf
│   ├── log4j.properties.sample
│   ├── server.properties.sample
│   └── zookeeper.properties
├── lib
│   ├── jackson-annotations-2.9.0.jar
│   ├── jackson-core-2.9.8.jar
│   ├── jackson-databind-2.9.8.jar
│   ├── jafka-3.0.6.jar
│   ├── jopt-simple-5.0.4.jar
│   ├── log4j-3.6.07.jar
│   ├── netty-all-4.1.36.Final.jar
│   ├── optional
│   │   └── mx4j-tools-3.0.1.jar
│   ├── slf4j-api-1.7.26.jar
│   ├── slf4j-log4j12-1.7.26.jar
│   ├── zkclient-2.1.2.jar
│   └── zookeeper-3.4.9.jar
└── logs
  • bin: running script
  • conf: some configurations
  • data: topic data
  • lib: java running library
  • logs: log4j logs
  • VERSION: version file

Start the server

Extend package only includes Linux/Windows OS. See the full documents from Java Service Wrapper for your OS.

Do some clean work recommend. Change the relative path of 'JAFKA_HOME' enviroment variable to absolute path. For example(Linux):

set.JAFKA_HOME=/opt/apps/jafka-3.6.0

Or(Windows)

set.JAFKA_HOME=C:\jafka-3.6.0

Linux x86_64

[adyliu@adyliu-pc bin]$ ./run.sh
Usage: ./run.sh [ console | start | stop | restart | condrestart | status | install | remove | dump ]

Commands:
  console      Launch in the current console.
  start        Start in the background as a daemon process.
  stop         Stop if running as a daemon or in another console.
  restart      Stop if running and then start.
  condrestart  Restart only if already running.
  status       Query the current status.
  install      Install to start automatically when system boots.
  remove       Uninstall.
  dump         Request a Java thread dump if running.

Run the command in any directory

./run.sh console

or run the server at daemond service

./run.sh start

Use this command to see the status of service any time

./run.sh status

Stop the service

./run.sh stop

Linux x86_32

Modify the executable of jakfa for 32 bit Linux in file run.sh

#WRAPPER_CMD="./jafka"
WRAPPER_CMD="./jafka64"

Change to

WRAPPER_CMD="./jafka"
#WRAPPER_CMD="./jafka64"

Commands are the same with Linux x86_64.

Windows x86_32/x86_64

Double click the jafka.exe file and start the service in console.

Wrapper help

jafka -?

Install as windows service

jafka -i jafka.conf

Run the service

jafka -t

Stop the service

jafka -p

Client dependencies

Maven User

Add this dependency in your pom

<dependency>
  <groupId>com.sohu.jafka</groupId>
  <artifactId>jafka</artifactId>
  <version>3.6.0</version>
</dependency>

Package in maven repository: https://repo1.maven.org/maven2/io/jafka/jafka/

Other users

Dependency jars


Language: English | Simple Chinese

Clone this wiki locally