<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mwanza Lumamba Eliab</title>
    <description>The latest articles on DEV Community by Mwanza Lumamba Eliab (@eliabmz).</description>
    <link>https://dev.to/eliabmz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3162587%2Fe32469d4-0c72-41a2-8927-4edfcb0010b2.png</url>
      <title>DEV Community: Mwanza Lumamba Eliab</title>
      <link>https://dev.to/eliabmz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eliabmz"/>
    <language>en</language>
    <item>
      <title>How to install cockpit on your EC2 instance</title>
      <dc:creator>Mwanza Lumamba Eliab</dc:creator>
      <pubDate>Thu, 15 May 2025 13:02:31 +0000</pubDate>
      <link>https://dev.to/eliabmz/how-to-install-cockpit-on-your-ec2-instance-1ap2</link>
      <guid>https://dev.to/eliabmz/how-to-install-cockpit-on-your-ec2-instance-1ap2</guid>
      <description>&lt;p&gt;In this post, we will see how to install Cockpit on an EC2 instance. First, we will try to understand what Cockpit is.&lt;/p&gt;

&lt;p&gt;The term &lt;strong&gt;"cockpit"&lt;/strong&gt; refers to a web-based graphical interface for managing and monitoring systems, particularly in Linux/Unix servers, cloud environments, and containerized applications.&lt;br&gt;
**&lt;br&gt;
What is Cockpit in Computing?**&lt;br&gt;
Cockpit is an interactive admin tool that allows users to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor system performance (CPU, memory, disk usage).&lt;/li&gt;
&lt;li&gt;Manage services, users, and storage.&lt;/li&gt;
&lt;li&gt;Configure networking and firewall settings.&lt;/li&gt;
&lt;li&gt;Administer virtual machines (KVM) and containers (Podman/Docker).&lt;/li&gt;
&lt;li&gt;View logs and troubleshoot issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Features of Cockpit (Linux Tool)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Web-Based Interface: Accessible via a browser (no need for SSH or command line).&lt;/li&gt;
&lt;li&gt;Real-Time Monitoring: Graphs and dashboards for system metrics.&lt;/li&gt;
&lt;li&gt;Multi-Server Management : Control multiple machines from one interface.&lt;/li&gt;
&lt;li&gt;Extensible with Plugins : Supports Kubernetes, storage (LVM), and more.&lt;/li&gt;
&lt;li&gt;Lightweight: Runs as a service (cockpit-ws) without heavy resource usage.
so let's start.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  First step: create your EC2 instance
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3g4q1yz1mr18nkzhfve.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3g4q1yz1mr18nkzhfve.jpg" alt="Image description" width="318" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, you need to create an EC2 instance by choosing Redhat as the AMI and connect to it via SSH.&lt;br&gt;
(For those who may have forgotten, here is a post about it&lt;a href="https://medium.com/@eliabm/configure-an-ec2-instance-and-connect-to-it-with-putty-on-windows-4d98b2fd2360" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Second step: Configure your EC2 instance
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
After the first step, run the following commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sudo su&lt;/li&gt;
&lt;li&gt;yum install cockpit -y&lt;/li&gt;
&lt;li&gt;systemctl start cockpit&lt;/li&gt;
&lt;li&gt;system enable cockpit&lt;/li&gt;
&lt;li&gt;passwd root ( to set your password)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So go back to your EC2 instance and modify your security group like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type: custom TCP&lt;/li&gt;
&lt;li&gt;port range: 9090&lt;/li&gt;
&lt;li&gt;source: anywhere IPv4
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbiq7qcpyjtv7bjipskdx.png" alt="Image description" width="800" height="188"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then save.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Third step: See your work
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Now go to your browser. On your search bar, type:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://IP:9090" rel="noopener noreferrer"&gt;https://IP:9090&lt;/a&gt;&lt;/strong&gt; ( IP represents the Public IPv4 address)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqe5khfw25koi7x1zz54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faqe5khfw25koi7x1zz54.png" alt="Image description" width="800" height="341"&gt;&lt;/a&gt;&lt;br&gt;
Click on advanced, depending on your language.&lt;/p&gt;

&lt;p&gt;Now, just enter your username, your password and validate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6tjfthwe758awlig3etk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6tjfthwe758awlig3etk.png" alt="Image description" width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see by yourself, it's not so complicate&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create Nginx Load balancer on EC2</title>
      <dc:creator>Mwanza Lumamba Eliab</dc:creator>
      <pubDate>Thu, 15 May 2025 09:42:21 +0000</pubDate>
      <link>https://dev.to/eliabmz/create-nginx-load-balancer-on-ec2-4765</link>
      <guid>https://dev.to/eliabmz/create-nginx-load-balancer-on-ec2-4765</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Today we’ll see how to configure nginx as an instance on an EC2 instance.&lt;br&gt;
But first, we need to know what nginx is.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw9cnl6l9p2h4umy3k5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw9cnl6l9p2h4umy3k5s.png" alt="Image description" width="300" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Nginx *&lt;/em&gt;(pronounced “engine-x”) is a popular open-source web server used for serving websites, applications, reverse proxying, load balancing, and more. Originally developed to solve concurrency problems with traditional web servers (like Apache), Nginx is now used by giants like Netflix, Airbnb, Dropbox, and WordPress.com for its speed, stability, and low resource consumption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A load balancer&lt;/strong&gt; is a system (hardware or software) that distributes incoming network traffic across multiple servers to improve efficiency, reliability, and performance.&lt;br&gt;
To complete our task today, we need to create an EC2 instance and link it to an SSH client. For those who are confused, click here.&lt;br&gt;
After Creating your first EC2 instance, you will have to create two more.&lt;br&gt;
Note: we’ll use an EC2 with ubuntu as &lt;br&gt;
Now let’s start.&lt;/p&gt;

&lt;p&gt;First Step: Installing and configuring the application&lt;br&gt;
After creating and connecting your instance, execute the following instruction:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadn2aa9pykfto96j5e1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fadn2aa9pykfto96j5e1j.png" alt="Image description" width="638" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; sudo su
• Function: Switches to superuser (root) mode.
• What does it do?: Gives full system authority (caution: risk of critical changes). Avoids having to type sudo before each command.&lt;/li&gt;
&lt;li&gt;apt-get update -y
• Function: Updates the list of available packages from the Ubuntu/Debian repositories.
• What does it do? -Synchronizes package information with remote servers. -Required before installing or updating software to avoid version errors.
Explanation of options:
• y: Automatically responds “yes” to any confirmations.&lt;/li&gt;
&lt;li&gt;apt-get install nginx -y 
• Function: Installs the Nginx server from the official repositories.
• What is it for?- Installs a powerful web server (to host a site, an API, etc.).- Automatically starts the Nginx service after installation.
Options explained:
• y: Automatically confirms the installation.&lt;/li&gt;
&lt;li&gt;rm -rf /etc/nginx/sites-enabled/default
• Function: Removes the default Nginx configuration file.
• What is it for? -Disables the default site (“Welcome to Nginx” page). Avoids conflicts with a custom configuration.
Options explained:
-rf: Force deletion (-f) and include folders (-r).&lt;/li&gt;
&lt;li&gt;nano /etc/nginx/conf.d/eliab.conf
Purpose: Opens the eliab.conf file in the Nano text editor.
What does it do? -Creates/modifies a custom Nginx configuration (e.g., to host a specific site).
Sample content for a website:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fos2lltgnms1x4vqs0ryp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fos2lltgnms1x4vqs0ryp.png" alt="Image description" width="786" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the server name represents the IP Public address of the instance where you install your nginx. the two servers represent the others.&lt;/p&gt;

&lt;p&gt;second step: configure your other two ec2 instances&lt;br&gt;
in the configuration of your ec2 instances, go to advanced details and enter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2120u63q5peg8a3n8o4g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2120u63q5peg8a3n8o4g.png" alt="Image description" width="412" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xe68todueke804pw8oj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0xe68todueke804pw8oj.png" alt="Image description" width="800" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, create your instance.&lt;br&gt;
third step: configure your ec2 instance’s security group&lt;br&gt;
Go to your ec2 instances and edit your inbound rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrgr5whhgsmekl1228af.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrgr5whhgsmekl1228af.png" alt="Image description" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And now you have finished.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>tutorial</category>
      <category>opensource</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
