close

Linux Expert Solutions

Linux Expert Solutions

How to Install Go in Ubuntu 20.04

Go is a popular programming language created by Google. The first release was on November 10, 2009, and version 1.0 was released in 2012. It is a pretty new language compared to languages like Java, Python, C, C++, etc.. which has been in the market for more than 15 plus years.

Go was Implemented with Assembly language (GC); C++ (gccgo) and Go. In many places, you may see people refer to go as golang and that is because of its domain name, golang.org, but the proper name is Go. Go is cross-platform, it can be installed on Linux, Windows, and macOS.

Features of Go Programming

Following are some of the core features of Go.

  • Statically type and compiled programming language.
  • Concurrency support and Garbage collection.
  • Strong library and toolset.
  • Multiprocessing and High-performance networking.
  • Known for readability and usability (Like Python).

In this article, you will learn how to install and set up Go Programming Language in Ubuntu 20.04.

Installing Go Language in Ubuntu

We will be installing the latest version of Go which is 1.15.5. To download the latest version, go to the official download page and grab the tarball or use the following wget command to download it on the terminal.

$ sudo wget https://golang.org/dl/go1.15.5.linux-amd64.tar.gz

Next, extract the tarball to /usr/local directory.

$ sudo tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz

Add the go binary path to .bashrc file /etc/profile (for a system-wide installation).

export PATH=$PATH:/usr/local/go/bin

After adding the PATH environment variable, you need to apply changes immediately by running the following command.

$ source ~/.bashrc

Now verify the installation by simply running the go version in the terminal.

$ go version

You can also install go from the snap store too.

$ sudo snap install --classic --channel=1.15/stable go 

Let’s run our traditional hello world program. Save the file with .go extension.

$ cat > hello-world.go

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

To run the program type go run <file-name> from the terminal.

$ go run hello-world.go
Run Go Programe in Linux
Run Go Program in Linux

Remove Go Language in Ubuntu

To remove Go from the system remove the directory where the go tarball is extracted. In this case, go is extracted to /usr/local/go. Also, remove the entry from ~/.bashrc or ~/.bash_profile depending upon where you added the export path.

$ sudo rm -rf /usr/local/go
$ sudo nano ~/.bashrc        # remove the entry from $PATH
$ source ~/.bashrc

That’s it for this article. Now you have, Go up and running to play with it.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Install and Use Flatpak on Linux

In Linux, there are many avenues for installing a software package. You can use the package managers such as APT for Debian-based distributions and YUM for RHEL-based distributions. If the packages are not available in the official repositories, you can use the available PPAs ( For Debian distributions ) or install them using DEB or RPM packages. If you are not a fan of using the terminal, the Software Center can give you a much easier way of installing applications. If everything fails, you still have an option of building from source.

Be that as it may, a few challenges exist. The software center may not always have the application you are looking for and installing from PPAs may yield errors or compatibility issues. Additionally, building from source requires a higher level of expertise and is not a beginner-friendly way for newcomers to Linux.

In light of such challenges, a universal way of installing packages comes highly recommended in order to save time and avoid errors arising from compatibility issues. Canonical was the first to implement such an idea in the form of snap packages. Snaps are cross-distribution, containerized, and dependency-free software packages that simplify the installation of software applications.

Along with snaps, came flatpak, which is yet another universal packaging system.

Flatpaks

Written in C, a flatpak is a package management utility that allows users to install and run applications in a sandboxed or isolated environment. Just like snaps, flatpak aims at simplifying the management of software packages across various distributions. A single flatpak can be installed in any Linux distribution that supports Flatpaks without any modification.

How to Install Flatpak in Linux Distributions

In this guide, we focus on how you can install Flatpak and use it across various Linux distributions. Installing Flatpak is a 2-step procedure. First, you need to install Flatpak using your distribution’s package manager and later add the Flatpak repository ( Flathub ) from where applications will be installed.

Install Flatpak on Ubuntu and Mint

By default, Flatpak is supported on Ubuntu 18.04 and Mint 19.3 and later versions. You can confirm this by running the command:

$ sudo apt install flatpak
Install Flatpak in Ubuntu
Install Flatpak in Ubuntu

Install Flatpak on Debian and Debian-based Distros

For other Debian-based distributions such as Zorin, Elementary, and other distros, add the PPA shown and execute the command below:

$ sudo add-apt-repository ppa:alexlarsson/flatpak 
$ sudo apt update 
$ sudo apt install flatpak

Install Flatpak on RedHat and Fedora

For Fedora and RHEL/CentOS 8 run the command.

$ sudo dnf install flatpak

For earlier versions, RHEL/CentOS 7 use the yum package manager to install flatpak.

$ sudo yum install flatpak

Install Flatpak on OpenSUSE

To enable Flatpak on OpenSUSE invoke the command:

$ sudo zypper install flatpak

Install Flatpak on ArchLinux / Manjaro

Finally, to enable Flatpak on Arch Linux and its flavors, invoke the command:

$ sudo pacman -S flatpak

Once Flatpak is installed, the next step will be to enable Flatpak’s repository from where applications will be downloaded.

How to Add Flathub Repository in Linux

The next step will be to add Flatpak’s repository from where we will download and install applications. Here. we are adding Flathub since it’s the most popular and widely used repository.

To add Flathub to your system. run the command below.

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Adding Flathub Repository
Adding Flathub Repository

How to Use Flatpak in Linux

Before installing an application from the repository, you can search for its availability on Flathub using the syntax:

$ flatpak search application name

For example, to search Flathub for Spotify, run the command:

$ flatpak search spotify

The results will give you the Application ID, Version, Branch, Remotes, and a brief description of the software application.

Search Apps in Flathub
Search Apps in Flathub

To install the application from the repository, use the syntax:

$ flatpak install [remotes] [Application ID]

In this case, to install Spotify, run the command

$ flatpak install flathub com.spotify.Client
Install Apps from Flathub
Install Apps from Flathub

To run a flatpak application, execute the command:

$ flatpak run [Application ID]

For example,

$ flatpak run com.spotify.Client

