CentOSRHEL Based

How To Install Webmin on CentOS Stream 10

Install Webmin on CentOS Stream 10

In this tutorial, we will show you how to install Webmin on CentOS Stream 10. Server administration can be challenging, especially when managing systems through command-line interfaces. Webmin offers an elegant solution to this problem by providing a comprehensive web-based administration interface for Unix and Linux systems. For those running CentOS Stream 10, the latest developmental release in the CentOS ecosystem, Webmin integration can significantly streamline server management tasks.

CentOS Stream 10, positioned as the upstream development platform for Red Hat Enterprise Linux (RHEL), brings numerous improvements and cutting-edge features to the table. By combining this powerful operating system with Webmin’s intuitive interface, system administrators can efficiently manage services, user accounts, network configurations, and various system components without extensive command-line expertise.

This guide walks through the complete process of installing Webmin on CentOS Stream 10, from initial system preparation to post-installation configuration and security hardening. Whether you’re a seasoned system administrator looking to enhance productivity or a Linux enthusiast exploring server management options, this comprehensive tutorial will equip you with the knowledge needed to successfully deploy and utilize Webmin on your CentOS Stream 10 system.

Understanding CentOS Stream 10

CentOS Stream 10, codenamed “Coughlan,” represents the next generation in the CentOS distribution lineage. Unlike its predecessors, CentOS Stream serves as the development platform positioned between Fedora and RHEL, providing a continuously delivered distro with the latest features that will eventually appear in future RHEL releases.

Released as a developmental version, CentOS Stream 10 incorporates Kernel 6.12, offering enhanced hardware support, improved performance, and better security features. The system utilizes a modular approach with three primary repositories: BaseOS (containing core operating system components), AppStream (offering additional applications and utilities), and CRB (Code Ready Builder, providing development tools and libraries).

System requirements for CentOS Stream 10 include support for the x86_64_v3 (requiring AVX2 instruction support) and ARM64 architectures. The distribution demands a minimum of 2GB RAM for basic server installations, though 4GB or more is recommended for running Webmin and other server applications efficiently. Storage requirements start at 10GB for minimal installations but increase significantly depending on your applications and services.

CentOS Stream 10 diverges from traditional CentOS by adopting a rolling release model while maintaining stability. With an expected lifecycle extending to approximately 2030, it provides a robust foundation for long-term server deployments. This extended support timeline makes it an excellent choice for Webmin installations intended to serve as central management interfaces for years to come.

What is Webmin and Why Use It

Webmin stands as one of the most powerful open-source web-based system administration tools available for Unix-like operating systems. At its core, Webmin provides a graphical interface for tasks typically performed through command-line operations, making system administration more accessible and efficient.

This versatile platform offers a modular architecture with numerous components for managing different aspects of your server. Core functionality includes user and group management, package installation, service configuration, firewall settings, and scheduled task management. Each module presents a user-friendly interface for interacting with the underlying system components without requiring direct command-line input.

The advantages of Webmin over traditional command-line administration are substantial. It reduces the learning curve for new administrators, minimizes syntax errors common in manual configuration, provides visual feedback for system states, and enables quicker execution of complex administrative tasks. The interface visually represents system states and relationships, making it easier to understand your server’s configuration at a glance.

Webmin particularly shines in mixed environments where administrators manage multiple services across different servers. Its consistent interface streamlines workflow regardless of the underlying system differences. Additionally, Webmin integrates with other tools like Usermin (for end-user self-service) and Virtualmin (for hosting service management), creating a comprehensive ecosystem for server administration.

With active development since 1997, Webmin boasts a robust community providing continuous improvements, security updates, and an extensive knowledge base. This longevity and community support ensure that your investment in learning Webmin will remain valuable throughout your server administration career.

Prerequisites for Installation

Before proceeding with Webmin installation on CentOS Stream 10, ensure your system meets all necessary requirements for a smooth deployment process:

System Requirements:

  • CentOS Stream 10 with a minimal installation
  • 1 GHz processor (multi-core recommended)
  • Minimum 2GB RAM (4GB or more recommended for production environments)
  • At least 20GB available disk space
  • Active internet connection for package downloads

