Configure static IP address on CentOS

After a fresh installation CentOS uses DHCP (dhclient -v) to assign an IP to the machine, which keep in changing on reboots, or service restarts, etc.

Use-case: Various service setups, especially involving a clustered configuration we need to set a fixed IP for each machine, so they can communication with each other, in case of DHCP the installation may break on the reboot, as anyone of the machine gets a new IP address. So the first step is to set a static IP address. Continue reading “Configure static IP address on CentOS”

Install XAMPP stack on Ubuntu 16.04 using terminal

Apache is the widely used web server, and PHP is a dominant technology when it comes to CMS frameworks i.e. WordPress, Drupal, etc. For this reason the deployment of the stack has been made effortless with XAMPP PHP development environment. XAMPP is an acronym, where X stands for any operating system (WAMP for Windows, LAMP for Linux), A for Apache web server, M for MySQL or MariaDB database engine, and PP stands for PHP and Perl. The post is about setting-up PHP development environment XAMPP on Ubuntu 16.04, suing terminal.

Step 0 – Login and update

First of all login into your Ubuntu machine using SSH – for a regular it’s recommended to add your SSH public key.
ssh <username>@<hostname/IP>

Continue reading “Install XAMPP stack on Ubuntu 16.04 using terminal”

All you need to know about SSH


SSH stands for Secure SHell, a tool developed by SSH Communication Security Ltd, for secure remote log-in and command execution. It’s a secure alternative of it’s predecessors rlogin, rsh, etc. SSH has become industry de-facto for securely communicating with remote machines i.e. the entire session is encrypted.
The SSH is based on public-key cryptography (also known as asymmetric cryptography), a cryptography system employing key pair i.e. a public key which is meant to be shared, and private key which has to be kept safe and secret, only known to the owner. This pair serves two purpose 1. authentication, the public key verifies the owner of the paired private key, and 2. encryption, the public key encrypts the message, and only the paired private key can decrypt it. In simple words, you can share your public key (content of ~/.ssh/ with anyone via email, for example: to access a remote machine securely and without password, all you need to do is copy your public key to authorized_keys (default – ~/.ssh/authorized_keys) file.

Continue reading “All you need to know about SSH”

Allow remote connections to PostgreSQL

PostgreSQL (aka Postgres), is an open-source SQL relational database management system (RDBMS). These RDBMS are the key component for the majority of all the web sites and web applications, providing an efficient way to persist, organize, and access information.
The last blog was “Install PostgreSQL 9.6 on Ubuntu 14.04, or 16.04 LTS” . By default postgresql allows connections only from the localhost ( i.e. any service on the same machine, only. So, a necessary step in PostgreSQL installation is to allow remote connections.

Continue reading “Allow remote connections to PostgreSQL”

Install PostgreSQL 9.6 on Ubuntu 14.04 or 16.04 LTS

PostgreSQL (aka Postgres), is an open-source SQL relational database management system (RDBMS). These RDBMS are the key component for the majority of all the web sites and web applications, providing an efficient way to persist, organize, and access information.
In the blog, I’ll demonstrate, how to install Postgres 9.6 for Ubuntu 14.04, 16.04 LTS.

Step 1: Add Postgresql repository

$ sudo add-apt-repository "deb $(lsb_release -sc)-pgdg main"
$ wget -q -O - | sudo apt-key add -

Continue reading “Install PostgreSQL 9.6 on Ubuntu 14.04 or 16.04 LTS”

Install Node.js, npm, and Angular on CentOS 7.x


Node.js is a cross-platform, open-source JavaScript library for server-side, contrary to previous practice of using JavaScript primarily for client-side scripting by embedding the scripts in a webpage’s HTML. Node.js provides asynchronous I/O capability out of the box with it’s event-driven architecture. Node.js has been adopted by major corporations, including IBM, LinkedIn, Microsoft, Netflix, Paypal, GoDaddy, Walmart, Cisco systems, a lot more.


NPM is the package management utility for the JavaScript programming language i.e. Node.js, Angular. It provides a command-line client for consuming and distributing the JavaScript modules from the remote registry . Easiest (most common way) to install npm is installing the Node.js, it has it as the default package manager. Currently npm registry has 347,184 packages, and there’s no approval process for submission of the package, you have to check the number of downloads and depending packages as a assurance of a good quality module. For more you can check the npm page.

Continue reading “Install Node.js, npm, and Angular on CentOS 7.x”

Ruby Kernel for Jupyter Notebook

Jupyter notebooks are nice way to keep your code, diagrams, documentation together, mostly in a single file, which is also executable i.e. can run/interpret your code in it, and also have the result saved as it is. Here’s blogpost for installing Jupyter Notebook – today I’ll share how to use Ruby kernel with Jupyter Notebook i.e. executing Ruby code inside the notebooks.
To create notebooks that can execute Ruby code we need to integrate Ruby kernel, the 3 simple steps are:
  • Install Jupyter
  • Install Ruby
  • Install iruby

Continue reading “Ruby Kernel for Jupyter Notebook”

Install latest Ruby version using rbenv

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. Yukihiro “Matz” Matsumoto created it in the mid-1990s, using his influence from other prpgramming languages i.e. Perl, Ada, Lips, Eiffel, and Smalltalk. Ruby was released in 1995. Like Python (released few years earlier), ruby also has dynamic typing and implicit memory management

Continue reading “Install latest Ruby version using rbenv”