[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/p_w_picpath-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/p_w_picpath-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
参考文献:
http://shiyanjun.cn/archives/241.html 《CentOS 6.4单机环境下安装配置Storm》
分享文章:[zeromq]zeromq+jzmq在unix下的安装
文章来源:http://azwzsj.com/article/iipsgo.html