云网牛站
所在位置:首页 > Linux教程 > 在RHEL 8/CentOS 8系统上安装Webmin的两种方法

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

2019-01-07 11:55:45作者:乐时稿源:云网牛站

本文我们介绍在RHEL 8/CentOS 8系统上安装Webmin的两种方法,不管使用哪种方法,都得要安装Perl和所需的依赖项,在终端中运行sudo yum -y install @perl命令即可。

 

简介

Webmin是领先的基于Web的开源Linux/Unix系统管理控制面板,使用Webmin可以设置用户帐户,管理器Apache Web服务器,DNS服务器,samba和文件配置,电子邮件服务器,包管理,管理数据库服务器等。

 

方法1、手动在RHEL 8/CentOS 8上安装Webmin

1、我建议你使用此方法在RHEL 8/CentOS 8上安装Webmin以获取Webmin的最新版本。

访问Webmin下载页面以检查Webmin的最新版本并下载它:

sudo yum -y install wget

wget https://www.webmin.com/download/webmin-current.tar.gz

2、压缩下载的文件:

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

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

3、下面是安装的输出信息:

$ 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

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

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.

4、允许Webmin防火墙端口

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

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

sudo firewall-cmd --reload

5、访问Webmin界面

既然已在RHEL 8上安装了Webmin,请打开你的服务器URL/IP地址端口10000,例如https://192.168.122.197:10000

如果出现证书无效警告,请单击仍然继续:

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

使用安装期间指定的用户名登录及其密码:

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

显示的默认页面是系统详细信息摘要,如下图所示:

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

 

方法2、从YUM存储库在RHEL 8/CentOS 8上安装Webmin

1、将存储库内容添加到RHEL 8系统:

sudo vim /etc/yum.repos.d/webmin.repo

2、将下面代码粘贴到文件中:

[Webmin]

name=Webmin Distribution Neutral

baseurl=https://download.webmin.com/download/yum

enabled=1

3、然后导入存储库GPG密钥:

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

4、由于Webmin的当前版本不验证RHEL 8系统,因此我们可以在安装完成后更改版本:

sudo cp /etc/redhat-release /etc/redhat-release.bak

echo "CentOS Linux release 7.5.1804 (Core)" | sudo tee /etc/redhat-release

5、然后使用yum package manager安装webmin:

sudo yum -y install webmin

6、安装完成后,将/etc/redhat-release.bak移动到原始文件:

sudo mv /etc/redhat-release.bak /etc/redhat-release

7、确认:

$ cat /etc/redhat-release

Red Hat Enterprise Linux release 8.0 Beta (Ootpa)

8、要获取包版本和其他详细信息,请使用rpm -qi webmin命令:

在RHEL 8/CentOS 8系统上安装Webmin的两种方法

 

相关主题

如何在Ubuntu 18.04上安装Webmin

精选文章
热门文章