Resources
1.rabbmitMQ Cluster Construction
http://my.oschina.net/guol/blog/186445
http://blog.ftofficer.com/2010/03/translation-rabbitmq-python-rabbits-and-warrens/
Http://www.360doc.com/content/14/0912/09/15077656_408834747.shtml
Http://www.cnblogs.com/lzzhang/p/4786468.html
Http://wenku.baidu.com/link?url=esD2eJeldjww93lErRm4Ui5AFJ34cNFBxX73jpXTzkzJjo9BACzxI8jeko_genwKDwRpGLJbHv_ X2tw9lbn2rmm4h6bzs5h622frxzkq1vu
Http://www.cnblogs.com/flat_peach/archive/2013/04/07/3004008.html
2.zookeeper Cluster Construction
Http://www.cnblogs.com/xiaoxutongxue/p/3554242.html
3.nginx Installation Tutorials
http://blog.csdn.net/dyllove98/article/details/8892509
Build process
1.zookeeper build Process (1) The QA environment is now used by the zookeeper is a pseudo-cluster, in fact, is a machine, IP all on a machine, here to configure the port should pay particular attention to, can not be repeated, Otherwise, the zookeeper is not up. (2) The formal environment of the line should be used is a formal zookeeper cluster, the construction of the formal cluster reference: http://www.cnblogs.com/xiaoxutongxue/p/3554242. HTML to see the zookeeper state of two machines, there is a leader two units is follower on the normal start.
2.rabbmitMQ single-Machine construction process (1) Erlang installation (RABBMITMQ in Erlang, installation of RABBMITMQ dependencies) A. Create an Erlang folder, mkdir/usr/local/ ERLANGB. Copy the installation file into the CP/ROOT/OTP_SRC_R14B.TAR.GZ/USR/LOCAL/ERLANG/C. Add file permissions, chmod +x Otp_src_R14B.tar.gzD. Unzip the file, Tar- ZXF Otp_src_R14B01.tar.gzE. installation files./configure, make, make install (this is three different commands, three commands are completed sequentially) (2) Xmlto RABBMITMQ (required to compile and install) A. Create path, Mkdir/usr/local/xmltob. copy file to path, cp/root/xmlto-0.0.23.tar.gz/usr/local/xmlto/ C. Add permissions D. Unzip and install, Yum install-y docbook-style-xsl,./configure, make, make install (this is four different commands, Four commands are installed in sequence) (3) Simplejson installation (Python is already installed) A. Create a path, copy it, add file permissions, unzip the folder, go to the path after the decompression to complete the installation installation command: Python setup.py Install (this is because Simplejson is dependent on the Python script) (4) RABBMITMQ installation A. Create a path, copy files, add file permissions, extract files, enter a path, command ln-s Rabbitmq-server-generic-unix RABBITMQ (Establish a soft link) Note that the machine hostname and IP address are configured in the Hosts file. B. Turn on RABBMITMQ's Background Web Management page (start running RABBMITMQ first, turn on background web management) sbin/rabbitmq-plugins enable Rabbitmq_ Managementc. Shutting down the machine's firewall D. Add Administrator account (http://blog.csdn.net/zyz511919766/article/details/42292655) Add Users: Sbin/rabbitmqctl Add_user user_admin pasSwd_admin the user into an administrator: Sbin/rabbitmqctl set_user_tags user_admin Administrator
3.rabbmitMQ cluster build a. Ensure that the value of the/root/.erlang.cookie is consistent b. Add [email Protected] node to [email protected] node (in [email protected] Run the following command on the machine) sbin/rabbitmqctl join_cluster [email protected] (this is the addition of a disk node, which is the internal node) (if it is a memory node, the command to join IS Rabbitmqctl Join_ cluster--ram [email protected] More than a--ram parameter represents a memory node, which is generally used externally as an external node (memory node) C. Open all Nodes Sbin/rabbitmqctl Start_ APPD. View cluster node status Sbin/rabbitmqctl cluster_status, if the nodes contains the [email protected] and [email protected] Two machines, the cluster build success E: With the LVS, all the RABBMITMQ external nodes, that is, the memory nodes are configured for load balancing, the cluster is built.
Two problems 1.vhost problem, all the queues have a own vhost, all RABBMITMQ login user also has a vhost, must correspond to good vhost to do the correct operation. Vhost can be added through Rabbitmqctl, before Zheng Lei they use vhost=99, refer to Http://my.oschina.net/guol/blog/1864452.niginx configuration, Must be installed in the consumer machine to do Niginx port forwarding configuration, because consumer profile access RABBMITMQ go to the default 80 port, but RABBMITMQ default is 15672 ports, you must use Nginx port forwarding, This makes it possible to call RABBMITMQ normally.
RABBMITMQ Cluster Construction process