Access Requirements:

  • Root access or a user account with sudo privileges
  • SSH access to the server for remote installations
  • Physical or virtual console access for troubleshooting

Network Configuration:

  • Properly configured network interface with static IP address
  • Correctly set hostname (use hostnamectl set-hostname your-server-name to configure)
  • DNS resolution functioning properly (verify with nslookup google.com)
  • Open access to TCP port 10000 (default Webmin port)

Browser Requirements for Webmin Access:

  • Modern web browser supporting TLS 1.2 or higher
  • JavaScript enabled
  • Cookies allowed for the Webmin domain

Verify your CentOS Stream 10 version by running cat /etc/centos-release or cat /etc/redhat-release to confirm you’re working with the correct distribution before proceeding. This preparation ensures your installation process will progress smoothly without unexpected compatibility issues.

Preparation Steps

Proper preparation forms the foundation for a successful Webmin installation. Follow these steps to prepare your CentOS Stream 10 system:

First, ensure your system packages are fully updated to prevent dependency conflicts and security vulnerabilities:

sudo dnf update -y

After updating, install essential dependencies required by Webmin:

sudo dnf install perl perl-Net-SSLeay openssl perl-Encode-Detect perl-Data-Dumper perl-IO-Tty perl-Time-Local -y

Webmin requires specific Perl modules for full functionality. While the above command covers the basics, you may need additional modules depending on which Webmin features you plan to use.

Next, configure your repositories to ensure access to all necessary packages:

sudo dnf install dnf-plugins-core -y
sudo dnf config-manager --enable crb

The CRB (Code Ready Builder) repository contains additional development packages that might be required by certain Webmin modules.

Before proceeding, create a backup of important configuration files that might be modified during installation:

sudo mkdir -p /root/config-backups/$(date +%F)
sudo cp -r /etc/ssh /etc/hosts /etc/hostname /etc/network* /root/config-backups/$(date +%F)/

Verify you have sufficient disk space for the installation:

df -h /

Ensure you have at least 500MB available for Webmin and its dependencies. While Webmin itself is relatively small, the full installation with all modules requires additional space.

Finally, temporarily disable SELinux to avoid potential installation issues:

sudo setenforce 0

For a permanent change, edit /etc/selinux/config and set SELINUX=permissive, though keeping SELinux enabled in enforcing mode with proper configuration is recommended for production environments.

Method 1: Installing Webmin Using Official Repository

Installing Webmin through its official repository ensures you receive properly packaged updates and can easily maintain the software throughout its lifecycle. This method represents the preferred approach for production environments.

Begin by adding the Webmin repository to your CentOS Stream 10 system:

sudo dnf install wget -y
wget https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh
chmod +x webmin-setup-repo.sh
sudo ./webmin-setup-repo.sh

This script creates the necessary repository configuration and imports the Webmin GPG key to verify package authenticity. The repository configuration file will be created at /etc/yum.repos.d/webmin.repo.

With the repository configured, update your package index:

sudo dnf makecache

Now, install Webmin using the DNF package manager:

sudo dnf install webmin -y

During installation, DNF resolves and installs all dependencies automatically. The process creates a service configuration, establishes default admin credentials, and configures the initial service parameters.

After installation completes, verify the Webmin service status:

sudo systemctl status webmin

You should see output indicating that the service is active (running). If the service isn’t running, start it manually:

sudo systemctl start webmin

To ensure Webmin starts automatically after system reboots:

sudo systemctl enable webmin

If you encounter repository-related errors during installation, verify your internet connection and DNS resolution. You might also need to check for proxy settings that could interfere with repository access:

# Test DNS resolution
nslookup download.webmin.com

# Verify repository accessibility
curl -I https://download.webmin.com/download/yum/

This installation method provides the cleanest integration with your CentOS Stream 10 system and simplifies future updates through the standard system update process.

Method 2: Manual Installation from RPM Package

When repository access is restricted or you need to install a specific Webmin version, manual installation from an RPM package provides a viable alternative. This method gives you greater control over the installation process but requires additional steps to manage updates.

First, download the latest Webmin RPM package:

