I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
#!/bin/bash | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |
/** | |
* Patch the console methods in order to provide timestamp information | |
* | |
* Usage: | |
* > console.log('ok') | |
* 2012-09-06T11:52:56.769Z ok true | |
* | |
* Note: | |
* The patch will only be applied with the first call. | |
* |
input { | |
file { | |
type => nginx_web | |
path => ["/var/log/nginx/*"] | |
exclude => ["*.gz"] | |
} | |
} | |
filter { | |
grok { |
# kibana.conf# kibana - log viewer | |
# | |
description "Kibana logstash viewer" | |
start on virtual-filesystems | |
stop on runlevel [06] | |
respawn | |
respawn limit 5 30 |
description "logstash collector server" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
# tell upstart we're creating a daemon | |
# upstart manages PID creation for you. | |
expect fork | |
script |
input { | |
file { | |
type => syslog | |
path => "/var/log/messages" | |
} | |
} | |
filter { | |
grok { | |
type => syslog |
If you encounter errors like this ``fatal error: 'stdlib.h' file not foundon Yosemite and Xcode 6.0.1, your
/usr/include/` is probably missing.
Try this command on Terminal:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include /usr/include
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |