管理Linux不想用命令行?可以試試Webmin!最新CentOS8上體驗一下


1. 前言

在本教程中,我們將介紹如何在CentOS8或者RHEL8上安裝Webmin。Webmin是領先的基於web的開源Linux/Unix系統管理控制面板。

使用Webmin,您可以設置用戶帳戶,管理Apache web服務器,DNS服務器,samba和文件配置,電子郵件服務器,本地/遠程文件系統,軟件包管理,管理數據庫服務器等。

管理Linux不想用命令行?可以試試Webmin!最新CentOS8上體驗一下

如何在CentOS8或者RHEL8上安裝Webmin


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<[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>

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/>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/>..done
Creating start and stop/>..done
Copying config files..
..done
Creating uninstall/>..done
Changing ownership and permissions ..
..done
Running postinstall/>..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

管理Linux不想用命令行?可以試試Webmin!最新CentOS8上體驗一下

在CentOS8或RHEL8上配置webmin訪問Webmin界面


使用安裝過程中指定的用戶名及其密碼登錄

管理Linux不想用命令行?可以試試Webmin!最新CentOS8上體驗一下

使用安裝過程中指定的用戶名及其密碼登錄webmin


顯示的默認頁面是系統詳細信息的摘要

管理Linux不想用命令行?可以試試Webmin!最新CentOS8上體驗一下

顯示webmin的默認頁面是系統詳細信息的摘要


4. 總結

通過本文,您應該可以瞭解到如何在RHEL8或者CentOS8系統上安裝Webmin。通過Webmin 的web界面,您可以完成很多Linux管理工作。類似的工具是Cockpit,可以參考以下指南。

本文已同步至博客站,尊重原創,轉載時請在正文中附帶以下鏈接:


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

點擊瞭解更多,快速查看更多的技術文章列表。


分享到:


相關文章: