赞
踩
本篇文章主要讲RabbitMQ安装
yum update
yum -y install gtk2-devel binutils-devel
checking for GTK+ version... checking for pkg-config... /usr/bin/pkg-config checking for GTK+ - version >= 2.6.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occurred. This usually means GTK+ is incorrectly installed. checking for pkg-config... (cached) /usr/bin/pkg-config checking for GTK+ - version >= 3.0.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. checking for gtk-config... no checking for GTK - version >= 1.2.7... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. checking for gtk-config... (cached) no checking for GTK - version >= 1.2.3... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent.
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2
mkdir -p /usr/local/wxWidgets
tar -xvf wxWidgets-3.1.3.tar.bz2
cd wxWidgets-3.1.3/
./configure --with-regex=builtin --with-gtk --enable-unicode --disable-shared --prefix=/usr/local/wxWidgets
make && make install
cd /etc/ld.so.conf.d/
touch wxWidgets.conf
vim wxWidgets.conf
/usr/local/lib
ldconfig
vim /etc/profile
export WXPATH=/usr/local/wxWidgets/
export PATH=$WXPATH/bin:$PATH
source /etc/profile
wx-config --version

检查我们的JDK
java version
如果没有安装,请根据以下命令安装
浏览JDK版本
yum -y list java*
选择适合自己的版本进行安装,这里我选择1.8
yum install java-1.8.0-openjdk-devel.x86_64
由yum安装的jdk位置为/usr/lib/jvm
开始设置环境变量
vim /etc/profile
接着文档最下面部分输入下面的代码,保存退出
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
这样我们的JDK安装完成了
yum install -y epel-release
yum install -y make gcc gcc-c++ m4 openssl openssl-devel ncurses-devel unixODBC unixODBC-devel java java-devel
wget http://erlang.org/download/otp_src_22.2.tar.gz


tar -xvf otp_src_22.2.tar.gz -C /opt
mkdir -p /usr/local/erlang
cd /opt/otp_src_22.2/
/opt/otp_src_22.2/configure --prefix=/usr/local/erlang

make && make install

vim /etc/profile
export ERLPATH=/usr/local/erlang
export PATH=$ERLPATH/bin:$PATH
source /etc/profile
erl

* 直至目前写入的环境变量展示

cd /opt
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.2/rabbitmq-server-generic-unix-3.8.2.tar.xz
https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.2/rabbitmq-server-generic-unix-3.8.2.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.8.2.tar.xz
vim /etc/profile
PATH=$PATH:/opt/rabbitmq_server-3.8.2/sbin
source /etc/profile
rabbitmq-plugins enable rabbitmq_management

vim /opt/rabbitmq_server-3.8.2/etc/rabbitmq/rabbitmq.conf
systemctl stop firewalld
firewall-cmd --zone=public --add-port=5672/tcp --permanent
firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --complete-reload
firewall-cmd --zone=public --list-ports
后台启动RibbitMQ
rabbitmq-server start -detached
其他命令
启动
rabbitmq-server stop
状态
rabbitmq-server status
rabbitmqctl add_user username passwd //添加用户,后面两个参数分别是用户名和密码
rabbitmqctl set_permissions -p / username ".*" ".*" ".*" //添加权限
rabbitmqctl set_user_tags username administrator //修改用户角色,将用户设为管理员
127.0.0.1:15672
输入账号密码即可登录

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。