wget https://github.com/webmin/webmin/releases/download/2.302/webmin-2.302-1.noarch.rpm 

Before installing the RPM package, ensure all dependencies are satisfied:

sudo dnf install perl perl-Net-SSLeay openssl perl-Encode-Detect crypto-utils perl-Data-Dumper perl-IO-Tty -y

Now install the Webmin package:

sudo dnf install ./webmin-2.302-1.noarch.rpm -y

The DNF package manager will examine the RPM file, identify any missing dependencies, and attempt to install them automatically from your configured repositories.

If the installation fails due to dependency issues, you might need to manually locate and install additional packages:

# Example: Installing a missing dependency
sudo dnf search perl-Package-Name
sudo dnf install perl-Package-Name -y

After installing Webmin, verify that the service is running:

sudo systemctl status webmin

If the service isn’t active, start it manually:

sudo systemctl start webmin
sudo systemctl enable webmin

Common issues with manual installation include missing Perl modules. If you encounter errors when accessing Webmin, check the logs for details:

tail -f /var/webmin/miniserv.error

This installation method works well for isolated environments but requires manual intervention for updates. To update Webmin in the future, you’ll need to download and install new RPM packages manually as they become available.

Post-Installation Configuration

After successfully installing Webmin, several post-installation steps are necessary to optimize your setup. Begin by ensuring the Webmin service is running and configured to start automatically:

sudo systemctl start webmin
sudo systemctl enable webmin
sudo systemctl status webmin

The status command should show the service as “active (running)” with no error messages.

By default, Webmin uses the root account for administration. For enhanced security, consider creating a dedicated Webmin administrator account:

sudo useradd -m webadmin
sudo passwd webadmin

Then grant this user administrative privileges by adding them to the wheel group:

sudo usermod -aG wheel webadmin

Next, verify and adjust the Webmin configuration file at /etc/webmin/miniserv.conf. Key settings to check include:

port=10000
listen=10000
userfile=/etc/webmin/miniserv.users
keyfile=/etc/webmin/miniserv.pem
session=1

You can modify these settings directly in the file or through the Webmin interface after login. Remember to restart the service after making configuration changes:

sudo systemctl restart webmin

Check for any error messages in the log files:

tail -f /var/webmin/miniserv.error

If you plan to use Webmin extensively, consider increasing the session timeout for convenience:

sudo sed -i 's/session_timeout=.*/session_timeout=43200/' /etc/webmin/miniserv.conf

This sets the session timeout to 12 hours instead of the default 60 minutes.

Finally, create a first-time login test to ensure everything works correctly. The default URL for accessing Webmin is https://your-server-ip:10000. Use root credentials or the dedicated administrator account created earlier to log in.

Configuring Firewall Access

Securing Webmin while ensuring accessibility requires proper firewall configuration. CentOS Stream 10 uses firewalld by default, which must be configured to allow traffic to Webmin’s interface on port 10000.

First, verify that firewalld is running:

sudo systemctl status firewalld

If it’s not active, start and enable it:

sudo systemctl start firewalld
sudo systemctl enable firewalld

Next, allow access to the Webmin port:

sudo firewall-cmd --permanent --add-port=10000/tcp
sudo firewall-cmd --reload

For enhanced security, limit access to specific IP addresses or networks:

# Replace 192.168.1.0/24 with your network address
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" port port="10000" protocol="tcp" accept'
sudo firewall-cmd --reload

If you’ve changed Webmin’s default port in the previous configuration steps, make sure to open that port instead of 10000.

To verify your firewall configuration:

sudo firewall-cmd --list-all

The output should show port 10000/tcp in the allowed ports list or your rich rules if you’ve configured IP-based restrictions.

If you’re using a cloud-based server, remember that you might need to also configure the provider’s network security groups or firewall rules to allow traffic to port 10000.

To test firewall access from a remote system:

# From another Linux machine
telnet your-server-ip 10000

# Or using netcat
nc -zv your-server-ip 10000

A successful connection indicates that your firewall is properly configured to allow Webmin traffic.

Accessing Webmin for the First Time