In my case, this had the effect of launching the Spotify application.

Run Flatpak Application
Run Flatpak Application

To list the flatpak packages residing on your system, run the command:

$ flatpak list
List Flatpak Applications
List Flatpak Applications

To uninstall an application, use the syntax:

$ flatpak uninstall [Application ID]

For example, to remove Spotify, run:

$ flatpak uninstall com.spotify.Client

To update all flatpak packages, run:

$ flatpak update

In my case, all flatpaks were up to date, so no changes were made.

Update Flatpak Applications
Update Flatpak Applications

Finally, to check the version of flatpak you are using, execute:

$ flatpak --version
Check Flatpak Version
Check Flatpak Version
Conclusion

Flatpak goes a long way in providing access to additional software for your system. This is made possible by the Flathub repository which contains a huge collection of flatpak applications.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Install and Use Thonny Python IDE on Linux

Thonny is an Integrated Development Environment (IDE) for Python beginners. It is created with Python and released under MIT License. It is cross-platform and can run in Linux, macOS, Windows.

Why Thonny IDE

If you are new to programming or someone switching from a different language I suggest using thonny. The interface is clean and distraction-free. Newbies can concentrate on language instead of focusing on setting up the environment.

Some of the key features of thonny include

  • Python 3.7 is installed by default with Thonny setup.
  • Built-in Debugger and Step through evaluation.
  • Variable Explorer.
  • Heap, Stack, Assistant, Object Inspector.
  • Built-in Python shell (Python 3.7).
  • Simple PIP GUI Interface to install 3rd party packages.
  • Support code completion.
  • Highlights syntax errors and explain scopes.

In this article, you will learn how to install and use Thonny Python IDE in a Linux environment and exploring the features of thonny.

Setting Up Thonny Python IDE on Linux

The latest version of Thonny is 3.3.0 and there are three ways you can install thonny in Linux.

Install Thonny IDE Using Pip

# pip3 install thonny

Install Thonny IDE Using Installer Script

# bash <(curl -s https://thonny.org/installer-for-linux)

Install Thonny IDE Using Package Manager

$ sudo apt install thonny   [On Debian/Ubuntu]
$ sudo dnf install thonny   [On CentOS/RHEL & Fedora]

For demonstration purposes, I am using Ubuntu 20.04 and running the installer script with wget command as shown above to install thonny. At the end of the installation, you will come to know where is thonny installed. In my case, it is installed in my home directory.

Thonny Installer
Thonny Installer

To launch thonny, go to the installed directory and type “./thonny” or absolute path to thonny. Thonny will ask you to set up Language and Initial settings.

Start Thonny IDE
Start Thonny IDE

As shown in the installation section, Thonny is installed in the home directory. If you look at the thonny folder it has install script, necessary python libraries for thonny to work, binaries. Inside the bin directory, there is python 3.7 and PIP 3 that comes with thonny and thonny launch binary.

Thonny Directory
Thonny Directory

How to Use Thonny IDE in Linux

When you launch Thonny you will get a distraction-free GUI interface. You will have an editor area where you can code and shell to run the script or test codes interactively.

Thonny IDE Editor
Thonny IDE Editor

Linux distributions by default ships with python. Older version ships with Python2* and the latest versions ship with Python3*. We have already seen Python 3.7 is installed by default and thonny sets 3.7 as the default interpreter.

Thonny Python Shell
Thonny Python Shell

You can stick with the default interpreter (Python 3.7) or choose different interpreters available on the system. Go to “Menu BarToolsOptionsInterpreterSet the path” or “Menu BarRun → Select InterpreterSet the path”.

Set Thonny Python Interpreter
Set Thonny Python Interpreter

I suggest sticking with the default python installation unless you know how to fix it if something breaks when switching the interpreter.

Thonny comes with Light and Dark themes. You can change themes for Editor as well as UI theme. To change Theme and Fonts Go to “Menu BarToolsOptionsTheme & Font”.

Thonny IDE Theme
Thonny IDE Theme

There are 3 ways you can run the code you created. First, your code should be saved to a file for Thonny to execute.

  • Press F5 or Execute Icon as shown in Image.
  • Go to “Menu BarPress RunRun Current Script”.
  • Press “CTRL+T” or Go to “RunPress Run current script in terminal”.

The first two methods will switch the directory to wherever your code is and invoke the program file in the Built-in terminal.

Run Programe in Thonny Terminal
Run Programe in Thonny Terminal

The third option allows you to run your code in an external terminal.

Run Programe in External Terminal
Run Programe in External Terminal

The real power of thonny comes with built-in features like File Explorer, Variable Explorer, Shell, Assistant, Notes, Heap, Outline, Stack. To Toggle on-off these features Go to “View → toggle Feature ON/OFF”.

Thonny Build-in Features
Thonny Build-in Features

Thonny Package Manager

It is known that all the python packages are hosted at PyPI. We will normally use PIP (Python Package Manager) to install desired packages from PyPI. But with Thonny, a GUI interface is available to manage packages.

Go to “Menu BarToolsPackages”. In the search bar, you can type a package name and press search. It will search the PyPI index and displays the list of package matching the name.

In my case, I am trying to install a package call numpy.

Search Package in Thonny
Search Package in Thonny

When you select the package from the list, It will take you to the installation page. You can install the latest version or choose different versions as shown in the image. Dependencies are automatically installed.

Select Package Version
Select Package Version

Once you press Install, it will install the package.

Install Package in Thonny
Install Package in Thonny

You can get the details like package version, library location once the package is installed. In case if you wish to uninstall the package, it is simple, go ahead and click the “uninstall” button at the bottom of the package as shown in the image.

Package Details
Package Details

Thonny Debugging

Thonny comes with a built-in debugger. Press Ctrl+F5 to run your program step-by-step, no breakpoints needed. Press F7 for a small step and F6 for a bigger step. You can also access these option from “Menu BarRunDebugging options”.

Thonny Debugger
Thonny Debugger

Thonny Configuration

All the configurations are stored in the “configuration.ini” file. Any changes you make with your thonny session is written to this file. You can also manually edit this file to set different parameters.

