百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术文章 > 正文

管理Linux不想用命令行?可以试试Webmin!最新CentOS8上体验一下

ahcoder 2025-06-13 10:48 2 浏览


请关注本头条号,每天坚持更新原创干货技术文章。

如需学习视频,请在微信搜索公众号“智传网优”直接开始自助视频学习

1. 前言

在本教程中,我们将介绍如何在CentOS8或者RHEL8上安装Webmin。Webmin是领先的基于web的开源Linux/Unix系统管理控制面板。

使用Webmin,您可以设置用户帐户,管理Apache web服务器,DNS服务器,samba和文件配置,电子邮件服务器,本地/远程文件系统,软件包管理,管理数据库服务器等。


2. 在CentOS8或者RHEL8上安装Webmin

在本节中,我们将讨论在CentOS8或者RHEL8上安装Webmin的两种方法。

但首先,安装Perl和所需的依赖项。

sudo yum -y install @perl

2.1 在CentOS8或者RHEL8上从yum源仓库中安装Webmin

sudo tee /etc/yum.repos.d/webmin.repo<<EOF
[Webmin]
name=Webmin Distribution Neutral
baseurl=https://download.webmin.com/download/yum
enabled=1
EOF

导入软件仓库的GPG key:

sudo rpm --import http://www.webmin.com/jcameron-key.asc

然后使用yum包管理器安装webmin。

sudo dnf install webmin

按y接受安装

Webmin Distribution Neutral 2.9 MB/s | 11 MB 00:03 
Last metadata expiration check: 0:00:04 ago on Fri 04 Oct 2019 08:37:07 AM EAT.
Dependencies resolved.
===================================================================================================================================================
 Package Arch Version Repository Size
===================================================================================================================================================
Installing:
 webmin noarch 1.930-1 Webmin 22 M
Installing dependencies:
 perl-Encode-Detect x86_64 1.01-28.el8 AppStream 90 k

Transaction Summary
===================================================================================================================================================
Install 2 Packages

Total download size: 22 M
Installed size: 79 M
Is this ok [y/N]: y

要获取包版本和其他详细信息,请使用:

rpm -qi webmin 
 Name : webmin
 Version : 1.930
 Release : 1
 Architecture: noarch
 Install Date: Fri 04 Oct 2019 08:37:46 AM EAT
 Group : System/Tools
 Size : 82197335
 License : Freeware
 Signature : DSA/SHA1, Sun 18 Aug 2019 05:33:13 AM EAT, Key ID d97a3ae911f63c51
 Source RPM : webmin-1.930-1.src.rpm
 Build Date : Sun 18 Aug 2019 05:33:00 AM EAT
 Build Host : fudu2
 Relocations : (not relocatable)
 Vendor : Jamie Cameron
 Summary : A web-based administration interface for Unix systems.

2.2 方法2:手动在RHEL8或者CentOS 8上安装Webmin

我建议你用这个方法在CentOS8或者RHEL8上安装Webmin,以获得最新的Webmin安装。

访问Webmin发布页面,查看最新发布的Webmin并下载。

sudo yum -y install wget
wget http://www.webmin.com/download/webmin-current.tar.gz

解压刚刚下载的文件:

tar xvf webmin-current.tar.gz
rm -f webmin-current.tar.gz

移动到相应的目录:

sudo mv webmin* /usr/local/webmin

将工作目录更改为/usr/local/webmin/并运行Webmin安装程序脚本。

cd /usr/local/webmin/
sudo ./setup.sh

设置

  • 配置文件目录
  • 日志文件目录
  • 完整的Perl路径
  • 操作系统-类型和版本
  • Web服务器端口(默认10000)
  • 登录名(默认管理员)
  • 登录密码
  • SSL

输出类似于以下的内容:

sudo ./setup.sh

Welcome to the Webmin setup script, version 1.900 *

Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /usr/local/webmin …

Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]:
Log file directory [/var/webmin]:

Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):
Testing Perl …
Perl seems to be installed ok