Once installation and firewall configuration are complete, you can access the Webmin interface through a web browser. Open your preferred browser and navigate to:

https://your-server-ip:10000

Replace “your-server-ip” with your CentOS Stream 10 server’s actual IP address or hostname.

Install Webmin on CentOS Stream 10

Upon your first connection, you’ll likely encounter a browser warning about an untrusted SSL certificate. This occurs because Webmin generates a self-signed certificate during installation. While this certificate provides encrypted communication, it isn’t validated by a trusted certificate authority. You can safely proceed by:

  1. In Chrome: Click “Advanced” and then “Proceed to [your-server-ip] (unsafe)”
  2. In Firefox: Click “Advanced” > “Accept the Risk and Continue”
  3. In Edge: Click “Details” > “Go on to the webpage”

After accepting the certificate warning, you’ll reach the login page. Enter your credentials:

  • Username: root (or the dedicated admin user created earlier)
  • Password: Your system root password or admin user password

Upon successful login, you’ll be greeted by the Webmin dashboard displaying system information and module categories. Take a moment to explore the interface and become familiar with the layout:

  • Left sidebar: Contains module categories and specific functions
  • Dashboard: Displays system statistics and status information
  • Top navigation: Provides access to global settings, themes, and logout

For first-time users, the “System” category contains essential modules for basic administration tasks. The “Webmin” category provides access to configuration options for the Webmin interface itself.

If you encounter login issues, verify that:

  • The Webmin service is running
  • You’re using the correct username and password
  • There are no firewall restrictions blocking access
  • SELinux isn’t preventing Webmin from functioning properly

Securing Your Webmin Installation

Enhancing the security of your Webmin installation is crucial for protecting your server from unauthorized access. Implement these measures to strengthen your Webmin deployment on CentOS Stream 10:

Change the default port to reduce exposure to automated scanning tools:

sudo nano /etc/webmin/miniserv.conf

Find the line port=10000 and change it to a different port number, for example:

port=9875

Save the file and restart Webmin:

sudo systemctl restart webmin

Remember to update your firewall rules to reflect this change:

sudo firewall-cmd --permanent --remove-port=10000/tcp
sudo firewall-cmd --permanent --add-port=9875/tcp
sudo firewall-cmd --reload

Next, implement SSL certificate enhancement. Instead of using the self-signed certificate, consider installing a proper SSL certificate. You can use Let’s Encrypt for a free, trusted certificate:

sudo dnf install certbot -y
sudo certbot certonly --standalone -d webmin.yourdomain.com

After obtaining certificates, configure Webmin to use them:

sudo nano /etc/webmin/miniserv.conf

Update these lines:

keyfile=/etc/letsencrypt/live/webmin.yourdomain.com/privkey.pem
certfile=/etc/letsencrypt/live/webmin.yourdomain.com/cert.pem

Enable stronger authentication methods by implementing two-factor authentication. In Webmin, navigate to Webmin > Webmin Configuration > Two-Factor Authentication and enable the option that best suits your environment.

Configure IP-based access restrictions to limit connections to trusted networks:

sudo nano /etc/webmin/miniserv.conf

Add these lines to allow access only from specific IP addresses:

allow=192.168.1.0/24
deny=ALL

Enable password complexity requirements by navigating to Webmin > Webmin Users and setting password restrictions under the “Password restrictions” tab.

Finally, implement session timeout settings for added security:

sudo nano /etc/webmin/miniserv.conf

Add or modify:

session_timeout=30

This sets an inactive session timeout of 30 minutes.

After making these security enhancements, restart Webmin:

sudo systemctl restart webmin

Regularly review Webmin’s log files at /var/webmin/miniserv.log for suspicious access attempts and consider setting up log monitoring to detect potential security incidents.

Basic Configuration and Customization

Customizing Webmin to match your preferences and workflow can significantly enhance your administration experience. Here are essential configuration options to consider:

Interface Customization:

Access the interface customization options through Webmin > Webmin Configuration > User Interface. Here you can configure:

  • Language settings: Choose from over 20 available languages
  • Theme selection: Pick from Classic, Authentic Theme, or other available themes
  • Session timeout and display options
  • Module grouping and categorization