To open the file go to “Menu BarToolsOpen Thonny data folder”.

Thonny Configuration File
Thonny Configuration File

How to Uninstall Thonny IDE in Linux

If you wish to uninstall thonny, there is an uninstall script available under the thonny installation directory.

$ /home/tecmint/apps/thonny/bin/uninstall   [Installed using Script]
$ pip3 uninstall thonny                     [If Installed using PIP]
$ sudo apt install thonny                   [On Debian/Ubuntu]
$ sudo dnf install thonny                   [On CentOS/RHEL & Fedora]

That’s it for this article. There is a lot more to explore in Thonny than what we discussed here. Thonny is great for beginners but it is always a personal choice of programmers to choose which IDE or Text editor to work with. Install Thonny play with it, share your feedback with us.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Configure Static IP Address on Ubuntu 20.04

Usually, when a client system connects to a network via WiFi or an ethernet cable, it automatically picks an IP address from the router. This is made possible through the DHCP server which auto-assigns IP addresses to clients from a pool of addresses.

The drawback with DHCP is that once the DHCP lease time has lapsed, the IP address of a system changes to a different one, and this leads to a disconnection in case the system was used for a particular service such as a file server. For this reason, you may want to set a static IP address so that it never changes even when the lease time is up.

In this guide, you will learn how to configure a static IP address on Ubuntu 20.04 server and desktop.

Network Configuration

Ubuntu uses the NetworkManager daemon for managing network configuration. You can configure a static IP either graphically or on the command line.

For this guide, we will focus on setting a static IP address using both the GUI and on the command line, and here is the IP configuration:

IP Address: 192.168.2.100
Netmask: 255.255.255.0
Default gateway route address: 192.168.2.1
DNS nameserver addresses: 8.8.8.8, 192.168.2.1

This information will be different for you, so replace the values accordingly according to your subnet.

How to Set Static IP Address On Ubuntu Desktop

To get started, Launch ‘Settings’ from the application menu as shown.

Ubuntu Settings
Ubuntu Settings

On the window that appears, click on the ‘Network’ tab at the left sidebar and then hit the gear icon on the network interface that you wish to configure. In my case, I’m configuring my wired interface.

Ubuntu Network
Ubuntu Network

In the new window that appears, your interface’s network settings will be displayed as shown. By default, the IP address is set to use DHCP to automatically pick an IP address from the Router or any other DHCP server.

In our case, the current IP address assigned is 192.168.2.104.

Ubuntu Network Configuration
Ubuntu Network Configuration

Now select the IPv4 tab to start setting the static IP address. As you can see, the IP addressing is set to Automatic (DHCP) by default.

Ubuntu Network Method
Ubuntu Network Method

Click on the ‘Manual’ option and new address fields will be displayed. Fill out your preferred static IP address, netmask, and default gateway.

Set Manual Network
Set Manual Network

The DNS is also set to automatic. To manually configure the DNS, click on the toggle to turn off Automatic DNS. Then provide your preferred DNS entries separated by a comma as shown.

Set Network DNS
Set Network DNS

Once all is done, click on the ‘Apply’ button at the top right corner of the window. For the changes to apply, restart the network interface by clicking on the toggle to disable it and enable it again.

Enable Network Connection
Enable Network Connection

Once again, click on the gear icon to reveal the new IP configuration as shown.

Verify Network Configuration
Verify Network Configuration

You can also confirm the IP address on the terminal by running the ifconfig or ip addr command.

$ ifconfig
OR
$ ip addr
Check IP Address
Check IP Address

To confirm the DNS servers, run the command:

$ systemd-resolve --status
Check DNS Servers
Check DNS Servers

How to Set Static IP Address on Ubuntu Server Using Netplan

We have seen how we can configure a static IP address graphically on Ubuntu 20.04 desktop. The other option is configuring a static IP address on the terminal using Netplan.

Developed by Canonical, Netplan is a command-line utility used to configure networking on modern Ubuntu distributions. Netplan makes use of YAML files to configure network interfaces. You can configure an interface to acquire an IP dynamically using DHCP protocol or set a static IP.

Open your terminal and head over to the /etc/netplan directory. You will find a YAML configuration file which you will use to configure the IP address.

In my case the YAML file is 01-network-manager-all.yaml with the default settings as shown.

Netplan YAML File
Netplan YAML File

For the Ubuntu server, the YAML file is 00-installer-config.yaml and these are the default settings.

Default Network Settings
Default Network Settings

To configure a static IP, copy and paste the configuration below. Be mindful of the spacing in the YAML file.

network:
  version: 2
  ethernets:
     enp0s3:
        dhcp4: false
        addresses: [192.168.2.100/24]
        gateway4: 192.168.2.1
        nameservers:
          addresses: [8.8.8.8, 8.8.4.4]

Next, save the file and run the netplan command below to save the changes.

$ sudo netplan apply

You can thereafter confirm the IP address of your network interface using the ifconfig command.

$ ifconfig
Check Ubuntu Server IP Address
Check Ubuntu Server IP Address

This wraps up today’s article. We hope you are now in a position to configure a static IP address on your Ubuntu 20.04 desktop & server system.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Install Microsoft Edge Browser in Linux

Long gone days where Microsoft products are not open-source and architected only for Windows. In their efforts to make a strong footprint in the Linux market, Microsoft has announced on “Microsoft Ignite 2020Edge browser is available for Linux as a dev preview.

Edge browser is initially released with Windows 10 followed by Mac OS, X Box, and Andoird. The Dev release is said to be a preview release aiming to have developers who want to build and test their sites and apps on Linux.

Some features like Signing in to Microsoft Account or AAD account are not available at the moment and it is expected for future build releases. As of now, Edge supports local accounts only.

The current release of Edge supports Debian, Ubuntu, Fedora, and OpenSUSE distribution. It is expected Edge will be available for more platforms in upcoming releases.

Running Microsoft Edge in Ubuntu
Running Microsoft Edge in Ubuntu

There are two ways to install Microsoft Edge on Linux.

We will see both the ways on how to install Edge.