For Webmin to work properly, it needs to know which operating system
type and version you are running. Please select your system type by
entering the number next to it from the list below
1) Pardus Linux 2) SmartOS 3) Sun Solaris
4) Lycoris Desktop/LX 5) Caldera OpenLinux eS 6) Caldera OpenLinux
7) Asianux Server 8) Asianux 9) Whitebox Linux
10) Tao Linux 11) CentOS Linux 12) Springdale Linux
13) Virtuozzo Linux 14) Scientific Linux 15) Gralinux
16) NeoShine Linux 17) Endian Firewall Linu 18) Oracle Enterprise Li
19) Oracle VM 20) XenServer Linux 21) CloudLinux
22) MostlyLinux 23) Cloudrouter Linux 24) Sangoma Linux
25) Redhat Enterprise Li 26) Redhat Linux Desktop 27) AlphaCore Linux
28) X/OS Linux 29) Haansoft Linux 30) cAos Linux
31) Wind River Linux 32) Amazon Linux 33) Redhat Linux
34) Fedora Linux 35) White Dwarf Linux 36) Slamd64 Linux
37) Slackware Linux 38) Xandros Linux 39) APLINUX
40) BigBlock 41) Ubuntu Linux 42) Mepis Linux
43) Devuan Linux 44) Raspbian Linux 45) Linux Mint
46) Debian Linux 47) SuSE OpenExchange Li 48) SuSE SLES Linux
49) SuSE Linux 50) United Linux 51) Corel Linux
52) TurboLinux 53) Cobalt Linux 54) Mandrake Linux Corpo
55) pclinuxos Linux 56) Mageia Linux 57) Mandrake Linux
58) Mandriva Linux 59) Mandriva Linux Enter 60) Conectiva Linux
61) ThizLinux Desktop 62) ThizServer 63) MSC Linux
64) SCI Linux 65) LinuxPPC 66) Trustix SE
67) Trustix 68) Tawie Server Linux 69) TinySofa Linux
70) Cendio LBS Linux 71) Ute Linux 72) Lanthan Linux
73) Yellow Dog Linux 74) Corvus Latinux 75) Immunix Linux
76) Gentoo Linux 77) Secure Linux 78) OpenNA Linux
79) SoL Linux 80) Coherent Technology 81) Playstation Linux
82) StartCom Linux 83) Yoper Linux 84) Caixa Magica
85) openmamba Linux 86) FreeBSD 87) DragonFly BSD
88) OpenBSD 89) NetBSD 90) BSDI
91) HP/UX 92) SGI Irix 93) DEC/Compaq OSF/1
94) IBM AIX 95) SCO UnixWare 96) SCO OpenServer
97) Mac OS X 98) Darwin 99) OpenDarwin
100) Cygwin 101) Sun Java Desktop Sys 102) Synology DSM
103) Generic Linux 104) Windows
Operating system: 25
Please enter the version of Redhat Enterprise Linux you are running
Version: 8
Operating system name: Redhat Enterprise Linux
Operating system version: 8

Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
What port to run the web server on. There must not be another
web server already using this port.
The login name required to access the web server.
The password required to access the web server.
If the webserver should use SSL (if your system supports it).
Whether to start webmin at boot time.
Web server port (default 10000):
Login name (default admin):
Login password:
Password again:
Use SSL (y/n): y
Webmin does not support being started at boot time on your system.

Creating web server config files..
..done
Creating access control file..
..done
Inserting path to perl into scripts..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Creating uninstall script /etc/webmin/uninstall.sh ..
..done
Changing ownership and permissions ..
..done
Running postinstall scripts ..
..done
Enabling background status collection ..
..done
Attempting to start Webmin mini web server..
Starting Webmin server in /usr/local/webmin
Cron 15467891196435 missing any time spec
..done

Webmin has been installed and started successfully. Use your web
browser to go to
https://rhel8.local:10000/
and login with the name and password you entered previously.
Because Webmin uses SSL for encryption only, the certificate
it uses is not signed by one of the recognized CAs such as
Verisign. When you first connect to the Webmin server, your
browser will ask you if you want to accept the certificate
presented, as it does not recognize the CA. Say yes.

3. 在CentOS8或RHEL8上配置webmin

为了能够从网络访问Webmin Web界面,您需要允许防火墙中的TCP端口10000。

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

访问Webmin界面:

现在你已经在CentOS8或者RHEL8上安装了Webmin,打开你的服务器URL或者IP地址端口10000。比如
https://192.168.122.197:10000

如果提示“Invalid Certificate”,点击Continue Anyway


使用安装过程中指定的用户名及其密码登录


显示的默认页面是系统详细信息的摘要


4. 总结

通过本文,您应该可以了解到如何在RHEL8或者CentOS8系统上安装Webmin。通过Webmin 的web界面,您可以完成很多Linux管理工作。类似的工具是Cockpit,可以参考以下指南。

本文已同步至博客站,尊重原创,转载时请在正文中附带以下链接:

https://www.linuxrumen.com/rmxx/1555.html

点击了解更多,快速查看更多的技术文章列表。

相关推荐

