Centos 源代码编译 安装 Erlang
Erlang依赖哪些库?
A fully working GCC compiler environment
Ncurses development libraries
OpenSSL development libraries (如果使用mysql必须安装)
安装了这些库之后,必须要重新执行configure命令,configure之后会有提示哪些依赖的库没有安装,可以根据你的需要放弃安装一些库;上面的操作可以使用下面的命令实现:
sudo yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
wget http://www.erlang.org/download/otp_src_17.3.tar.gz
tar -zxvf otp_src_17.3.tar.gz
cd otp_src_17.3
./configure --with-ssl
make
make install
Centos 源代码编译 安装 RabbitMQ
yum install libxslt python zip unzip nc -y
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.1/rabbitmq-server-generic-unix-3.4.1.tar.gz
tar -zxvf rabbitmq-server-generic-unix-3.4.1.tar.gz
mv 解压出来的文件夹 /usr/loca/rabbitmq/
启动 rabbitmq server
/usr/loca/rabbitmq/sbin/rabbitmq-server –detached
关闭:rabbitmqctl stop
另外如果你用同一个应用启动了不同实例(eg:RABBITMQ_NODE_PORT=5673 RABBITMQ_NODENAME=hare rabbitmq-server -detached),
在进行管理操作的时候需要指定节点名: rabbitmqctl -n node1
1.必需掌握的指令
添加用户:
rabbitmqctl add_user rainbird password
添加权限:
rabbitmqctl set_permissions -p "/" rainbird ".*" ".*" ".*"
删除测试用户:
rabbitmqctl delete_user guest
所有指令列表(很简单的英文):
add_user <UserName> <Password>
delete_user <UserName>
change_password <UserName> <NewPassword>
list_users
add_vhost <VHostPath>
delete_vhost <VHostPath>
list_vhosts
set_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
clear_permissions [-p <VHostPath>] <UserName>
list_permissions [-p <VHostPath>]
list_user_permissions <UserName>
list_queues [-p <VHostPath>] [<QueueInfoItem> ...]
list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...]
list_bindings [-p <VHostPath>]
list_connections [<ConnectionInfoItem> ...]
2.vhost / 不能删除
删除/以后,新建立的vhost不能正常使用(即便不删除/,新建立的vhost也是不能正常使用).不知道为什么,有待研究.
./rabbitmqctl add_user admin *****
./rabbitmqctl add_user push ******
./rabbitmqctl set_user_tags admin administrator
./rabbitmqctl set_permissions -p / admin ‘.*‘ ‘.*‘ ‘.*‘
./rabbitmqctl set_permissions -p / push ‘.*‘ ‘.*‘ ‘.*‘
./rabbitmqctl list_permissions
参考的博客:
http://www.kankanews.com/ICkengine/archives/112645.shtml
专门研究rabbitmq http://my.oschina.net/hncscwc/blog?catalog=488030