Installing Microsoft Edge Using .deb or .rpm File

First, download the .deb or .rpm file from Microsoft Edge Inside site and install the package as shown. It will add the Microsoft repository to your system, which will automatically keep Microsoft Edge up to date.

$ sudo dpkg -i microsoft-edge-*.deb     [On Debian/Ubuntu/Mint]
$ sudo rpm -i microsoft-edge-*.rpm      [On Fedora/OpenSUSE] 
Install Microsoft Edge in Ubuntu
Install Microsoft Edge in Ubuntu

Installing Microsoft Edge Using Package Manager

Now let’s see how to install Edge from the command line using the distribution package manager.

Install Edge on Debian, Ubuntu, and Mint

$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
$ sudo rm microsoft.gpg
$ sudo apt update
$ sudo apt install microsoft-edge-dev

Install Edge on Fedora Linux

$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
$ sudo dnf config-manager --add-repo https://packages.microsoft.com/yumrepos/edge
$ sudo mv /etc/yum.repos.d/packages.microsoft.com_yumrepos_edge.repo /etc/yum.repos.d/microsoft-edge-dev.repo
$ sudo dnf install microsoft-edge-dev

Install Edge on OpenSUSE Linux

$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
$ sudo zypper ar https://packages.microsoft.com/yumrepos/edge microsoft-edge-dev
$ sudo zypper refresh
$ sudo zypper install microsoft-edge-dev

That’s it for this article. We have discussed two ways of installing the Edge browser on Linux. Though we have many browsers available in Linux, we have to wait and see how Edge is turning out to be in future releases. Install Edge, Play with it and share your experience with us.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

A Basic Guide to Different Stages of Linux Boot Process

Every time you power on your Linux PC, it goes through a series of stages before finally displaying a login screen that prompts for your username or password. There are 4 distinct stages that every Linux distribution goes through in a typical boot-up process.

User Login Prompt
User Login Prompt

In this guide, we will highlight the various steps taken by the Linux OS from the time it is powered on to the time you log in. Kindly note that this guide only takes into consideration the GRUB2 bootloader and systemd init as they are currently in use by a vast majority of modern Linux distributions.

The booting process takes the following 4 steps that we will discuss in greater detail:

  • BIOS Integrity check (POST)
  • Loading of the Boot loader (GRUB2)
  • Kernel initialization
  • Starting systemd, the parent of all processes

1. The BIOS Integrity Check (POST)

The boot process is usually initialized when a user presses the power-on button – if the PC was already shut down – or reboots the system using either the GUI or on the command line.

When the Linux system powers up, the BIOS (Basic Input Output System) kicks in and performs a Power On Self Test (POST). This is an integrity check that performs a plethora of diagnostic checks.

The POST probes the hardware operability of components such as the HDD or SSD, Keyboard, RAM, USB ports, and any other piece of hardware. If some hardware device is not detected, or if there’s a malfunction in any of the devices such as a corrupt HDD or SSD, an error message is splashed on the screen prompting your intervention.

In some cases, a beeping sound will go off especially in the event of a missing RAM module. However, if the expected hardware is present and functioning as expected, the booting process proceeds to the next stage.

2. The Bootloader (GRUB2)

Once the POST is complete and the coast is clear, the BIOS probes the MBR (Master Boot Record) for the bootloader and disk partitioning information.

The MBR is a 512-byte code that is located on the first sector of the hard drive which is usually /dev/sda or /dev/hda depending on your hard drive architecture. Note, however, that sometimes the MBR can be located on a Live USB or DVD installation of Linux.

There are 3 main types of bootloaders in Linux: LILO, GRUB, and GRUB2. The GRUB2 bootloader is the latest and primary bootloader in modern Linux distributions and informs our decision to leave out the other two which have become antiquated with the passage of time.

GRUB2 stands for GRand Unified Bootloader version 2. Once the BIOS locates the grub2 bootloader, it executes and loads it onto the main memory (RAM).

The grub2 menu allows you to do a couple of things. It allows you to select the Linux kernel version that you’d want to use. If you have been upgrading your system a couple of times, you might see different kernel versions listed. Additionally, it gives you the ability to edit some kernel parameters by pressing a combination of keyboard keys.

Select Kernel Version
Select Kernel Version

Also, in a dual-boot setup where you have multiple OS installations, the grub menu allows you to select which OS to boot into. The grub2 configuration file is the /boot/grub2/grub2.cfg file. GRUB’s main objective is to load the Linux kernel onto the main memory.

3. Kernel Initialization

The kernel is the core of any Linux system. It interfaces the PC’s hardware with the underlying processes. The kernel controls all the processes on your Linux system. Once the selected Linux kernel is loaded by the bootloader, it must self extract from its compressed version before undertaking any task. Upon self-extracting, the selected kernel mounts the root file system and initializes the /sbin/init program commonly referred to as init.

Kernel Initialization Process
Kernel Initialization Process

Init is always the first program to be executed and is assigned the process ID or PID of 1. It’s the init process that spawns various daemons & mounts all partitions that are specified in the /etc/fstab file.

The kernel then mounts the initial RAM disk (initrd) which is a temporary root filesystem until the real root filesystem is mounted. All kernels are located in the /boot directory together with the initial RAM disk image.

4.Starting Systemd

The kernel finally loads Systemd, which is the replacement of the old SysV init. Systemd is the mother of all Linux processes and manages among other things mounting of file systems, starting and stopping services to mention just a few.

Systemd uses the /etc/systemd/system/default.target file to determine the state or target that the Linux system should boot into.

  • For a desktop workstation (with a GUI) the default target value is 5 which is the equivalent of run level 5 for the old SystemV init.
  • For a server, the default target is multi-user.target which corresponds to run level 3 in SysV init.

Here’s a breakdown of the systemd targets:

  • poweroff.target (runlevel 0): Poweroff or Shutdown the system.
  • rescue.target (runlevel 1): launches a rescue shell session.
  • multi-user.target (runlevel 2,3,4): Configures the system to a non-graphical (console) multi-user system.
  • graphical.target (runlevel 5): Set the system to use a graphical multi-user interface with network services.
  • reboot.target (runlevel 6): reboots the system.

