user3345172
user3345172

Reputation: 59

How to install rabbitmq and erlang on centOS without root user?

Can anyone help me with installation? I have install virtualEnv and trying to install both of these. but not sure it is correct or not.

Upvotes: 3

Views: 2074

Answers (1)

Hawklaz
Hawklaz

Reputation: 336

I know this is an old version, but it worked for me on a different Linux build (Mate OS). Follow the steps in this blog post which I have simplified below.

Download the below

ERLANG from OTP R16B03-1 Source File

RabbitMQ from RabbitMQ Server.tar.gz

Installing Erlang

  1. Extract the ERLANG file

  2. cd to source folder

  3. run $ configure

  4. run $ make

  5. Open Makefile and change /Users/deepkrish/Application/erlang to a suitable directory The line you are looking for is the below:
    # prefix from configure, default is /usr/local (must be an absolute path) prefix = /Users/deepkrish/Application/erlang

  6. Run $ make install
    Once Erlang is installed non root user add the erlang/bin to PATH in .bash_profile like below:
    export ERLANG=”/Users/deepkrish/Application/erlang/bin”
    export PATH=${ERLANG}:${PATH}

  7. Now execute the profile by running `$ source .bash_profile” or log off and login again.

  8. Check $ erl -version This should give you the below:
    Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.4

Installing RabbitMQ

  1. Untar the RabbitMQ.tar file and $ cd to the extracted folder

run $ make 2. This should create a scripts folder. Now change into that. $ cd scripts

  1. Now change the below in the rabbitmq-defaults file. This will change where we run and log rabbitMQ. You can change it to the folder you want to run RabbitMQ from as below

### next line potentially updated in package install steps SYS_PREFIX=~/Application/RabbitMQ

  1. Save and close the file Now create a directory mkdir -p ../etc/rabbitmq Note that if you don't have access to the /etc directory you can also change it to somewhere else.

  2. ./rabbitmq-plugins enable rabbitmq_management

  3. Start rabbitmq server $ ./rabbitmq-server &

I use the below script file to start RabbitMQ server whenever I log on.

#!/bin/sh
cd /home/myusername/myproject/RabbitMQ/rabbitmq-server-3.2.3/scripts
export ERLANG="/home/myusername/myproject/RabbitMQ/erlang/bin"
export PATH=${ERLANG}:${PATH}
./rabbitmq-server &

Upvotes: 1

Related Questions