View install-redis.sh
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/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.githubusercontent.com/dfetterman/cf7bc4aa53c47fb546c6/raw/e11cd22f41e6cab71fe621b1f5a1377ff3af01ab/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
View redis-server-for-init.d-startup
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 | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
View redis.conf
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
View redis-server.conf
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
description "Redis Server" | |
author "Thomas Woolford <thomas@urpages.com.au>" | |
# run when the local FS becomes available | |
start on local-filesystems | |
stop on shutdown | |
# The default redis conf has `daemonize = yes` and will naiively fork itself. | |
expect fork |
View monitrc
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
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Start Monit in the background (run as a daemon): | |
set daemon 60 # check services at 1-minute intervals | |
set logfile syslog facility log_daemon |
View nginx.conf
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
description "nginx http daemon" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/local/nginx/sbin/nginx | |
env PIDFILE=/usr/local/nginx/logs/nginx.pid | |
# Needed to allow Nginx to start, however, the wrong PID will be tracked | |
expect fork |
View nginx.conf
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
# nginx | |
check process nginx with pidfile /usr/local/nginx/logs/nginx.pid | |
start program = "/sbin/start nginx" | |
stop program = "/sbin/stop nginx" | |
if failed host 127.0.0.1 port 80 then restart | |
if cpu is greater than 40% for 2 cycles then alert | |
if cpu > 60% for 5 cycles then restart | |
if 10 restarts within 10 cycles then timeout |
View redis-server.conf
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
check process redis-server | |
with pidfile "/var/run/redis.pid" | |
start program = "/sbin/start redis-server" | |
stop program = "/sbin/stop redis-server" | |
if 2 restarts within 3 cycles then timeout | |
if failed host 127.0.0.1 port 6379 then restart | |
if 5 restarts within 5 cycles then timeout |
View mmonit.conf
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
# This is an upstart script to keep mmonit running. | |
# Put this script here: | |
# | |
# /etc/init/mmonit.conf | |
# | |
# and reload upstart configuration: | |
# | |
# initctl reload-configuration | |
# | |
# You can manually start and stop monit like this: |
View git_commit_example.txt
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
50 characters of description (within reason) | |
Longer descriptions to 72 characters (within reason) | |
Longer descriptions to 72 characters (within reason) | |
Longer descriptions to 72 characters (within reason) | |
[#tracker_story_id] | |
or for multiple stories |
OlderNewer