To check the current target on your system, run the command:

$ systemctl get-default
Check Run Level
Check Run Level

You can switch from one target to another by running the following command on the terminal:

$ init runlevel-value

For example, init 3 configures the system to a non-graphical state.

The init 6 command reboots your system and init 0 powers off the system. Be sure to invoke sudo command when you want to switch to these two targets.

The booting process ends once systemd loads all the daemons and sets the target or run level value. It’s at this point you are prompted for your username and password upon which you gain entry to your Linux system.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Install Fedora 33 Server

Fedora 33 was released with a server edition, and in this tutorial, we shall go through the various steps of how to install the Fedora 33 server with screenshots.

There are some crucial improvements in the server edition, before we proceed to the installation steps, we shall look at some of the new features and improvements.

What’s New in Fedora 33 Server?

  • Linux Kernel 5.8
  • Btrfs as default file system
  • Easy administration with Cockpit’s modern and powerful interface
  • Introduce additional modularity
  • Removal of unnecessary packages
  • Smaller installer footprint
  • Server roles
  • FreeIPA 4.8 security information manager plus so much more

Download Fedora 33 Server

You need to download Fedora 33 server 64-bit live image from the links below:

Installation of Fedora 33 Server Edition

When the image has completed downloading, you have to create a bootable media CD/DVD or USB flash drive using Unetbootin or dd command.

After successful creation of the bootable media, proceed to begin the installation by following the steps below:

1. First, choose a working media/port and place your bootable media into it. There are two options, one you can install Fedora 33 straight away or test the installation media for any errors before starting the installation process.

Fedora Boot Menu
Fedora Boot Menu

2. Choose the installation language you wish to use and click on Continue.

Select Installation Language Support
Select Installation Language Support

3. Next, you will see the screen below which contains the Installation Summary, here, you will configure various system settings including Keyboard layout, Language support, System Time and Date, Installation Source, Software to install, Network, and Hostname, Installation Destination (disk).

Fedora Server Installation Summary
Fedora Server Installation Summary

Setup Keyboard Layout

4. Use the + sign to add a keyboard layout and click Add and after that click Done to move to the Installation Summary interface.

Set Keyboard Layout
Set Keyboard Layout

Configure Language Support

5. Under this step, you will set your language support, simply search for the language you want to install and click Add to install it.

Next click on Done to complete the setting Language support.

Set Language Support
Set Language Support

Configure System Time and Date

6. Managing time is very important on a server, so in this step, you can set the default system timezone, time, and date.

When your system is connected to the Internet, the time is detected automatically when you switch on Network Time, but you need to set the timezone according to your location. After setting all that, click Done and move to the next step.

Set Time and Date
Set Time and Date

Configure Installation Disk

7. In this step, you will configure your system partitions and filesystem types for every system partition. There are two ways to set up partitions, one is to use automatic settings and another is to perform a manual setup.

In this guide, I have chosen to do everything manually. So, click on the disk image to select it and select “Custom”. Then click Done to go to the next screen in the next step.

Choose Installation Destination Disk
Choose Installation Destination Disk

8. In the screen below, select “Standard Partition” partitioning scheme from the drop-down menu, for creating mounting points for the various partitions you will create on your system.

Set Standard Partition
Set Standard Partition

9. To add a new partition, use the “+” button, let us start by creating the root (/) partition, so specify the following in the screen below:

Mount point: /
Desired Capacity: 15GB 

The partition size I have set here is for the purpose of this guide, you can set a capacity of your choice according to the size of your system disk.

After that click on “Add mount point” to create a mount point for the partition.

Create Root Partition
Create Root Partition

10. Every Linux system partition requires a filesystem type, in this step, you need to set a filesystem for the root file system created in the previous step, I have used ext4 because of its features and good performance.

Set Root File System Type
Set Root File System Type

11. Next, create a home partition and mount point which will store system user’s files and home directories. Then click on “Add mount point” complete setting it and proceed to the next stage.

Create Home Partition
Create Home Partition

11. You also need to set a filesystem type for the home partition as you did for the root partition. I have also used ext4.

Set Home Filesystem Type
Set Home Filesystem Type

12. Here, you need to create a swap partition which is space on your hard disk that is allocated to temporarily store extra data in system RAM that is not actively being worked upon by the system in the event that RAM is used up. Then click on “Add mount point” to create the swap space.

Create Swap Partition
Create Swap Partition

13. When you are done creating all the necessary mount points, then click on the Done button at the top left corner.

You will see the interface below for you to effect all the changes to your disk. Click on “Accept Changes” to continue.

Accept Disk Changes
Accept Disk Changes

Setup Network and Hostname

14. From the previous step, you will move back to the configuration screen, next, click on “Network and Hostname” to set your Hostname.

To configure system network settings, click on the “Configure…” button and you will be taken to the next screen.

Set Network Hostname
Set Network Hostname

15. Here, you can configure a lot of network settings including server IP address, default gateway, DNS servers plus many more.

Since this is a server, you will need to select the Manual configuration method from the drop-down menu. Navigate the settings to set other network features and properties as per your serer environment demands.

After setting everything, click on save and then click on Done at the left top corner to complete Network & Hostname configurations, you will move back to the Installation Summary screen to begin the actual installation of system files.

Configure Network Interface
Configure Network Interface

16. There are two more important things to do, as the installation of system files progresses, you will need to set up your root user password and an additional system user account.

Click on “ROOT PASSWORD” to set the root user password, when that is done, click Done and move to the next step.

Create Root Password
Create Root Password

17. To create an additional user account, simply click on “USER CREATION”, and fill in the necessary information.

You can optionally give administrator privileges, and also set a password for the user as in the interface below, then click Done after setting all that.

Create New User Account
Create a New User Account

18. Begin the actual Fedora 33 Server installation of system files by clicking on “Begin Installation” from the screen below.

Begin Fedora Installation
Begin Fedora Installation
Fedora 33 Installation
Fedora 33 Installation