The Authentic Theme is particularly popular, offering a modern, responsive design with additional features. Install it with:

cd /usr/libexec/webmin
sudo ./install-module.pl authentic-theme.wbt.gz

Module Management:

Customize available modules through Webmin > Webmin Configuration > Webmin Modules:

  • Disable unused modules to simplify the interface
  • Install additional modules for extended functionality
  • Configure module access permissions per user
  • Clone modules for creating specialized versions

Control which modules appear in the dashboard for quick access:

Webmin > Webmin Configuration > Webmin Modules > Dashboard modules

User and Group Management:

Create additional Webmin users with restricted permissions:

  1. Navigate to Webmin > Webmin Users
  2. Click “Create a new Webmin user”
  3. Specify username, password, and module access permissions
  4. Optionally restrict by IP address or time periods

Configure email notifications for system events:

  1. Go to Webmin > Webmin Configuration > Email Notifications
  2. Set up alerts for system events, security issues, or update notifications
  3. Configure delivery options and schedules

Custom Dashboard Layout:

The dashboard provides a quick overview of your system’s status. Customize it by:

  1. Accessing Webmin > Webmin Configuration > Webmin Dashboard
  2. Adding, removing, or reordering status monitors
  3. Configuring refresh intervals and display preferences
  4. Setting warning thresholds for monitored parameters

After making customizations, you can export your configuration for backup or deployment to other servers using Webmin > Webmin Configuration > Backup Configuration Files.

Advanced Management Features

Webmin’s power extends far beyond basic server administration, offering sophisticated management capabilities through its extensive module system. Here are some advanced features worth exploring on your CentOS Stream 10 system:

System Monitoring and Reporting:

The System and Server Status module provides comprehensive monitoring capabilities:

  • Real-time CPU, memory, and disk usage graphs
  • Process monitoring with the ability to terminate problematic processes
  • Network traffic analysis and connection tracking
  • Scheduled status reports via email

Configure automatic monitoring with threshold alerts:

  1. Navigate to System > System and Server Status
  2. Click “Create Monitor”
  3. Select the service or system parameter to monitor
  4. Define thresholds and notification settings

Backup and Restore Management:

Implement comprehensive backup strategies using the Filesystem Backup module:

Webmin > System > Filesystem Backup

Create automated backup schedules with rotation policies:

  • Define backup sources, destinations, and compression options
  • Configure retention policies and disk space management
  • Set up incremental and differential backup schemes
  • Implement encrypted backups for sensitive data

Scheduled Tasks and Automation:

The Scheduled Cron Jobs module enables sophisticated task automation:

Webmin > System > Scheduled Cron Jobs

Create complex task sequences with environmental variables, output logging, and conditional execution. Monitor job history and performance through the execution logs.

Software Package Management:

Manage your CentOS Stream 10 packages through a graphical interface:

Webmin > System > Software Packages

This module allows for:

  • Batch installation and removal of packages
  • Repository management and configuration
  • Version tracking and update management
  • Package verification and integrity checking

Firewall and Network Configuration:

The Linux Firewall module provides a comprehensive interface for managing firewalld:

Webmin > Networking > Linux Firewall

Create and manage complex firewall rules with:

  • Zone-based filtering and management
  • Service definitions and custom rule creation
  • NAT configuration and port forwarding
  • Rich rules with advanced matching criteria

For administrators managing multiple servers, Webmin’s Cluster features allow centralized management of server farms, enabling simultaneous configuration changes, package installations, and monitoring across your entire infrastructure.

Troubleshooting Common Issues

Even with careful installation and configuration, you may encounter issues with your Webmin deployment on CentOS Stream 10. Here are solutions to common problems:

Service Not Starting After Reboot:

If Webmin fails to start automatically after a system restart, check the service status:

sudo systemctl status webmin

If it’s not running, manually start it and check for errors:

sudo systemctl start webmin
journalctl -u webmin

To ensure it starts on boot:

sudo systemctl enable webmin

If issues persist, verify that runlevel targets are properly configured:

