Statsd, carbon, graphite and grafana setup on ubuntu

Installation

Statsd

install nodejs

sudo apt-get update
sudo apt-get -y install software-properties-common
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get -y update
sudo apt-get -y install git nodejs

Since root directory of Graphite is /opt, I decide to set statsd running path to /opt as well.

MariaDB setup on centos 7

Update your system:

sudo yum update

Install and Start MariaDB

sudo yum install mariadb-server

Enable MariaDB to start on boot and then start the service:

sudo systemctl enable mariadb
sudo systemctl start mariadb

MariaDB will bind to localhost (127.0.0.1) by default. For information on connecting to a remote database using SSH, see our MySQL remote access guide, which also applies to MariaDB.

Tags 
mariadb centos

OpenVPN under debian plus IOS client setup

Setting up an OpenVPN server

Pre-requisites

Install openvpn. On Debian/Ubuntu:

apt-get install openvpn easy-rsa

Certificate setup

cd /etc/openvpn          # Pick any directory
make-cadir easy-rsa   # Directory to store easy-rsa CA

Edit the variables in easy-rsa/vars and set appropriate key sizes, etc. Important vars:

Tags 
openvpn ios

VSFTP Setup at Amazon EC2

Step #1: Install vsftpd

SSH to your EC2 server. Type:

sudo yum install vsftpd

Step #2: Open up the FTP ports on your EC2 instance

Next, you'll need to open up the FTP ports on your EC2 server. Log in to the AWS EC2 Management Console and select Security Groups from the navigation tree on the left. Select the security group assigned to your EC2 instance. Select the Inbound tab and add port range 20-21

Also add port range 1024-1048

Tags 
vsftpd ec2

PHP and NGINX on Amazon Linux AMI

Install NGINX

sudo yum install nginx -y

Install PHP and PHP-FPM

sudo yum install php -y
sudo yum install php-fpm -y

Configure NGINX (see below)

sudo nano /etc/nginx/conf.d/default.conf
server {
    listen 80;
    server_name www.exampledomain.tld exampledomain.tld;

    location / {
        root   /var/www/html;
        index  index.php index.html index.htm;
    }

    location ~ \.php$ {
        root /var/www/html;
Tags 
php nginx ami

Nagios setup on centos

Install Dev Tools, PHP, Nginx

  sudo yum install nginx php php-fpm php-common gcc glibc glibc-common gd gd-devel make net-snmp unzip -y
  sudo yum groupinstall 'Development Tools' -y

Nginx – Nagios Configuration

  cd /etc/nginx/conf.d
  sudo vi nagios.conf

Nginx - Nagios Configuration with PHP-FCGI

Sensu monitoring software on debian

Install Erlang

sudo wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get -y install erlang-nox

Install RabittMQ

sudo wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server_3.6.0-1_all.deb
sudo dpkg -i rabbitmq-server_3.6.0-1_all.deb

Configure RabittMQ for Sensu

sudo rabbitmqctl add_vhost /sensu
sudo rabbitmqctl add_user sensu secret
Tags 
sensu monitoring