19. Then sit back and relax, wait for the installation to finish, when it is complete, click on Reboot in the bottom right corner and reboot your machine. Then remove the installation media and boot into Fedora 33 server.

Fedora Server Login
Fedora Server Login

I believe that the above steps were simple and direct to follow as usual, and hope everything went just fine. Now you are ready to start running Fedora 23 on your server machine.

Source link

read more
Linux Expert Solutions

How to Install and Use i3 Window Manager on Linux

Written in C language, the i3wm ( i3 Windows Manager ) is a lightweight, easy-to-configure, and hugely popular tiling windows manager. Unlike the conventional desktop environment, a tiling manager provides just sufficient functionality to arrange windows on your screen in an easy and appealing manner suited for your workflow.

i3 is a minimalist tiling manager that intelligently arranges the windows on your screen in a seamless non-overlapping manner. Other tiling managers include xmonad and wmii.

In this guide, we will explain how to install and use the i3 Windows manager on Linux desktop systems.

Benefits of i3 Windows Manager

Unlike X windows managers such as Fluxbox, KWin, and enlightenment, i3 comes with a bag of goodies that we have listed below for a smooth desktop experience.

1. Resource Friendly

Unlike the fully-featured desktop environments such as GNOME, i3 windows manager is quite minimalistic and is designed for simplicity and efficiency. With low resource utilization, it makes up for a fast tiling Windows manager and leaves your system with plenty of RAM and CPU for other applications.

2. Flexibility

Apart from having the ability to automatically arrange windows in a neat and organized manner, i3 is fully configurable and you can tweak a few settings to match your preferred screen layout. Using external tools, you can enhance the appearance by selecting the background image, adjusting the transparency and window fading effect, and enabling desktop notifications.

3. Easy to Navigate Between Workspaces

The i3 tiling manager provides an easy and quick way to switch between workspaces thanks to a wide array of keyboard shortcuts that you can easily configure. You can seamlessly group Windows to suit your workflow, which enhances your productivity.

Installing i3 Window Manager on Linux

The i3 tiling manager is available in Debian, Ubuntu, and Linux Mint repositories and can be installed using the apt package manager as follows.

$ sudo apt update
$ sudo apt install i3

On Fedora distribution, you can install i3 using dnf package manager as shown.

$ sudo apt update
$ sudo dnf install i3

Once installed, you will need to restart your system and click on the small gear wheel at the login window and select the ‘i3’ option as shown.

Select i3 Window Manager
Select i3 Window Manager

Once logged in, you will be prompted to either generate the config file which will be saved in your home directory ~/.config/i3/config, or use the defaults which will save the file in the /etc/i3 directory.

In this guide, we will go with the first option so we are going to hit ENTER to place the configuration file in our home directory.

Create i3 Configuration File
Create i3 Configuration File

Next, you will be required to define the i3 wm modifier key also known as the $mod key which can either be the Windows Logo key or the Alt Key. Use the arrow up or down keys to select your preferred modifier key.

Set i3 Modifier Key
Set i3 Modifier Key

Once you are done with the initial setup. There isn’t much to do with the default i3 window, it saves as a blank screen with a status bar at the very bottom of the screen.

i3 Window Status Bar
i3 Window Status Bar

How to Use i3 Window Manager in Linux

Having installed the i3 tiling manager, here are a few keyboard combinations that you can use to get off the ground and use the tiling manager with ease.

Launch a terminal: $mod + ENTER.

Launching application using the menu: $mod + d – This opens up a menu at the top of your screen that allows you to search a specific application by typing a keyword at the text field provided.

Launch Applications in i3 Window
Launch Applications in i3 Window
  • Enter a fullscreen mode – on and off: $mod + f.
  • Exiting an application window; $mod + Shift + q.
  • Restarting i3: $mod + Shift + r.
  • Exiting i3 windows manager: $mod + Shift + e.

Manipulating Windows

When launching applications, they are usually tiles as shown below. Obviously, the workspace looks so cramped with multiple tiled windows and makes you feel overwhelmed.

Manipulating Windows i3 Window Manager
Manipulating Windows i3 Window Manager

For a better experience, you can detach a window and bring it into the foreground to have a ‘floating’ experience. This can be achieved by pressing the $mod + Shift + Space combination.

In the example below, the terminal window is seen in the foreground instead of being tiled.

Detach Window in Foreground
Detach Window in Foreground

Additionally, you can make the window go fullscreen by hitting the $mod + f combination and repeating the same to revert to the tiling mode.

i3 Status Bar

This is one of the most important yet overlooked section of the i3 tiling manager. It displays information such as the available disk space, IP address & bandwidth rate, Battery level, date, and time.

i3 Window Status Bar
i3 Window Status Bar

i3 Basic Configurations

If you didn’t generate the configuration file in your home directory, you can find it in the /etc/i3/config path. To copy it to your home directory

$ sudo cp /etc/i3/config ~/.config/i3

Then change the ownership to your user

$ sudo chown user:group ~/.config/i3

The configuration file comes with numerous settings that you can tweak to your preference to alter the look and feel of the tiling manager. You can change the colors of workspaces, change the layout of windows, as well as resize windows. We will not dwell so much on that or now. The aim of this guide was to give you a decent introduction to the i3 tiling manager and the basic functionalities to get you started.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Work with Date and Time in Bash Using date Command

Date command is an external bash program that allows to set or display system date and time. It also provides several formatting options. Date command is installed in all Linux distros by default.

$ which date
$ type -a date
Find Date Command Location
Find Date Command Location

Type date command in terminal which will display current date and time.

$ date
Check Date in Linux
Check Date in Linux

Change Linux System Date and Time

Using date command, system date, time and timezone can be modified and the change has to be synced with the hardware clock.

$ date --set="Thu Nov 12 13:06:59 IST 2020"
$ hwclock --systohc
Set Linux System Date and Time
Set Linux System Date and Time

Formatting Options

A good place to get the list of formatting options will be the man page.

$ man date

