How to install the latest git from source

git-install-latest-from-src.sh

wget https://github.com/git/git/archive/master.zip
unzip master.zip && rm master.zip
cd master
make configure
./configure --prefix=/usr
make install

Read more

How to install PHP 7.1/7.2/7.3/7.4 in CentOS 7

Uncomment the required php version.

yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y yum-utils
# yum-config-manager --enable remi-php70
# yum-config-manager --enable remi-php71
# yum-config-manager --enable remi-php72
yum-config-manager --enable remi-php73
yum -y install php # php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo 
php -v

Read more

How to auto login in PostgreSQL from a shell?

When you run MySQL commands MySQL, mysqlcheck, mysqdump and psql, psqldump etc; they will pick username & password from this file if you do not provide them as argument (-u and -p). It can save you time.

Of course, if you specify username and password explicitly as part of the … Read more

fail2ban filters – custom rules using regexp

fail2ban

fail2Ban is a very handy tool to prevent a lot of unwanted traffic from consuming bandwidth on your servers. It’s a minimal and relatively simple IDS Type Tool that comes with some predefined filters to automatically lockout potentially dangerous or bandwidth-consuming type attacks.

1. creating a custom filter

/etc/fail2ban/filter.d/custom.conf
[Definition]
 
Read more

Exploring the Logrotate Configuration

Logrotate is a system utility that manages the automatic rotation and compression of log files. If log files were not rotated, compressed, and periodically pruned, they could eventually consume all available disk space on a system.

Logrotate’s configuration information can generally be found in two places:

/etc/logrotate.conf: this file contains … Read more

How to install, configure, create user and database with permissions – MySQL

Introduction
MySQL is one of the most popular open-source relational database management systems used by developers worldwide. Whether you’re a beginner or an experienced user, understanding how to install, configure, create users, and databases with permissions in MySQL is essential for effective database management. In this blog post, we’ll guide … Read more

How to install, configure, create user and database with permissions – PostgreSQL

postgresql

PostgreSQL: The World’s Most Advanced Open Source Relational Database

PostgreSQL is arguably the most advance and powerful opensource enterprise class relational database system. It is the object relational database system and provides the most standard compliant system for the Database designers. It provides the complete support for reliable transactions that … Read more

How to repair grub bootloader on a dual boot machine with Windows and Linux

Grub 2 typically gets overridden when you install Windows or another Operating System. To make Linux control the boot process, you need Reinstall (Repair/Restore) Grub using a Linux Live CD.

ROOT_DISK='/dev/sda2'
BOOT_DISK='/dev/sda1' # optional, only for EFI
DISK='/dev/sda'

mount $ROOT_DISK /mnt
mount $BOOT_DISK /mnt/boot/efi # optional

for i in /dev 
Read more