×


Category: Docker


Install LAMP Stack on Ubuntu 18.04 - Step by Step Process ?

This article covers step by step process to install a LAMP stack on an Ubuntu 18.04 server. LAMP stack is a group of open-source software that is typically installed together to host dynamic websites. LAMP stands for Linux OS, with Apache web server, Data store in a MySQL database, and dynamic content is processed by PHP.


To Install Apache and Update the Firewall.

1. Install Apache using Ubuntu’s package manager, apt:

$ sudo apt update
$ sudo apt install apache2

2. Allow incoming HTTP and HTTPS traffic for this profile:

$ sudo ufw allow in "Apache Full"


Configure Static IP Addresses on Ubuntu 18.04 Server - Step by Step Process ?

This article covers method to set up a static IP address on Ubuntu 20.04. Basically, in most network configurations, the IP address is assigned dynamically by the router DHCP server. 

The recommended way to assign a static IP address to a device on your LAN is to configure a Static DHCP on your router. Static DHCP or DHCP reservation is a feature found on most routers which makes the DHCP server to automatically assign the same IP address to a specific network device, each time the device requests an address from the DHCP server. This works by assigning a static IP to the device's unique MAC address.


To Get the name of network interface and the default gateway in Linux:

You can either use ip command or the network manager CLI like this:

$ nmcli d


Install MySQL on Ubuntu 18.04 - Step by Step Process ?

This article covers how to install MySQL version 8.0 on an Ubuntu 20.04 server. By completing it, you will have a working relational database that you can use to build your next website or application.

MySQL is an open-source database management system, commonly installed as part of the popular LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It implements the relational model and uses Structured Query Language (better known as SQL) to manage its data.


To install MySQL using the APT package repository:

1. Update the package index on your server if you've not done so recently:

$ sudo apt update

2. Then install the mysql-server package:

$ sudo apt install mysql-server

This will install MySQL, but will not prompt you to set a password or make any other configuration changes. 

Because this leaves your installation of MySQL insecure, we will address this next.


Create a Sudo User on Ubuntu 20.04 - Step by Step Process ?

This article covers how to create a user with sudo privileges. You can now log in to your Ubuntu server with this user account and use sudo to run administrative commands.

Basically, The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. 


Find Out Which Processes are Listening on a Particular Port in Ubuntu 20.04

This article covers methods to find out the processes that are listening to particular ports on your Linux system. A port is nothing but an endpoint of communication used in computer networks.

You have physical or wireless connections at the hardware level. At software or operating system level a port act as a logical construct that acts as communication port of network service such as SSH, HTTPD and more.

TCP and UDP are the most common port. TCP is an acronym for Transmission Control Protocol. UDP is an acronym for User Datagram Protocol.


How to Find Out Which Process Is Listening Upon a Port in Linux ?

1. netstat command or ss command – a command-line tool that displays network connections, routing tables, and a number of network interface statistics.

2. fuser command – a command line tool to identify processes using files or sockets.

3. lsof command – a command line tool to list open files under Linux / UNIX to report a list of all open files and the processes that opened them.

4. /proc/$pid/ file system – Under Linux /proc includes a directory for each running process (including kernel processes) at /proc/PID, containing information about that process, notably including the processes name that opened port.


Clear RAM Cache, Buffer, and Swap Space on Linux System - How to do it ?

This article covers how to clear the cache and buffer memory of the physical memory along with clearing the swap space when needed.

Every Linux System has three options to clear cache without interrupting any processes or services.


If you want to clear Swap space, you may like to run the below command.

$ swapoff -a && swapon -a


To Clear PageCache, dentries and inodes:

$ sync; echo 3 > /proc/sys/vm/drop_caches


To Clear PageCache only:

$ sync; echo 1 > /proc/sys/vm/drop_caches


To Clear dentries and inodes:

$ sync; echo 2 > /proc/sys/vm/drop_caches