Let’s see some of the most common formatting options that we will use.

  • To apply formatting use “+ followed by “formatter“.
  • To get a list of formatting options for GNULINUX take a look at the linked man page.
  • To get a list of formatting options for BSD take a look at the linked man page.

The two important parts of the date command is using Format +% and –date option.

Now let’s apply some formatting on the date command. To apply formatting, add plus sign (+) followed by %formatter as shown in examples.

Handling Date in Linux

Let’s take a look at how to use date related formatters in a simple shell script called ‘date.sh‘.

# PRINT YEAR,MONTH,DAY AND DATE...

echo "We are in the year = $(date +%Y)"
echo "We are in the year = $(date +%y)"

# Difference between %Y and %y is %Y will print 4 digits while %y will print the last 2 digits of the year.

echo "We are in the month = $(date +%m)"
echo "We are in the month = $(date +%b)"
echo "We are in the month = $(date +%B)"

# Difference between %B and %b is, %B will print full month name while %b will print abbreviated month name.

echo "Current Day of the month = $(date +%d)"

echo "Current Day of the week = $(date +%A)"
echo "Current Day of the week = $(date +%a)"

# Difference between %A and %a is, %A will print full Weekday name while %a will print abbreviated weekday name.

# Instead of formatting to get the date, we can use %D which will print the date as %m/%d/%y or %F which prints in %Y-%M-%d format.

echo "Date using %D = $(date +%D)"
echo "Date using %F = $(date +%F)"
Find Date and Time using Script
Find Date and Time using Script

Handling Time in Linux

Let’s take a look at how to use time related formatters in a simple shell script called ‘time.sh‘.

# PRINT HOURS, MINS, SECONDS, NANO SECONDS

echo Hours = $(date +%H)
echo Minutes = $(date +%M)
echo Seconds = $(date +%S)
echo Nanoseconds = $(date +%N)
echo Epoch Time = $(date +%s)

echo "current time = $(date +%H:%M:%S:%N)"

# can also use %T which displays Time in HH:MM:SS format.

echo "current time in 24 hour format = $(date +%T)"

# can also use %r to display time in 12 hour format.

echo "current time in 12 hour format = $(date +%r)"
Find Time in Linux Using Script
Find Time in Linux Using Script

With –date or -d Flag

With --date or -d flag input can be passed as string and date command knows to handle it smartly.

Let’s see some examples to understand how it works.

# Print yesterday's date and time.
echo "Yesterday = $(date -d "Yesterday")"

# Print Tomorrow date and time.
echo "tomorrow = $(date -d "tomorrow")"

# Find what is the date and time before 10 days from now.
echo "Before 10 days = $(date -d "tomorrow -10 days")"

# Find last month and next month
echo "Last month = $(date -d "last month" "%B")"
echo "Next month = $(date -d "next month" "%B")"

# Find last year and next year
echo "Last Year = $(date -d "last year" "+%Y")"
echo "Next Year = $(date -d "next year" "+%Y")"

# Forecast the weekday
echo "2 days away from today and it comes on weekdays? = $(date -d "Today +2 days" "+%A")
Check Date Using Formatting
Check Date Using Formatting

Common Operations

calculate the number of days between 2 given dates.

$ echo $(( ( $(date -d "2020-11-10" "+%s") - $(date -d "2020-11-01" "+%s") ) / 86400))

Find the given year is leap year or not.

$ for y in {2000..2020}; do date -d $y-02-29 &>/dev/null && echo $y is leap year; done
Find Leap Year in Linux
Find Leap Year in Linux

Assigning output of date command to a variable.

$ TODAY=$(date +%Y-%m-%d)
OR
$ TODAY1=$(date +%F)
$ echo $TODAY 
$ echo $TODAY1
Assign Date to Variable
Assign Date to Variable

Create log files with the date added to the filename.

Adding date and time while creating log files, backup, or text files is a common operation that we will encounter most often. Let’s take an example, to take a backup, we have created a shell script.

This script will take a backup from 00:00 to 23:59 and scheduled to run daily at 00:00 of the next day. We want to create log files with yesterday’s date format.

CUSTOM_FORMAT=$(date --date "Yesterday" "+%d-%y-%H:%M")
LOG_FILE=/var/log/custom_application/application_${CUSTOM_FORMAT}.log
echo "Script started" >>  ${LOG_FILE}
...
CODE BLOCKS
...
echo "Script completed" >> ${LOG_FILE}

That’s it for this article. In this article, we have seen how to use bash date and time in Linux. Let us know your feedback.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Source link

read more
Linux Expert Solutions

How to Install and Configure Cloudera Manager on CentOS/RHEL 7

In this article, we described the step by step process to install Cloudera Manager as per industrial practices. In Part 2, we already have gone through the Cloudera Pre-requisites, make sure all the servers are prepared perfectly.

Here we are going to have 5 node cluster where 2 masters and 3 workers. I have used 5 AWS EC2 instances to demonstrate the installation procedure. I have named those 5 servers as below.

master1.tecmint.com
master2.tecmint.com
worker1.tecmint.com
worker2.tecmint.com
worker3.tecmint.com

Cloudera Manager is an administrative and monitoring tool for the entire CDH. We admin usually calling it a management tool for Cloudera Hadoop. We can deploy, monitor, control, and make configuration changes with the use of this tool. This is very much essential to manage the entire cluster.

Below are the important uses of Cloudera Manager.

  • Deploy and configure Hadoop clusters in an automated way.
  • Monitor cluster health
  • Configure alerts
  • Troubleshooting
  • Reporting
  • Making Cluster Utilization Report
  • Configuring Resources dynamically

Step 1: Installing Apache Web Server on CentOS

We are going to use the master1 as a webserver for Cloudera repositories. Also, Cloudera Manager is WebUI, so we need to have Apache installed. Follow the below steps to install the apache web server.

# yum -y install httpd

Once installed httpd, start it and enable so that it will be started on boot.

# systemctl start httpd
# systemctl enable httpd

After starting httpd, ensure the status.

# systemctl status httpd
Check-Apache-Status
Check-Apache-Status

After starting httpd, open a browser in your local system and paste the IP address of master1 in the search bar, you should get this test page to make sure httpd is running fine.

