-
Notifications
You must be signed in to change notification settings - Fork 323
install.1.0
#Installation Document>>Installation
Download address:
https://github.com/downloads/adyliu/jafka/jafka-1.0.tgz
Unpack it. The directory tree likes this:
jafka-1.0
├── bin
│ ├── consumer-console.sh
│ ├── env.sh
│ ├── producer-console.sh
│ ├── server.sh
│ ├── simple-consumer-console.sh
│ └── zookeeper-server.sh
├── conf
│ ├── log4j.properties.in
│ ├── producer.properties
│ ├── server2.properties
│ ├── server3.properties
│ ├── server.properties
│ ├── server-single.properties
│ └── zookeeper.properties
├── data
├── lib
│ ├── hamcrest-core-1.1.jar
│ ├── jackson-core-asl-1.8.5.jar
│ ├── jackson-mapper-asl-1.8.5.jar
│ ├── jafka-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.3.jar
├── logs
└── VERSION
- bin: running script
- conf: some configurations
- data: topic data
- lib: java running library
- logs: log4j logs
- VERSION: version file
https://github.com/downloads/adyliu/jafka/jafka-1.0-wrapper.tgz
Extend package is community version of Java Service Wrapper.Include this versions:
- Linux x86
- Linux x86_64
- Windows x86
- Windows x86_64(Not supported in community version, instead by x86)
Download other version of Java Service Wrapper for your operation system, and rename your wrapper binary to jafka/jafka64.
bin
├── jafka
├── jafka64
├── jafka.conf
├── jafka.exe
├── optional
│ ├── libwrapper-linux-x86-32.so
│ ├── libwrapper-linux-x86-64.so
│ ├── wrapper.jar
│ └── wrapper-windows-x86-32.dll
└── run.sh
Override service package by extend package.
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.0
Or(Windows)
set.JAFKA_HOME=C:\jafka-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.0</version>
</dependency>
- jafka 1.0+
- zkclient 1.0+ https://github.com/adyliu/zkclient
- zookeeper 3.3.0+ 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