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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
apt-get update | |
apt-get install git erlang-base erlang-crypto erlang-eunit erlang-mnesia erlang-runtime-tools erlang-syntax-tools erlang-asn1 erlang-public-key erlang-ssl erlang-inets erlang-snmp erlang-os-mon erlang-webtool erlang-tools erlang-xmerl erlang-dev erlang-edoc erlang-eldap erlang-gs erlang-appmon erlang-wx erlang-et erlang-observer | |
# then follow instructions from http://emqtt.io/docs/v2/install.html#installing-from-source | |
git clone https://github.com/emqtt/emqttd-relx.git | |
cd emqttd-relx | |
make | |
# to start cd to bin then run emqttd console | |
# cd _rel/emqttd/bin/ | |
# ./emqttd console |
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
echo "deb http://binaries.erlang-solutions.com/debian xenial contrib" > /etc/apt/sources.list.d/eslerlang.list | |
wget -O - http://binaries.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add - | |
apt-get update | |
apt-get install esl-erlang |
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
echo "DPkg::Post-Invoke {\"/bin/rm -f /var/cache/apt/archives/*.deb || true\";};" > /etc/apt/apt.conf.d/clean |
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
# install erang first | |
# i use https://gist.github.com/vladbabii/704e14dadf6aef671ecb38bf6902a7cc | |
# then download the deb file from https://www.rabbitmq.com/install-debian.html | |
apt-get install socat logrotate init-system-helpers | |
# replace * with the version is you have downloaded multiple files | |
dpkg -i rabbitmq-server_*.deb |
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
# replace thenewusername thenewpassword ;) | |
rabbitmqctl add_user thenewusername thenewpassword | |
rabbitmqctl set_user_tags thenewusername administrator | |
rabbitmqctl set_permissions -p / thenewusername ".*" ".*" ".*" |
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
wget https://downloads.sourceforge.net/project/repcached/repcached/2.2.1-1.2.8/memcached-1.2.8-repcached-2.2.1.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Frepcached%2Ffiles%2F&ts=1484404423&use_mirror=netix | |
mv memcached-1.2.8-repcached-2.2.1.tar.gz\?r\=https%3A%2F%2Fsourceforge.net%2Fprojects%2Frepcached%2Ffiles%2F memcached-1.2.8-repcached-2.2.1.tar.gz | |
tar xvf memcached-1.2.8-repcached-2.2.1.tar.gz | |
apt-get install libevent-dev g++ makelibevent1-dev | |
cd memcached-1.2.8-repcached-2.2.1 | |
./configure --enable-replication | |
make | |
make install | |
ln -s /usr/local/bin/memcached /usr/bin/repcached |
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
vrrp_script chk_apache2 { | |
script "/usr/bin/killall -0 apache2" | |
interval 2 | |
fall 2 | |
rise 2 | |
weight 30 | |
} | |
vrrp_script chk_repcached { | |
script "/usr/bin/killall -0 repcached" |
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
vrrp_script chk_apache2 { | |
script "/usr/bin/killall -0 apache2" | |
interval 2 | |
fall 2 | |
rise 2 | |
} | |
vrrp_script chk_repcached { | |
script "/usr/bin/killall -0 repcached" | |
interval 2 |
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
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
ln -s /usr/local/bin/composer /usr/bin/composer |
OlderNewer