sudo systemctl get-default
sudo ln -sf /usr/lib/systemd/system/webmin.service /etc/systemd/system/multi-user.target.wants/

Login Authentication Problems:

If you can’t log in despite using correct credentials, reset the Webmin password:

/usr/libexec/webmin/changepass.pl /etc/webmin root newpassword

Check authentication settings in /etc/webmin/miniserv.conf and verify that PAM authentication is correctly configured if you’re using it.

Connection Refused Errors:

This typically indicates firewall or binding issues:

# Check if Webmin is listening on the expected port
sudo ss -tlnp | grep miniserv

# Verify firewall configuration
sudo firewall-cmd --list-all

# Check binding configuration
grep "^listen" /etc/webmin/miniserv.conf

If Webmin is configured to listen only on specific interfaces, ensure your connection requests match these settings.

SELinux-Related Issues:

SELinux can block Webmin operations. Check for denials:

sudo grep "webmin\|miniserv" /var/log/audit/audit.log

Create custom SELinux policies if needed or temporarily set SELinux to permissive mode for testing:

sudo setenforce 0

Remember to switch back to enforcing mode after troubleshooting:

sudo setenforce 1

Missing Dependencies:

If modules fail to load due to missing Perl modules:

# Install Perl module installer
sudo dnf install perl-CPAN -y

# Install required module
sudo cpan Module::Name

Browser Compatibility Problems:

If facing interface display issues:

  • Clear browser cache and cookies
  • Try an alternative browser
  • Ensure JavaScript is enabled
  • Check for browser extensions that might block content

For persistent issues, consult the logs at /var/webmin/miniserv.log and /var/webmin/miniserv.error for detailed error information.

Updating and Maintaining Webmin

Regular maintenance ensures your Webmin installation remains secure, stable, and equipped with the latest features. Here’s how to maintain your Webmin installation on CentOS Stream 10:

Updating Webmin:

If you installed Webmin via the repository method, updates are straightforward:

sudo dnf update webmin -y

For manual installations, download and install the latest package:

wget https://download.webmin.com/latest/rpm -O webmin-latest.rpm
sudo dnf install ./webmin-latest.rpm -y

You can also update through the Webmin interface:

  1. Navigate to Webmin > Webmin Configuration > Upgrade Webmin
  2. Click “Check for updates”
  3. Follow the prompts to download and install available updates

Module Management:

Keep modules updated to access new features and security patches:

Webmin > Webmin Configuration > Webmin Modules > Update Modules

Remove unused modules to reduce attack surface and improve performance:

Webmin > Webmin Configuration > Webmin Modules > Delete Modules

Configuration Backups:

Regularly back up your Webmin configuration to simplify recovery after system changes:

Webmin > Webmin Configuration > Backup Configuration Files

Create automated backup schedules for configuration files:

Webmin > System > Scheduled Cron Jobs

Add a job that executes:

/usr/libexec/webmin/backup-config.pl /backup/webmin-config.tar.gz

Performance Monitoring:

Monitor Webmin’s resource usage to ensure optimal performance:

Webmin > System > Running Processes

Look for the miniserv.pl process to check memory and CPU utilization.

Optimize performance by disabling unused modules and adjusting cache settings in /etc/webmin/miniserv.conf.

Log Management:

Implement log rotation for Webmin logs to prevent disk space issues:

sudo vi /etc/logrotate.d/webmin

Add configuration:

/var/webmin/miniserv.log {
    weekly
    rotate 4
    compress
    missingok
    notifempty
}

Periodically review logs for errors or security issues:

Webmin > System > System Logs

Security Maintenance:

Perform regular security audits on your Webmin installation:

  1. Check for users with unnecessary privileges
  2. Review access logs for suspicious activity
  3. Verify firewall rules are functioning as expected
  4. Test SSL configuration for vulnerabilities

By maintaining a regular update and maintenance schedule, you’ll ensure your Webmin installation continues to provide secure and efficient server management for your CentOS Stream 10 system.

Congratulations! You have successfully installed Webmin. Thanks for using this tutorial for installing the Webmin control panel on CentOS Stream 10 system. For additional help or useful information, we recommend you check the Webmin website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button