-
Notifications
You must be signed in to change notification settings - Fork 323
install
#Installation Document>>Installation
v1.0 old document install.1.0
Download address:
https://github.com/downloads/adyliu/jafka/jafka-1.1.0.tgz
Unpack it. The directory tree likes this:
jafka-1.1.0
|-- LICENSE
|-- VERSION
|-- bin
| |-- consumer-console.sh
| |-- dumper.sh
| |-- env.sh
| |-- getoffset-console.sh
| |-- jafka
| |-- jafka.conf
| |-- jafka.exe
| |-- jafka64
| |-- log4j.properties
| |-- optional
| | |-- libwrapper-linux-x86-32.so
| | |-- libwrapper-linux-x86-64.so
| | |-- wrapper-windows-x86-32.dll
| | `-- wrapper.jar
| |-- producer-console.sh
| |-- run.sh
| |-- server.sh
| |-- simple-consumer-console.sh
| `-- zookeeper-server.sh
|-- conf
| |-- log4j.properties.in
| |-- producer.properties
| |-- server-single.properties
| |-- server.properties
| `-- zookeeper.properties
|-- data
|-- lib
| |-- jackson-core-asl-1.8.5.jar
| |-- jackson-mapper-asl-1.8.5.jar
| |-- jafka-1.1.0.jar
| |-- jopt-simple-4.3.jar
| |-- log4j-1.2.16.jar
| |-- optional
| | `-- mx4j-tools-3.0.1.jar
| |-- zkclient-1.0.jar
| `-- zookeeper-3.3.5.jar
`-- logs
- bin: running script
- conf: some configurations
- data: topic data
- lib: java running library
- logs: log4j logs
- VERSION: version file
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-1.1.0
Or(Windows)
set.JAFKA_HOME=C:\jafka-1.1.0
[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
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.
Double click the jafka.exe file and start the service in console.
jafka -?
Install as windows service
jafka -i jafka.conf
Run the service
jafka -t
Stop the service
jafka -p
Add this dependency in your pom
<dependency>
<groupId>com.sohu.jafka</groupId>
<artifactId>jafka</artifactId>
<version>1.1.0</version>
</dependency>
Package in maven repository: http://repo1.maven.org/maven2/com/sohu/jafka/jafka/
- jafka 1.0+
- zkclient 1.0+ https://github.com/adyliu/zkclient
- zookeeper 3.3.5+ http://zookeeper.apache.org
- log4j 1.2+ http://logging.apache.org/log4j/
- jackson 1.8.0+ http://jackson.codehaus.org/
- mx4j-tools 3.0.1+ [Optional] http://mx4j.sourceforge.net/
Language: English | Simple Chinese