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

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

gudong366 2025-05-02 17:33 12 浏览


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

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

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

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

相关推荐

U盘文件被删怎么简单恢复(u盘里的文件被误删了怎么找回)

现在这个社会不是靠关系靠路子,主要还是靠实力。刘强在机关工作,人长得帅气,工作能力又强。唯独一样不好,脾气太大,动不动就发火,因为小事常和同事发生口角。一次他火大的差点把办公桌给掀翻了,领导见他野蛮的...

不小心删除了一些文件?9 个最佳免费硬盘恢复软件

恢复您曾经无意或意外删除的所有文件和数据。您是否曾经错误地删除了一个对您的工作至关重要并导致您丢失所有进度的文件?我们为您提供了一些最好的免费硬盘恢复软件,以帮助您恢复意外删除的文件,以解决您的文件删...

Studio 中文版:数据救援神器,误删 / 分区损坏 / RAID 恢复一键找回

Studio中文版:数据救援神器,误删/分区损坏/RAID恢复一键找回当文件意外删除、分区损坏,或RAID阵列崩溃时,一款可靠的数据恢复工具往往能挽回关键损失。R-Studio中文版...

你值得拥有的11款Linux数据恢复工具

如果你使用的是Linux操作系统,那么你一定想知道一旦硬盘崩溃的话又该如何保存和恢复数据。其实,现在有很多Linux数据恢复工具可以让我们摆脱数据安全的困扰。小编已经为各位准备好了一些最好的Linux...

误删文件内容怎么恢复(误删文件内容怎么恢复回来)

  在日常使用电脑的过程中,误删文件的情况时有发生。无论是由于操作失误还是病毒攻击,误删文件都会给我们带来不小的困扰。幸运的是,随着技术的发展,误删文件恢复已不再是难题。本文将介绍几款国内外知名的误删...

u盘如何恢复删除的文件?推荐5款u盘数据恢复软件!

在日常生活与工作中,U盘作为便捷的数据存储载体,频繁用于传输和保存各类重要文件。然而,误删文件的情况却时有发生,无论是珍贵的照片、重要的工作文档,还是精心制作的视频,一旦删除,都可能带来不小的麻烦。...

怎么恢复删除的数据?5种有效的数据恢复方法汇总!

在数字化办公与生活的时代,电脑里的每一份数据都承载着重要信息。然而,一个误操作就可能导致数据被删除,无论是尚未保存的重要文档,还是珍藏多年的照片,都可能瞬间“消失”。但其实,数据删除并不意味着永久丢...

u盘删除文件怎么找回?5个数据恢复工具汇总,助你巧妙恢复数据!

在日常使用U盘的过程中,误删文件的情况时有发生,重要的工作文档、珍贵的照片视频一旦消失,难免让人焦急万分。别担心,只要选对数据恢复工具,被删除的数据仍有找回的可能。下面就为你汇总5款实用的数据...

Linux下恢复误删文件:思路+实践(linux删除如何恢复)

周五篮球群里有人问误删文件了怎么恢复,得知是ext4文件系统之后我推荐了ext4magic这个工具,然后又有人提到了xfs的话怎么办,正好前几天看到DaveChinner在邮件列表里提到了这个问题,...

苹果放大招!不用虚拟机了,Mac直接跑Linux容器,开发者效率翻倍

苹果这次真给开发者送福利了!今天凌晨(6月10日),苹果在官宣的Containerization框架直接炸了技术圈——Mac现在能原生运行Linux容器镜像了!这可不是虚拟机那种“套娃”方案,而是基...

7 款老牌经典软件,值得收藏(经典老歌软件)

Calibrehttps://calibre-ebook.com/Calibre是一个电脑电子书管理软件。肯定有人说了,电子书还要管理?那当然了。它的功能更强大的让你想象不到,首先它可以导入PDF,...

神仙级的免费开源电子书阅读器,还支持听书功能

神仙级的免费开源电子书阅读器,还支持听书功能,极空间部署『KoodoReader』哈喽小伙伴们好,我是Stark-C~前段时间不是给大家分享的电子书管理工具『TaleBook』嘛~,然后就有粉丝私信...

如何在Ubuntu系统中重置root密码(ubuntu忘记密码重置root密码命令)

很多人有个问题,就是喜欢把密码设置得很长很复杂,结果谁也没防住,却成功防住了自己ヽ(.ˇдˇ;)ノ对于现代人,特别是年轻人,都有过忘记密码的经历吧。在这篇文章中,我们来了解如何在Ubuntu1...

5款功能强大的PDF阅读器,让PDF阅读更轻松

分享5款功能强大的PDF阅读器,拥有丰富的PDF阅读工具,支持PDF文档划线、笔记、标记等操作,让PDF阅读更轻松!1.嗨动PDF编辑器一款实用的PDF处理软件,不仅可以阅读PDF文档,还能直接编辑、...

上班摸鱼利器! 免费好用的电子书阅读器,NAS轻松部署Koodo Reader

哈喽,大家好我是生活爱好者。笔者也是一名小说爱好者,平时用手机用某信读书,会员也开了,在家看体验也不错,但是上班的时候,在工作快速完成之后,想摸个鱼用手机就不太方便啦,作为爱折腾的人,必须要工作认真,...