【步骤一】 安装依赖包
yum -y install ncurses-devel
yum list | grep ssl yum install openssl-devel
yum list | grep ODBC yum install unixODBC-devel
yum install gcc-c++
yum install perl (自己补充的,不然会报错)
yum install libxslt yum install rsync yum install zip
yum -y install xmlto
yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
【步骤二】下载erlang
wget http://www.erlang.org/download/otp_src_19.0.tar.gz
【步骤三】解压erlang
tar zvxf otp_src_19.0.tar.gz -C /usr/local
mv /user/otp_src_19.0.tar.gz /usr/local/otp (重命名)
cd otp
./configure --prefix=/usr/local/erlang --without-javac --with-opengl
--enable-debug --enable-unicode
make && make install (编译erlang)
vi /etc/profile (设置环境变量)
PATH=$PATH:/usr/local/erlang/bin
export PATH
cd /usr/local/erlang/bin
【步骤四】测试erl是否安装成功
8.1 erl
退出erl命令行
halt().
【步骤五】安装python
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
mv Python-2.7.6.tgz python
cd python
./configure --prefix=/usr/local/python27
make && make install
检测是否安装成功
python -v
- wget 工具安装
http://mirrors.163.com/centos/6.8/os/x86_64/Packages/wget-1.12-8.el6.x86_64.rpm
rpm -ivh wget-1.12-8.el6.x86_64.rpm
- xz工具安装
yum install xz
xz -d xxx.tar.xz
tar -xf xxx.tar -C /usr/local
安装rabbitmq
1.下载
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-unix-3.1.5.tar.gz
2.解压
tar xvf rabbitmq-server-unix-3.1.5.tar.gz
mv rabbitmq-server-unix-3.1.5.tar.gz /usr/local/rabbitmq-server
sbin命令
rabbitmqctl add_user admin admin 新增用户
rabbitmqctl set_user_tags admin administrator 设置为管理员
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*" 设置权限
rabbitmq-plugins enable rabbitmq_management 配置web插件
远程访问rabbitmq
iptables -F 关闭防火墙,开放端口
Java访问rabbitmq
vi /etc/rabbitmq/rabbitmq.config 中添加
[
{rabbit,
[
{tcp_listeners, [5672]},
{loopback_users, ["admin"]}
]}
].
端口
4369 (epmd)
5672, 5671 (AMQP 0-9-1 and 1.0 without and with TLS)
- This port used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000)
15672 (if management plugin is enabled)
61613, 61614 (if STOMP is enabled)
1883, 8883 (if MQTT is enabled)
修改虚拟机ip
vi /etc/sysconfig/network-scripts/ifcfg-eth0