linux服务器--PVE(一)简介及安装(pve安装ifupdown2)

1.PVE(ProxmoxVirtualEnvironment)简介ProxmoxVirtualEnvironment基于debian,是一个完整的、开源的企业虚拟化服务器管理平台。它在一个平...

手把手教你!如何在 Linux 服务器中搭建 Sentinel 环境?

你在Linux服务器上搭建Sentinel环境时,是不是也遇到过各种报错,要么是启动失败,要么是配置后无法正常访问控制台?看着同事顺利搭建好,自己却一头雾水,别提多着急了!其实,很多互联网大厂...

Linux高性能服务器技术总结(linux高性能服务器编程怎么样)

1服务器简介服务器是提供计算服务的设备,由于服务器需要响应用户请求,因此在处理能力、稳定性、安全性、可扩展性、可管理性等方面提出了较高要求。随着虚拟化技术的进步,云服务器(ECS)已经快速的在...

从 0 到 1:使用 Ansible 自动化运维 Linux 服务器全流程

Ansible是一款强大的IT自动化工具,广泛用于服务器配置管理、软件部署和任务自动化。本文将带你从零开始,学习如何使用Ansible对Linux服务器进行自动化运维,涵盖Ansibl...

诡异!Win11 “此电脑” 莫名现 Linux 图标,啥情况?

我这电脑出了个怪事儿,“此电脑”下面莫名其妙多了个Linux的图标,可我压根儿就没装过Linux系统啊!琢磨了一下,估计是系统可选功能里那个“适用于Linux的Windows子系统”插件搞的鬼。实例系...

Linux基础运维篇:Linux 终端与 Shell 基础(第006课)

一、啥是终端?先搞懂「人和电脑对话的窗口」你可以把终端(Terminal)理解成一个「文字版的电脑操作台」。在Windows里,类似「命令提示符」或PowerShell;在Linux里,...

2025罗技大师系列智「简」大赛-罗技大师系列-MX KEYS S键盘评测

在2025罗技大师系列智「简」大赛中,MXKEYSS键盘凭借其卓越的设计与智能化体验,成为众多创作者的理想之选。本篇文章将深入评测这款键盘的核心功能、使用体验及创新亮点,帮助你了解它如何提升...

Linux编辑命令vim(linux使用vim编辑文件)

1、vi编辑器简介vim是一个全屏幕纯文本编辑器,是vi编辑器的增强版,我们主要讲解的是vim编辑器。可以利用别名让输入vi命令的时候,实际上执行vim编辑器,例如:#定义别名...

全选是ctrl加什么?全选的快捷键是什么介绍

如何高效使用「全选」快捷键(Ctrl+A/A)提升工作效率在日常电脑操作中,"全选"是最基础却至关重要的功能之一。无论您是文字工作者、程序员还是普通用户,掌握全选快捷键都能极大提升操作...

Linux命令大全(linux命令大全书)

个人博客:https://chunyu.work/文章较长,可以收藏备用常用快捷键(1)ctrl+c:停止进程(2)ctrl+l:清屏(3)善于用tab键(4)上下键:查找执行过的命令文件目录类(...

Xshell是做什么用的?Xshell使用教程分享

Xshell是一款功能强大的终端模拟器,支持SSH1,SSH2,SFTP,TELNET,RLOGIN和SERIAL。通过提供业界先进的性能,Xshell包含了其他SSH客户端无法发现的功能和优势,作为...

Java 开发者线上问题排查常用的 15 个 Linux 命令

作为Java开发者,线上环境的问题排查是日常工作的重要组成部分。熟练掌握Linux命令能大幅提升排查效率,快速定位进程异常、日志错误、性能瓶颈等核心问题。本文结合Java应用特点,整理1...

Linux的常用命令就是记不住,怎么办?

1.帮助命令1.1help命令#语法格式:命令--help#作用:查看某个命令的帮助信息#示例:#ls--help查看ls命令的帮助信息#netst...

别再乱学 Linux 了!这 5 个核心技巧,让你效率飙升 10 倍!

在Linux学习的漫漫长路上,不少人犹如在黑暗中摸索的行者,四处碰壁,学习效果却不尽如人意。你是不是也曾在海量的Linux知识面前迷失方向,感觉自己投入了大量时间,却收效甚微?其实,掌握Li...

Linux终端神器Terminator时隔1年回归,2.1.5新版发布

IT之家5月23日消息,科技媒体linuxiac今天(5月23日)发布博文,报道称Terminator在沉寂一年后,最新发布了2.1.5版本,在分割终端窗格时支持克隆SSH...