关键词:
(一)源码安装Erlang
(1)下载erlang源码包
wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
(2)解压缩erlang源码包
tar -zxvf otp_src_R13B04.tar.gz
(3)安装
./configure??--prefix=/usr/local/erlang
./make
./make install
如果抛出如下错误
No curses library functions found
请先安装?curses library? ? ? ??
yum -y install ncurses-devel
在安装otp时遇到了一点问题,整体的安装过程比较简单。
这里我只需要解决APPLICATIONS DISABLED部分的问题:
1,安装unixODBC和unixODBC-devel,解决第一个问题;
2,因为我这里用不上Java编译了,因此可以在configure时增加 –disable-javac 避免第二个错误;
./configure --prefix=/usr/local/erlang --disable-javac
make && make install
定义环境变量 [[email protected] otp_src_R13B04]# cat /etc/profile.d/erlang.sh
export PATH=$PATH:/usr/local/erlang/bin
[[email protected] otp_src_R13B04]# erl -sname test
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [rq:1] [async-threads:0] [kernel-poll:false]
安装rabbitmq
(1)下载rabbit包
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.0/rabbitmq-server-generic-unix-3.2.0.tar.gz
(2)解压到当前目录
tar -zxvf rabbitmq-server-generic-unix-3.2.0.tar.gz
(3)启动rabbitmq-server
cd?rabbitmq_server-3.2.0
sbin/rabbitmq-server
插件安装
cd /usr/local/rabbitmq/sbin/
./rabbitmq-plugins enable rabbitmq_management
可以在浏览器中输入:http://192.168.1.164:15672/ 默认用户是guest 默认密码是guest
======================================================
集群部署
设置 Erlang Cookie
??RabbitMQ节点之间和命令行工具 (e.g. rabbitmqctl)是使用Cookie互通的,Cookie是一组随机的数字+字母的字符串。当RabbitMQ服务器启动的时候,Erlang VM会自动创建一个随机内容的Cookie文件。如果是通过源安装RabbitMQ的话,Erlang Cookie 文件在/var/lib/rabbitmq/.erlang.cookie。如果是通过源码安装的RabbitMQ,Erlang Cookie文件$HOME/.erlang.cookie。
??本文演示的实例是用源码安装,由于这个文件权限是 400,所以需要先修改 node2、node3 中的该文件权限为 777:
[email protected]:~$ chmod 777 .erlang.cookie??然后将文件复制到node2、node3上面。
node2:
[email protected]:~$ chmod 777 .erlang.cookie
[email protected]:~$ scp -r node1:/home/lion/.erlang.cookie ~/
[email protected]‘s password:
.erlang.cookie 100% 20 0.0KB/s 00:00node3:
[email protected]:~$ chmod 777 .erlang.cookie
[email protected]:~$ scp -r node1:/home/lion/.erlang.cookie ~/
[email protected]‘s password:
.erlang.cookie 100% 20 0.0KB/s 00:00??分别在node1、node2、node3将权限恢复过来:
[email protected]:~$ chmod 400 .erlang.cookie??最后分别在确认三台机器上的.erlang.cookie的值是一致的
[email protected]:~$ cat .erlang.cookie
VORMVSAAOFOFEQKTNWBA
[email protected]:~$ cat .erlang.cookie
VORMVSAAOFOFEQKTNWBA
[email protected]:~$ cat .erlang.cookie
VORMVSAAOFOFEQKTNWBA
(3)分别启动rabbitmq
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmq-server -detached
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmq-server -detached
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmqctl start_app
查看集群状态
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmqctl cluster_status
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmqctl cluster_status
Cluster status of node [email protected] ...br/>[nodes,[disc,[[email protected]],ram,[[email protected]]],
running_nodes,[[email protected],[email protected]],
partitions,[]]
...done.
[[email protected] rabbitmq_server-3.2.0]#
两个节点得到相同的输出,其中[email protected]节点形式是disc,[email protected]节点形式是ram。这和执行join_cluster命令是的选项--ram是一致的。
(5)改变节点形式
[plain] view plain copy print?1. [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?stop_app??
- [email protected]?...??
- ...done.??
- [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?change_cluster_node_type?disc??
- [email protected]?into?a?disc?node?...??
- ...done.??
- [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?start_app??
- [email protected]?...??
- ...done.??
我们将[email protected]的节点改为disc
[plain] view plain copy print?1. [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?cluster_status??
- [email protected]?...??
- [nodes,[disc,[[email protected],[email protected]]],??
- ?running_nodes,[[email protected],[email protected]],??
- ?partitions,[]]??
- ...done.??
两个节点都是disc的形式
(6)从cluster中分离
[plain] view plain copy print?1. [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?stop_app??
- [email protected]?...??
- ...done.??
- [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?reset??
- [email protected]?...??
- ...done.??
- [[email protected]?rabbitmq_server-3.2.0]#?sbin/rabbitmqctl?start_app??
- [email protected]?...??
[[email protected] rabbitmq_server-3.2.0]# sbin/rabbitmqctl cluster_status
Cluster status of node [email protected] ...br/>[nodes,[disc,[[email protected]]],
running_nodes,[[email protected]],
partitions,[]]
...done.
硬删除:直接删掉集群中的某个节点:rabbitmqctl forget_cluster_node ? node_name
mybatis常见报错!!
在写好代码的时候,编译正常但是在调用接口的时候却报Invalidboundstatement(notfound):错误,这个错误有以下几种可能 1.检查xml文件所在package名称是否和Mapperinterface所在的包名 <mappernamespace=... 查看详情
mha常见报错以及解决方法
error1运行masterha_check_repl--conf=/etc/masterha/app1.cnf报错Testingmysqlconnectionandprivileges..sh:mysql:commandnotfoundmysqlcommandfailedwithrc127:0!at/usr/bin/apply_diff_relay_logsline375解决方案:ln-s/usr/local/mysql/bin/mysql/usr/binerror2运行masterha_check_repl--conf=/etc/masterha... 查看详情
后台常见报错处理
1、接口注入问题:@Controller@Scope("prototype")publicclassGenuineManagementActionextendsBaseAction{privatestaticfinallongserialVersionUID=-3797612994929924322L;@ResourceprivateGenuineManagementServicegenuineM 查看详情
datatables常见报错
UncaughtTypeError:Cannotreadproperty‘style‘ofundefined分析:列表配置 columnDefs列数不匹配来自为知笔记(Wiz) 查看详情
vc/vs常见报错:/****errorc2106:'=':leftoperandmustbel-value****/
...。C语言信息一般有error(出错)和warning(警告)两种。error是编译器遇到了致命错误,无法继续进行编译,必须修改。warning是C语言编译器找到了一个可能非法的位置,但不影响编译,程序还能运行,有可能运行出错,也可能不影响。... 查看详情
reactnative常见报错
1.导出模块错误遇到这样的错误,首先检查代码有闭合一致,如果没有错误的话,则去检查是否是导出模块的错误。如:exportdefault moduleName;改为:module.exports=moduleName; 查看详情
yii2常见报错
1、iconv():Detectedanillegalcharacterininputstring2、The‘gridview‘moduleMUSTbesetupinyourYiiconfigurationfile.3、Yii2i18n 参考:https://www.cnblogs.com/lxdd/p/3966892.htmlhttps: 查看详情
maven常见报错(代码片段)
idea报错Failuretofindcom.bangcle:bangcle-parent:pom:0.0.1-SNAPSHOTinhttp://192.168.138.182:8081/repository/maven-public/wascachedinthelocalrepository,resolutionwillnotbereattempteduntiltheupdateinterval 查看详情
hexo搭建博客本地运行常见报错及解决办法
...手,我在使用hexo编辑文档时遇到了很多问题,hexogenerate编译的时候遇到了各种错误。在此将这些错误及其解决方案记录下来,以便日后查证之用,同时,也可给各位在遇到类似问题时提供一点参考。 1.执行命令hexoserver,提... 查看详情
hibernate常见报错
1.Adifferentobjectwiththesameidentifiervaluewasalreadyassociatedwiththesession(使用Hibernate上传数据时,可能会报这个错误)解决方案:数据库中的表设置了自增,但无效,使用hibernate上传数据时,没有设置主键的id值会报上述错误;心得:在设置... 查看详情
elk搭建elasticsearch常见报错
问题一:[2018-01-31T16:27:21,712][WARN][o.e.b.JNANatives]unabletoinstallsyscallfilter:Java.lang.UnsupportedOperationException:seccompunavailable:requireskernel3.5+withCONFIG_SECCOMPandCONFIG_SECCOMP_FILTE 查看详情
sed常见报错
在使用sed把ceph镜像源从国外改为清华源遇到的两个报错sed-Ei.bak-e\'/^baseurl/s/http(.)com/https://mirrors.tuna.tsinghua.edu.cn/\'-e\'/^gpgkey/s/https(.)com/https://mirrors.tuna.tsinghua.edu.cn/ceph/\'sed:-eexpression#1,char6 查看详情
tensorflow常见报错处理
1.CUDA_ERROR_OUT_OF_MEMORYimporttensorflowastf#避免CUDA_ERROR_OUT_OF_MEMORYconfig=tf.ConfigProto(allow_soft_placement=True)gpu_options=tf.GPUOptions(per_process_gpu_memory_fraction=0.7)config.gpu_option 查看详情
mysql两个常见报错
1.Mysql提示报错Toolarge的错误。解决:showvariableslike‘%max_allowed_packet%‘;【默认为1M】setglobalmax_allowed_packet=2*1024*1024*10 2.Mysql8.0的版本,因为比较新的mysql采用新的保密方式所以旧的似乎不能用,改密码方式:mysql-uroot-pshowdatabas... 查看详情
typescript+vue常见报错
报错1.main.ts报错(Cannotfindmodule‘./App.vue‘.)原因:typescript不能识别.vue文件解决办法:引入vue的typescriptdeclare库在tsconfig.json中加入其中,types是自己延伸的一些declare下面的是vue中的types拓展改后的tsconfig"exclude":["node_modules"],"compilerO 查看详情
模拟器华为模拟器ensp安装注意事项及常见报错处理
...能正常运行安装之前关闭杀毒、卫士、360、电脑管家软件以及电脑的防火墙 安装新版本之前,请先卸载原 查看详情
《leetcode零基础指南》(第十四讲)力扣常见报错集锦
文章目录零、写在前面一、编译出错二、执行出错三、解答错误零、写在前面 当看到这篇文章的时候,确保已经参加过[万人千题]九日集训,并且加入「英雄算法联盟合伙人」群,如果没有参加过可以找博主尽快报名。这个... 查看详情
reactnative常见报错汇总(代码片段)
问题1创建新项目时,本地已经安装好pod,每次都要提示安装pod,然后又安装失败npxreact-nativeinitAwesomeProject如果本地安装的pod与rn默认的不一致,会报如下的错。Installingdependencies✔CocoaPods(https://cocoapods.org/)isnotinstalled.CocoaPodsisnecess... 查看详情