Original connection :( http://www.studyshare.cn/blog-front//blog/details/1170/0 )
First, download
Windows:
1, the official website Download: here
2, Baidu network disk download: here extraction code: 8rbi
Linux:
1, Baidu network disk download: here extract code: l8hx
the Java development tools Download and install tutorial Guinness, the point here .
More in-depth technical articles in here .
Second, the installation
Windows:
1. Unzip the downloaded file, the file can be run activemq.bat
2. Access in your browser: http: //127.0.0.1: 8161 / admin the following screen appears, enter the admin / admin
Mq into the management console, as follows:
windows has been run successfully under mq
ActiveMQ, the default port 61616 for the service, 8161 for the management console port
common problem:
1、启动报错:Caused by: java.io.IOException: Failed to bind to server socket: tcp://0.0.0.0:61616?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
解决方案:mq默认使用的61616端口被占用了,在大多数情况下,占用61616端口的是Internet Connection Sharing (ICS) 这个Windows服务,你只需停止它就可以启动ActiveMQ了。
2、启动报错:Failed to bind to server socket: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600 due to:
java.net.BindException: Address already in use: JVM_Bind
解决方案:5672端口被占用,杀掉占用端口的进程,重启,如果还不成功,则可在conf/activemq.xml中注释掉
Linux下:
1、上传下载文件到linux ~路径下(可通过ftp或者窗口使用alt+p快捷键拖拽上传)
2、解压:tar -zxvf apache-activemq-5.8.0-bin.tar.gz
3、移动并重命名:mv apache-activemq-5.8.0 /usr/local/activemq5.8/
4、启动:./bin/activemq start
6、查看端口为61616是否启动监听:netstat -anp|grep 61616
7、打开浏览器输入:ip:8161/admin 输入admin/admin
ActivityMQ在Linux上安装完毕。