Created
August 29, 2013 17:24
-
-
Save mushkevych/6380936 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Variables | |
USER="admin" | |
PASS="password" | |
# Assert Root User | |
SCRIPTUSER=`whoami` | |
if [ "$SCRIPTUSER" != "root" ] | |
then | |
echo "You must be root to run this script. Try sudo?" | |
exit 1 | |
fi | |
# Install librabbitmq (required for compiling libraries) | |
apt-get update -qq | |
apt-get install git -y | |
git clone git://github.com/alanxz/rabbitmq-c.git | |
cd rabbitmq-c | |
git submodule init | |
git submodule update | |
autoreconf -i && ./configure && make && sudo make install | |
# Setup Repo and Install | |
echo "deb http://www.rabbitmq.com/debian/ testing main" > /etc/apt/sources.list.d/rabbitmq.list | |
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
apt-key add rabbitmq-signing-key-public.asc | |
apt-get update | |
apt-get install rabbitmq-server -y | |
service rabbitmq-server start | |
# Configure Setup | |
rabbitmq-plugins enable rabbitmq_management | |
rabbitmqctl add_user $USER $PASS | |
rabbitmqctl set_user_tags $USER administrator | |
rabbitmqctl set_permissions -p / $USER ".*" ".*" ".*" | |
rabbitmqctl delete_user guest | |
service rabbitmq-server restart | |
# Show settings | |
echo "Default Login:" | |
echo " user: $USER" | |
echo " pass: $PASS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment