Skip to main content

Posts

Showing posts from 2020

Continuous Deployment of React App to AWS EC2 with Bitbucket-Pipelines

Each time you push the code in the application repository bit bucket is an automated process for deploying applications on AWS EC2 instances. This can be achieved by combining several useful tools such as AWS CodeDeploy and Bitbucket Pipelines. AWS Console Login in AWS console with registered email i.e. with the root.  IAM Group First create IAM group with AmazonS3FullAccess and AWSCodeDeployFullAccess permissions. Step1: In AWS console, from services search IAM and goto IAM console Step2: Goto Groups by clicking Groups in left navigation panel. Step3: Click on Create New Group, Step4: Enter Group Name (I have entered TestDeployGroup), click on Next Step. Step5: Allow AmazonS3FullAccess and AWSCodeDeployFullAccess permissions by selecting them and click on Next Step. Step6: Now review tab will open. Here are you can review the group information and now click on Create Group. IAM User Now create IAM user that Bitbucket can use to upload artifacts to S3 and inform CodeDeploy that a new r

How To Install PHP 7.4 and PHP 7.3 ON Ubuntu 18.04/19.04/16.04

How to Install PHP 7.4 / PHP 7.3 on Ubuntu?. This guide will help you Install PHP 7.4 / PHP 7.3 on Ubuntu 18 / Ubuntu 16 /  Ubuntu 19 . PHP is an open-source server-side scripting language which has been widely adopted for the creation of dynamic web pages. PHP is secure, fast, simple, efficient, flexible and a loosely typed scripting language. The PHP release 7.4.0 has been made available for the general public and for use in Production environments. How to install PHP 7.4 on Ubuntu 18.04 / Ubuntu 19.04 / Ubuntu 16.04 Step 1: Add PHP 7.4 PPA Repository We’ll add ppa:ondrej/php PPA repository which has the latest build packages of PHP. sudo apt-get update sudo apt -y install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update Step 2: Install PHP 7.4 on Ubuntu 18/ Ubuntu 19/ Ubuntu 16 Install PHP 7.4 on Ubuntu 18.04/19.04/16.04 using the command: sudo apt -y install php7.4 Check version installe

A Guide to Docker Commands with Examples [Beginner's Guide]

Docker – ‘A better way to build apps’, as stated on its website, is an open-source platform for building apps and microservices. The catch here is the automated deployment of your app in a container, by OS level virtualization provided by Dockers. Dockers are better than VMs as you can do away with the additional costs for maintaining and starting the latter. By deploying your app and its dependencies (i.e. the pre-requisite apps for its proper functioning) in a container, your app becomes portable during all the phases of development and testing. Moreover, the isolated apps eliminate conflicts, enable team collaboration, and reduce the time-to-market. When Do You Need to Use a Docker? For replicating the environment on your server, while running your code locally on your laptop For Docker CI/CD during numerous development phases (dev/test/QA) For distributing your app’s OS with a team, and as a version control system. How Do You Setup a Docker Locally Download a Docke

How to Undo and Redo in Vim / Vi

Sometimes, when editing a file, you may delete a wrong line or change your mind about an edit, and you’ll want to revert the changes. This article explains how to undo and redo changes in Vim / Vi. Either Vi or Vim is installed by default on macOS and almost all Linux distributions. Knowing the basics of Vim might be very useful when you encounter a situation where your favorite editor is not available. Undo Changes in Vim / Vi   Vim keeps track of all the changes you made in the current session. The undo command undoes one or more changes in the order in which they were made. To undo changes in Vim and Vi use the u, :u or :undo command: If you are in insert or any other mode, press the Esc key to go back to the normal mode, which is also known as command mode. Type u to undo the last change. In Vim, the u command also accepts quantifiers. For example, if you want to undo the 4 last changes, you would use 4u. Make sure you’re typing lowercase u, not the uppercase U command, w

Understanding the /etc/shadow File : information about the system’s users’ passwords : [Beginners Guide]

There are several different authentication schemes that can be used on Linux systems. The most commonly used and standard scheme is to perform authentication against the /etc/passwd and /etc/shadow files. /etc/shadow is a text file that contains information about the system’s users’ passwords. It is owned by user root and group shadow, and has 640 permissions. /etc/shadow Format   The /etc/shadow file contains one entry per line, each representing a user account. You can view the contents of the file, with a text editor or a command such as cat: sudo cat /etc/shadow Typically, the first line describes the root user, followed by the system and normal user accounts. New entries are appended at the end of the file. Each line of the /etc/shadow file contains nine comma-separated fields: 01. Username. The string you type when you log into the system. The user account that exist on the system. 02. Encrypted Password. The password is using the $type$salt$hashed forma

Install Docker on Linux [Beginners Guide]

Install Docker on Linux No matter your distribution of choice, you’ll need a 64-bit installation and a kernel at 3.10 or newer. Kernels older than 3.10 do not have the necessary features Docker requires to run containers; data loss and kernel panics occur frequently under certain conditions. Check your current Linux version with uname -r . You should see something like 3.10.[alphanumeric string].x86_64 . Debian and Ubuntu Docker runs on: Ubuntu Xenial 16.04 LTS Ubuntu Wily 15.10 Ubuntu Trusty 14.04 LTS Ubuntu Precise 12.04 LTS Debian testing stretch Debian 8.0 Jessie Debian 7.0 Wheezy (you must enable backports) Debian Wheezy If so, you need to enable backports (if not, ignore this section): Log into the system and open a terminal with sudo or root privileges (or run sudo -i from your terminal). Open /etc/apt/sources.list.d/backports.list with your favorite text editor (if the file does not exist, create it). Remove existing entries.

Apt-fast for Increasing Download Speed while Installing and Updating Packages Ubuntu/Debian [Beginners Guide]

Have you ever experienced slow download speed when downloading or updating packages in Ubuntu even when your network connection is running fine? You encounter this issue especially when updating and installing packages for the first time after installing a new Ubuntu/Debian OS. However, there is a way to get around this by speeding up the download speed using apt-fast command in Linux. Apt-fast is a shell script wrapper for “apt-get” and “aptitude” that uses the power of either  axel  or  aria 2  download managers to accelerate the download process. It improves download performance by downloading packages simultaneously in parallel with multiple packages per connection. In this article, we will walk through some steps to install apt-fast in order to accelerate the update and downloading process in Ubuntu. We will use Ubuntu 18.04 LTS for describing the procedure mentioned in this article.   Step 1: Installing prerequisites We need to install  axel  or  aria2  in order