Install GeoIP Apache Module in CentOS

To install GeoIP Apache module on CentOS 7, run

Now you need to configure Apache VirtualHost.

To block traffic, add following to your VirtualHost entry

In this example, traffic from CN, RU and A1 (stands for proxy IP) get redirected to specified URL.

geoip

firewall-cmd

firewall-cmd is used to manage firewall (iptables) in CentOS 7.

To allow HTTP and HTTPS traffic, run

iptables

Install PHP 7.2 on CentOS from yum

First you need to install Remi repository

https://rpms.remirepo.net

Enable epel repo with

On CentOS 7

On CentOS 6

Enable PHP 7.2

To install PHP, run

Downgrading PHP version

if you ever want to change PHP version, lets say PHP 7.0, do the following. Remove current PHP

Disable PHP 7.2 repo.

Enable PHP 7.0 repo

Now install PHP as above.

PHp Binary

PHP cli will be installed in /usr/bin/php72, you can create a symlink if you want.

PHP-FPM

To install php-fpm module, run

To start php-fpm, run

See CentOS, php

Install Google Chrome on CentOS 7 64 bit

To install Google Chrome on CentOS 7 (Chrome won’t work on CentOS 6 as it is using older version of libraries required for Chrome).

First create repo file

Add following content

Now you can install google chrome with command

See CentOS

Delta RPMs disabled

When i install software on CentOS server, i get following warning

Delta RPMs disabled because /usr/bin/applydeltarpm not installed.

You can install deltaparm package

This will save you some bandwidth as yum will only download difference between previous package.

Install tmux on CentOS 6

tmux is a terminal emulator. It work like screen, but have more features.

CentOS 6 do not come with tmux, you need to enable rpmforge repository.

http://repoforge.org/use/

On CentOS 6 64 bit, run