1、设置activemq 端口号,8102为所要修改的端口
注意:这是设置用来和tomcat连接的端口号
vi /activemq/conf/activemq.xml
2、设置activemq的WEB平台的Jetty访问端口号,下面的9101为所需要设置访问的端口号
vi /activemq/conf/activemq.xml
Linux 下面ActiveMQ的安装
下载地址:http://activemq.apache.org/download.html,选择一个自己所要的版本 ,
下载完之后复制到一个位置如/u01下面
解压缩
tar zxvf 包名.tar.gz
cd 包名
cd bin/linux-x86-32
输入:./activemq start
通过页面访问
http://localhost:8161/admin
选择“queue”,”topic”,加入相关的队列名称
如:uidmessage
在启动activemq之后,打开mq文件夹下面的data下面有个wrapper.log,打开之后如果出现下面的提示错误信息
jvm 1 | WARNING - Unable to load the Wrapper's native library because none of the
jvm 1 | following files:
jvm 1 | libwrapper-linux-x86-32.so
jvm 1 | libwrapper.so
jvm 1 | could be located on the following java.library.path:
jvm 1 | /home/krystian/download/Bamboo/wrapper/../lib
jvm 1 | Please see the documentation for the wrapper.java.library.path
jvm 1 | configuration property.
jvm 1 | System signals will not be handled correctly.
可以参考:http://jira.atlassian.com/browse/BAM-4197
为了避免出现这个警告信息, 可以给activemq文件夹/bin/linux-x86-32/wrapper.conf里面的
wrapper.java.library.path.1=???
改为
wrapper.java.library.path.1= =%ACTIVEMQ_HOME%/bin/linux-x86-32/
保存关闭就可以了。
如果想要停止MQ的话在activemq文件夹/bin/linux-x86-32/上面输入:
./activemq stop
MQ 在linux下面的测试
Before running the examples you should try running a JMS broker on your machine. Follow theInstallation instructions to use a binary distribution of ActiveMQ. To run the broker in a command shell, type:
bin/activemq
This starts up ActiveMQ.
Running the examples from a binary distro
You can use Ant to compile and run the examples. In another shell, run the examples:
cd exampleant producer
In another shell type:
cd exampleant consumer
You should then see messages being produced and consumed. You can also pass additional commands into these goals using variables that are availabe in the build.xml. Below is an example:
ant producer -Durl=tcp://localhost:61616 -Dmax=5000 -Ddurable=true-DtimeToLive=30000
For a summary of all the available goals try:
ant help
Linux 下面ActiveMQ的安装
下载地址:http://activemq.apache.org/download.html,选择一个自己所要的版本 ,
下载完之后复制到一个位置如/u01下面
解压缩
tar zxvf 包名.tar.gz
cd 包名
cd bin/linux-x86-32
输入:./activemq start
通过页面访问
http://localhost:8161/admin
选择“queue”,”topic”,加入相关的队列名称
如:uidmessage
在启动activemq之后,打开mq文件夹下面的data下面有个wrapper.log,打开之后如果出现下面的提示错误信息
jvm 1 | WARNING - Unable to load the Wrapper's native library because none of the
jvm 1 | following files:
jvm 1 | libwrapper-linux-x86-32.so
jvm 1 | libwrapper.so
jvm 1 | could be located on the following java.library.path:
jvm 1 | /home/krystian/download/Bamboo/wrapper/../lib
jvm 1 | Please see the documentation for the wrapper.java.library.path
jvm 1 | configuration property.
jvm 1 | System signals will not be handled correctly.
可以参考:http://jira.atlassian.com/browse/BAM-4197
为了避免出现这个警告信息, 可以给activemq文件夹/bin/linux-x86-32/wrapper.conf里面的
wrapper.java.library.path.1=???
改为
wrapper.java.library.path.1= =%ACTIVEMQ_HOME%/bin/linux-x86-32/
保存关闭就可以了。
如果想要停止MQ的话在activemq文件夹/bin/linux-x86-32/上面输入:
./activemq stop
MQ 在linux下面的测试
Before running the examples you should try running a JMS broker on your machine. Follow theInstallation instructions to use a binary distribution of ActiveMQ. To run the broker in a command shell, type:
bin/activemq
This starts up ActiveMQ.
Running the examples from a binary distro
You can use Ant to compile and run the examples. In another shell, run the examples:
cd exampleant producer
In another shell type:
cd exampleant consumer
You should then see messages being produced and consumed. You can also pass additional commands into these goals using variables that are availabe in the build.xml. Below is an example:
ant producer -Durl=tcp://localhost:61616 -Dmax=5000 -Ddurable=true-DtimeToLive=30000
For a summary of all the available goals try:
ant help