安装mq

 

一、软件基础安装安装erlang
$ yum install epel-release -y
--没有的话--
$ rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ rpm -ivh http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm--装不上的话先忽略
$ yum -y install erlang socat
//或者使用以下语句
yum install -y *epel* gcc-c++ unixODBC unixODBC-devel openssl-devel ncurses-devel
$ cat > /etc/yum.repos.d/rabbitmq-erlang.repo << EOF
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/7
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
EOF
$ yum makecache
$ yum -y install erlang socat
$ wget http://yum.beijingyuanxin.com/package/server_package/rabbitmq-server-3.7.10-1.el6.noarch.rpm
$ rpm -ivh rabbitmq-server-3.7.10-1.el6.noarch.rpm

-- 这块可不执行
添加主机名解析到127.0.0.1,不然启动失败,日志会有报错
HOSTNAME=`hostname`
sed -i "/127.0.0.1/ s/
$/ $HOSTNAME/" /etc/hosts
cat /var/log/rabbitmq/startup_log
ERROR: epmd error for host db3: timeout (timed out)


启动
$ service rabbitmq-server start
$ chkconfig rabbitmq-server on

# 把managent功能启用
$ rabbitmq-plugins enable rabbitmq_management
创建管理员账号
# 然后创建账号admin 密码
$ rabbitmqctl add_user admin admin20202
# 设置为管理员账号
$ rabbitmqctl set_user_tags admin administrator

1.创建账号、vhost、授权、和授权控制台登录

$ rabbitmqctl add_user yxbx yxbx2020
$ rabbitmqctl add_vhost yxbx
$ rabbitmqctl set_permissions -p "yxbx" yxbx ".*" ".*" ".*"
$ rabbitmqctl set_user_tags yxbx monitoring

  

安装redis

1.tar xzvf redis-4.0.8.tar.gz
2.mv redis /usr/local
3.make & make install

修改redis.cnf配置文件,以便远程连接,关闭保护模式
bind 0.0.0.0
protect_mode no

缺少 adlist.o
yum install  gcc

redis-server /etc/redis.conf


jemalloc/jemalloc.h: No such file or directory
解决:清理上次编译残留文件,重新编译
make distclean && make

 

安装包下载地址:

https://pan.baidu.com/s/1ZEERrcZb4bw7x_CBz70f_Q

提前码1234

 

posted on 2021-03-05 13:58  梓木的稻稻  阅读(136)  评论(0编辑  收藏  举报