http://ja5on.blog.51cto.com/8521911/1424053
1、jzmq的按抓需要java环境,所以先下载jdk并安装,设置java环境变量
#rpm -ivh jdk-7u45-linux-i586.rpm
#vi /etc/profile
JAVA_HOME=/usr/java/jdk1.7.0_45
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:$JAVA_HOME/jre/bin
LD_LIBRARY_PATH=/usr/java/jdk1.7.0_45/jre/bin
export JAVA_HOME CLASSPATH PATH LD_LIBRARY_PATH
#source /etc/profile
2、安装基础库
# yum install libtool
# yum install gcc
# yum install gcc-c++
# yum install make
# yum install libuuid-devel
3、下载安装zmq
wget http://download.zeromq.org/zeromq-2.1.10.tar.gz
tar zxf zeromq-2.1.10.tar.gz
cd zeromq-2.1.10
./configure #--with-pgm build libzmq with PGM extension [default=no]
make
make install
4、下载安装jzmq
等zmq安装完成之后,需要验证一下是否安装成功,试用一下。平常都是用的java,所以就安装了git,然后通过命令
git clone https://github.com/zeromq/jzmq.git
再按相应的步骤来操作:
$ ./autogen.sh
$ ./configure
$ make
$ make install
另外,添加动态链接库
#vi /etc/ld.so.conf
include ld.so.conf.d/*.con
/usr/local/lib