1. Unzip to/opt and rename to Activemq
[Email protected] tar]# TAR-ZXVF apache-activemq-5.14.4-bin.tar.gz-c/opt[[email protected] opt]# mv Apache-activemq-5 .14.4/activemq
2, if the startup script Activemq does not have the executable permission, need to empower
[Email protected] bin]# cd/opt/activemq/bin/[[email protected] bin]# CHOMD 755./activemq
3, firewall open the corresponding port
ACTIVEMQ need to use two ports
One is the port of message communication: 61616
One is the management console port: 8161
Can be modified in Conf.jetty.xml, as follows:
<bean id= "Jettyport" class= "Org.apache.activemq.web.WebConsolePort" init-method= "Start" > <!--the default Port number for the Web console--<property name= "host" value= "0.0.0.0"/> <property name= "Port" value= "8161"/></bean>
4. Start
[[email protected] bin]#./ACTIVEMQ start
5, open the management interface: http://192.168.175.13:8161
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/8F/92/wKiom1jlpTWizeo0AABymO6nFP4587.jpg "title=" 111. JPG "alt=" wkiom1jlptwizeo0aabymo6nfp4587.jpg "/>
After logging in, go to the following page:
650) this.width=650; "src=" https://s5.51cto.com/wyfs02/M00/8F/90/wKioL1jlpajAK3jyAABdnzgorWI020.jpg "title=" 1111. JPG "alt=" wkiol1jlpajak3jyaabdnzgorwi020.jpg "/>
5. Security configuration (Message Security)
ActiveMQ If the security mechanism is not added, anyone who knows the specific address of the message service (including IP, port, message address [queue or subject address]) can send and receive messages recklessly. Official Document: Http://activemq.apache.org/security.html
There are a number of message security configuration policies for ActiveMQ, we use simple authorization configuration as an example: (Message queue user password)
In the Conf/activemq.xml file, at the end of the broker tag, add the following:
<plugins> <simpleAuthenticationPlugin> <users> <authenticationuser u Sername= "Liuy" password= "123456" groups= "Users,admins"/> </users> </simpleauthenticationplug In> </plugins>
Defines a Liuy user with a password of 123456 and a role of users,admins
Set user name and password for admin: (console)
A, conf/jetty.xml, ensure that the value of authenticate is True (default)
<bean id= "Adminsecurityconstraint" class= "Org.eclipse.jetty.util.security.Constraint" > <property name= "NA Me "value=" BASIC "/> <property name=" Roles "value=" admin "/> <!--set Authenticate=false to Dis Able Login--<property name= "Authenticate" value= "true"/> </bean>
b, modify the Conf/jetty-realm.properties
admin:123456, admin user:user, user
Note: The user name and password format is---User name: password, role name
6. Boot start
A, copy conf under the ACTIVEMQ to/ETC/INIT.D under
[email protected] bin]# CP ACTIVEMQ/ETC/INIT.D
B, edit/etc/init.d/activemq, add the following statement in line 2nd
# chkconfig:345 Description:auto start ActiveMQ export JAVA_HOME=/HOME/JDK activemq_home=/opt/activemq
C, add system services, and boot up
[Email protected] init.d]# chkconfig--add activemq [[email protected] init.d]# chkconfig activemq o
This article is from "I Love Big gold" blog, please be sure to keep this source http://1754966750.blog.51cto.com/7455444/1913330
Linux Learning: Installing ACTIVEMQ