Check Apache Webpage
Check Apache Webpage

Step 2: Configure Local DNS to Resolve IP and Hostname

We need to have a DNS server or configure /etc/hosts to resolve IP and hostname. Here we are configuring /etc/hosts, but in real-time, a dedicated DNS server will be there for the production environment.

Follow the below steps to make an entry for all your servers in /etc/hosts.

# vi /etc/hosts

This should be configured in all the servers.

13.235.27.144   master1.tecmint.com     master1
13.235.135.170  master2.tecmint.com     master2
15.206.167.94   worker1.tecmint.com     worker1
13.232.173.158  worker2.tecmint.com     worker2
65.0.182.222    worker3.tecmint.com     worker3
Configure Local DNS
Configure Local DNS

Step 3: Configure SSH Passwordless Login

Cloudera Manager is being installed on master1 in this demonstration. We need to configure password-less ssh from master1 to all other nodes. Because the Cloudera Manager will use ssh to communicate all other nodes to install packages.

Follow the below steps to configure password-less ssh from master1 to all remaining servers. We are going to have a user ‘tecmint‘ to proceed further.

Create a user ‘tecmint‘ all 4 servers using useradd command as shown.

# useradd -m tecmint

To give the root privilege to the user ‘tecmint‘, add the below line into /etc/sudoers file. You can add this line under root as give in the screenshot.

tecmint   ALL=(ALL)    ALL
Add User to Sudo
Add User to Sudo

Switch to user ‘tecmint‘ and create ssh key in the master1 using the below command.

# sudo su tecmint
$ ssh-keygen

Now copy the created key to all 4 servers by using the ssh-copy-id command as shown.

$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] 
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

Now you should be able to ssh from master1 to remaining all servers without a password as shown.

$ ssh master2
$ ssh worker1
$ ssh worker2
$ ssh worker3
SSH Passwordless Login Servers
SSH Passwordless Login Servers

Step 4: Installing and Configuring Cloudera Manager

We can use the vendor (Cloudera) repository to install all the packages using the package management tools in RHEL/CentOS. In real-time, creating our own repository is the best practice because we may not be having internet access in the production servers.

Here we are going to install Cloudera Manager 6.3.1 release. Since we are going to use master1 as the repo server, we are downloading the packages in the below-mentioned path.

Create the below-mentioned directories on master1 server.

$ sudo mkdir -p /var/www/html/cloudera-repos/cm6

We can use the wget tool to download packages over http. So, install wget using the below command.

$ sudo yum -y install wget

Next, download the Cloudera Manager tar file using the following wget command.

$ wget https://archive.cloudera.com/cm6/6.3.1/repo-as-tarball/cm6.3.1-redhat7.tar.gz

Extract the tar file into /var/www/html/cloudera-repos/cm6, already we have made master1 as webserver by installing http and we have tested on the browser.

$ sudo tar xvfz cm6.3.1-redhat7.tar.gz -C /var/www/html/cloudera-repos/cm6 --strip-components=1

Now, verify that all the Cloudera rpm files are there in /var/www/html/cloudera-repos/cm6/RPMS/x86_64 directory.

$ cd /var/www/html/cloudera-repos/cm6
$ ll
List Cloudera Files
List Cloudera Files

Create /etc/yum.repos.d/cloudera-manager.repo files on all servers in the cluster hosts with the following content, here master1 (65.0.101.148) is the Web server.

[cloudera-repo]
name=cloudera-manager
baseurl=http:///cloudera-repos/cm6/
enabled=1
gpgcheck=0

Now the repository has been added, run the below command to view the enabled repositories.

$ yum repolist
List Cloudera Repository
List Cloudera Repository

Run the below command to view all the available Cloudera related packages in the repository.

$ yum list available | grep cloudera*
List Cloudera Packages
List Cloudera Packages

Install cloudera-manager-server, cloudera-manager-agent, cloudera-manager-daemons cloudera-manager-server-db-2.

$ sudo yum install cloudera-manager-daemons cloudera-manager-agent cloudera-manager-server cloudera-manager-server-db-2
Install Cloudera in CentOS
Install Cloudera in CentOS

Run the below command to view all the installed Cloudera packages.

$ yum list installed | grep cloudera*
List Installed Cloudera Packages
List Installed Cloudera Packages

Run the below command to start the cloudera-scm-server-db which is an underlying database to store Cloudera Manager and other services metadata.

By default, Cloudera is coming up with postgre-sql which is embedded in the Cloudera Manager. We are installing the embedded one, in a real-time external database that can be used. It can be Oracle, MySQL, or PostgreSQL.

$ sudo systemctl start cloudera-scm-server-db

Run the below command to check the status of the database.

$ sudo systemctl status cloudera-scm-server-db
Check Cloudera Databasse Status
Check Cloudera Database Status

Configure the db.properties for the Cloudera Manager server.

$ vi /etc/cloudera-scm-server/db.properties

Configure the below value is EMBEDDED to make Cloudera Manager use the Embedded Database.

com.cloudera.cmf.db.setupType=EMBEDDED
Configure Cloudera Database Properties
Configure Cloudera Database Properties

Run the below command to start the Cloudera Manager server.

$ sudo systemctl start cloudera-scm-server

Run the below command to check the status of the Cloudera Manager server.

$ sudo systemctl status cloudera-scm-server
Check Cloudera Manager Status
Check Cloudera Manager Status

Run the below command to start and check the status of the Cloudera Manager agent.

$ sudo systemctl start cloudera-scm-agent
$ sudo systemctl status cloudera-scm-agent
Check Cloudera Manager Agent Status
Check Cloudera Manager Agent Status

Once the Cloudera Manager Server successfully up and running fine, you can view the WebUI (Login page) in the browser using IP address and port number 7180 which is the port number of Cloudera Manager.

https://65.0.101.148:7180
Cloudera Manager Login
Cloudera Manager Login
Summary

In this article, we have seen step by step process for installing Cloudera Manager on CentOS 7. We will see the CDH and other service installations in the next article.

Source link

read more