Tag Archives: Rocky Linux

Step-by-Step Guide to Installing Podman on Rocky Linux

Rocky Linux is a popular choice for businesses and developers who need a stable, secure Linux distribution. It’s especially valuable for containerized applications, which brings us to Podman – an excellent alternative to Docker that doesn’t require root access to run containers. In this comprehensive guide step-by-step Installing Podman, we’ll explore how to install and run Podman on Rocky Linux, covering everything from the initial installation to deploying your first container.

Why Podman?

Podman is an open-source, Linux-native tool designed to develop, manage, and run OCI Containers on your Linux system. Its daemonless architecture increases security and makes it easier to manage containers without the need for root privileges. This security feature is one speculated reason why Red Hat shifted its container tool support from Docker to Podman.

What You Need

  • A running instance of Rocky Linux
  • A user account with sudo privileges

Checking for installing Podman

Podman is typically installed by default on Rocky Linux. To verify, you can open a terminal and type the following command:

podman -v

If Podman is installed, you should see an output like:

podman version 4.6.1

If you receive an error indicating the command is not found, you will need to install Podman by executing:

sudo dnf install podman -y

Step 1: Pulling an Image

With Podman installed, your first task is to pull a container image from a registry. We will use the Nginx image as an example. To find the Nginx image, use:

podman search nginx

You’ll see various entries, including official builds and other versions hosted on different registries. To pull the latest official Nginx image from Docker’s registry, run:

podman pull nginx:latest

After selecting the image from the list (using arrow keys if needed), the image will download, ending with a confirmation of the image ID.

Step 2: Deploying a Container

Now that you have your image, it’s time to run a container using it. Execute the following command to deploy an Nginx container:

podman run --name podman-nginx -p 8080:80 -d nginx

Here’s what each part of the command means:

  • podman run: Command to create and start a container.
  • --name podman-nginx: Names the container.
  • -p 8080:80: Maps port 80 in the container to port 8080 on the host.
  • -d: Runs the container in detached mode.
  • nginx: The image used to create the container.

You can verify that your container is running by listing all active containers:

podman ps -a

Interacting with Your Container

To interact with the running Nginx container, use:

podman exec -it podman-nginx /bin/bash

This command opens a bash shell inside the container. You can now manage files and services inside the container as if you were logged into a regular Linux server.

Stopping and Removing Containers

When you’re done, you can stop the container using:

podman stop [ID]

And remove it with:

podman rm [ID]

Replace [ID] with the first few characters of your container’s ID.

An Easier Method: Using Cockpit

Rocky Linux offers Cockpit, a web-based management interface that includes support for managing Podman containers. To use it, start the Cockpit service:

sudo systemctl enable --now cockpit.socket

Then, open a web browser and navigate to https://[SERVER]:9090, replacing [SERVER] with your server’s IP address. Log in with your sudo user credentials. You’ll see an interface where you can manage Podman containers, including starting, stopping, and inspecting containers.

Conclusion

Congratulations! You’ve installed Podman on Rocky Linux and deployed your first container. With these skills, you can now begin using Rocky Linux to host containers in a secure, efficient environment. Podman’s integration into Rocky Linux, along with tools like Cockpit, makes it a powerful platform for developing and deploying containerized applications. Thank you for reading the DevopsRoles page!

How to install CouchDB on Rocky Linux 8: A Comprehensive Guide

Introduction

In this tutorial, How to Install CouchDB on Rocky Linux Server. We’ll cover each step, from updating your system and installing necessary dependencies to configuring CouchDB for optimal performance. By the end of this guide, you will have a fully functional CouchDB instance running on your Rocky Linux server, ready to handle your database needs with reliability and efficiency.

  • CouchDB is a NoSQL database.
  • CouchDB stores and presents data in JavaScript Object Notation.

Install CouchDB on Rocky Linux 8

Update the System

$ sudo yum update

Install “epel-release” repository.

$ sudo yum install epel-release

Enable the Apache CouchDB package repository.

$ sudo vi /etc/yum.repos.d/apache-couchdb.repo

The content is as below:

[bintray--apache-couchdb-rpm]
name=bintray--apache-couchdb-rpm
baseurl=http://apache.bintray.com/couchdb-rpm/el$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1

You want to install Standalone or Cluster Mode. I will use standalone mode.

Install CouchDB

How to fix the error code below:

[vagrant@localhost ~]$ sudo yum install couchdb
bintray--apache-couchdb-rpm                                                                                                                                                      170  B/s | 166  B     00:00
Errors during downloading metadata for repository 'bintray--apache-couchdb-rpm':
  - Status code: 502 for http://apache.bintray.com/couchdb-rpm/el8/x86_64/repodata/repomd.xml (IP: 34.215.50.170)
Error: Failed to download metadata for repo 'bintray--apache-couchdb-rpm': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

You need to delete the repo and add the repo for “couchdb.repo” as below:

$ sudo rm /etc/yum.repos.d/apache-couchdb.repo
$ sudo yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo

YouTube: Step-by-Step Guide: Installing CouchDB on Rocky Linux 8

Now, You install the Couchdb server.

$ sudo yum install couchdb

The output terminal is the picture below:

Verify the installation.

Start services

# systemctl start couchdb
# systemctl enable couchdb
# systemctl status couchdb

Firewalld setting allows port 5984

$ sudo firewall-cmd --zone=public --permanent --add-port=5984/tcp
$ sudo systemctl start firewalld

The CouchDB server will run on localhost:5984

Configuration of CouchDB on Rocky Linux 8

CouchDB’s configuration files are located in the /opt/couchdb/etc/ directory.

Open the file

$ sudo vi /opt/couchdb/etc/local.ini

uncommenting the line just below

[admins]
admin = mypassword

Uncomment the port and bind-address values.

[chttpd]
port = 5984
bind_address = 0.0.0.0

Save the changes and exit the configuration file.

Creating a Database

Access CouchDB Web Interface at http://127.0.0.1:5984/_utils/ with your user credentials and create a new database with CouchDB.

By default, CouchDB listens on port 5984.

Conclusion

You have to Install CouchDB on Rocky Linux 8. CouchDB should now be installed and running on your Rocky Linux 8 system. Remember to secure your CouchDB installation and configure any necessary authentication and access controls based on your requirements. I hope this will be helpful for you. Thank you for reading the DevopsRoles page!