DevOps

GeoIP extension PHP 7.x + AMI / Redhat / CentOs Linux

GeoIP extension PHP 7.x + AMI / Redhat / CentOs Linux

Small 2019 update – Please check out this library – github.com/maxmind/MaxMind-DB-Reader-php

It’s a straight replacement of PHP module.


GeoIP extensions is quite use-full, but it requires some server – side magic. If you are looking for something simpler, just go with  ipstack.com or something similar – GeoIP .

Otherwise:

wget http://pear.php.net/go-pear.phar
php go-pear.phar

We need geoip-devel libraries:

yum install geoip-devel

And newest (not stable) version of geoip:

sudo ./pecl install geoip-1.1.1

Don’t forget to add extension=geoip.so to your php.ini file.

Getting started with AWS CLI

Getting started with AWS CLI

AWS has extremely nice UI. But – with the time, you need to do something faster than just clicking via an interface. Sometimes you need to automate something (start/stop instances, make a backup. If you are wondering – there is a perfect time for CLI.

Centos PHP 7 LAMP boilerplate

Centos PHP 7 LAMP boilerplate

This time we are going to cook Apache (httpd 2.4), PHP 7.0 as a PHP-FPM . Instructions are pretty simple. You can just copy and paste command to get working stack in less then 15 minutes.

What you can learn from it? How to install Apache 2.4 and PHP 7, how to enable and opcache, and how to install HTTPS on your server, with purchasing SSL certificate.

How to show line numbers in nano

You can just open file with nano -c filename to make it permanent: nano ~/.nanorc and drop there set const save it… and you are done.