Nginx and Ajenti on ubuntu

Install Ajenti

apt-get update
wget http://repo.ajenti.org/debian/key -O- | apt-key add -
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list
apt-get update
apt-get install ajenti
service ajenti restart

Install Ajenti-v

apt-get install ajenti-v ajenti-v-nginx ajenti-v-mysql ajenti-v-php-fpm php-mysql 

If <3 Ruby

PHP7.2 Nginx and PHP7.2-FPM on Ubuntu 16.04

Install software-properties-common

sudo apt-get install -y software-properties-common

Install latest nginx version from community maintained ppa

sudo add-apt-repository ppa:nginx/stable

Update packages after adding ppa

sudo apt-get update

Install nginx

sudo apt-get install -y nginx

Check status

sudo service nginx

Start nginx if it is not already running

sudo service nginx start
Tags 
nginx php72 fpm

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