[zeromq] zeromq+jzmq在unix下的安装

centos 6.5环境

1. zeromq版本  3.2.5

参考: http://zeromq.org/area:download#toc1

$ wget http://download.zeromq.org/zeromq-3.2.5.tar.gz 

$ tar zxvf zeromq-3.2.5.tar.gz 

$ cd zeromq-3.2.5 

$ ./configure

$ make

$ make install 

错误:

(1) unbale to find a working c++ compiler

yum install gcc gcc-c++ kernel-devel

参考: http://www.centoscn.com/image-text/install/2015/1012/6281.html


2. jzmq安装

下载: https://github.com/zeromq/jzmq

(1) 把 jzmq-master.zip 拷贝到zeromq目录.

unzip jzmq-master.zip

(2) 

cd jzmq-jni/

./autogen.sh

./configure

make

make install

cd ..

mvn package

错误:

(1) could not find libtool

sudo yum install libtool


3. CentOS下安装JDK1.7

参考: http://www.centoscn.com/image-text/install/2014/0827/3585.html


4. /etc/profile文件配置

export JAVA_HOME=/usr/local/java/jdk1.7.0_79

export JRE_HOME=/usr/local/java/jdk1.7.0_79/jre

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:/usr/local/share/java/zmq.jar:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/lib

测试:

java -Djava.library.path=/usr/local/lib  -cp .:/usr/local/share/java/zmq.jar:/usr/local/share/perf/zmq-perf.jar local_lat tcp://192.168.2.200:5555 1 100

java -Djava.library.path=/usr/local/lib  -cp .:/usr/local/share/java/zmq.jar:/usr/local/share/perf/zmq-perf.jar remote_lat tcp://192.168.2.200:5555 1 100

wKiom1cdhbTSr45zAAAhwhEhfcs747.png


参考文献:

http://shiyanjun.cn/archives/241.html    《CentOS 6.4单机环境下安装配置Storm

你可能感兴趣的:(中间件,zeromq)