We simplify administration with Webmin. Server management via web interface using webmin in ubuntu server

|

Webmin is a modern web-based management console Linux machines. Webmin allows you to quickly change the settings of the main packages.

This guide will help you install and configure Webmin on an Ubuntu server, protect your console using a Let’s Encrypt certificate, add a new account through Webmin, and update server packages.

Requirements

  • Ubuntu 16.04 server.
  • sudo access.
  • Configured firewall (you can find out about this).
  • Apache web server (installation instructions can be found here).
  • FQDN and A record pointing to the server's IP address.

1: Install Webmin

Add a Webmin repository that allows you to install and subsequently update the console. It needs to be added to the /etc/apt/sources.list file.

sudo nano /etc/apt/sources.list

At the end of the file, add a new repository:

. . .
deb http://download.webmin.com/download/repository sarge contrib

Save and close the file.

Add a Webmin PGP key so the system knows the new repository can be trusted.

wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc

Update the package index to include the Webmin repository.

sudo apt-get update

Install Webmin:

sudo apt-get install webmin

After installation is complete you will see:

Webmin install complete. You can now login to

https://your_server_ip:10000 as root with your
root password, or as any user who can use `sudo`.

Copy this information; you will need it for further work.

Note: If you have configured the ufw firewall as required, this moment it blocks the Webmin port. To unlock it, use the command:

sudo ufw allow 10000

For added security, you can configure this port to be accessible only from certain IP address ranges.

2: Add a trusted Let's Encrypt certificate

Webmin already supports HTTPS, but for now the console uses a self-signed certificate. Replace it trusted certificate from the Let's Encrypt service.

In your browser, open:

https://your_domain:10000

Instead of your_domain, enter your domain name.

Note: The first time you click this link, you will see an "Invalid SSL" error message. This is because the server uses a self-signed certificate. Add it to the exclusion list to continue.

The authentication screen appears. Open a user account with sudo access (not root).

Once authenticated, you will see the Webmin control panel. Before you can add a trusted certificate, you must set the server hostname. Find the System hostname field and open the link provided there.

This will open the Hostname and DNS Client page. Find the Hostname field and enter the FQDN in it. Click Save.

Click Webmin in the left navigation bar, then click Webmin Configuration.

Select SSL Encryption from the list and then open the Let's Encrypt tab. You will see the Options for new SSL certificate screen.

Using this page, Webmin can obtain and install a trusted certificate, and update it promptly. Let's Encrypt certificates are valid for 3 months. Webmin supports automatic update certificates; you can configure your console to renew your Let's Encrypt certificate monthly. Let's Encrypt looks for a verification file on the server, so the Webmin console should place such a file in the /var/www/html directory (this is the root directory Apache web server default). To set up a certificate, follow these steps:

  • In the Hostnames for certificate field, enter your FQDN.
  • In the Website root directory for validation file line, click the Other Directory button and specify /var/www/html.
  • In the Months between automatic renewal line, deselect Only renew manually and enter 1 in the input field. Then click the button to the left of the input field.
  • Click Request Certificate. You will receive a confirmation screen within a few seconds.

To access the new certificate, restart Webmin. To do this, click the back arrow in the browser and the Restart Webmin button. Wait 30 seconds, refresh the page and log into your control panel. The browser will now report that the server is using a trusted certificate.

3: Using Webmin

Webmin offers many modules with which you can manage your server and perform almost any operation: from setting up a BIND DNS server to adding users to the system. Try creating a new user and updating system packages using Webmin.

Managing users and groups

Open the System tab and click the Users and Groups button. In the window that appears, you can manage system users and groups.

Create a new user (for example, deploy) with which you can deploy the application. Click Create a new user at the top of the page. This will open the Create User screen; Provide username, password, group and other user details.

  • In Username, enter the name: deploy.
  • Select Automatic in the User ID field.
  • In Real Name, specify the user description (for example, Deployment user).
  • In Home Directory, select Automatic.
  • From the Shell drop-down list, select /bin/bash.
  • In the Password field, select Normal Password and enter the password.
  • In Primary Group, select New group with same name as user.
  • In Secondary Group, select sudo from the All groups list. Then click the → button to add the group to the in groups list.
  • Click Create.

As you can see, Webmin allows you to customize the user shell, support for home directories, and much more.

Updating Packages

Webmin can update all system packages. To do this, follow the Dashboard link and find the Package updates field. If the console detects available updates, you will see in this field the number of updates and a link to them.

Conclusion

Now you have a convenient console for managing your server, protected by a trusted certificate. Intuitively clear interface Webmin provides many useful features and modules.

Explore Webmin's features for yourself. More useful information can be found in

Using the “Terminal” is not always convenient even for professionals. Therefore, today graphical interfaces are increasingly used - even for those tasks where the use of text commands leads to more quick results. A separate topic is the installation of Webmin Ubuntu - this is the ability to use a graphical web interface to manage the server.

Webmin installation is required to work in graphical interfaces instead of a terminal.

Why is this so relevant? Among technical specialists, the speed of system operation is highly valued. It is unacceptable to work with solutions that would slow down the server. Especially if the available resources are not so great. This is why complexes such as Webmin are especially valuable. Thanks to them, you can access server resources anywhere you have a computer, Internet access and a browser for work.

Webmin is a web interface that is designed for managing servers based on Unix-based systems. It is one of the simplest and most convenient solutions for solving problems this kind. Here are its advantages:

  1. Helps save time on server management.
  2. Allows you to configure networks, as well as firewalls for them.
  3. Supports data backup.
  4. Allows you to perform fine tuning OS.
  5. And has many other useful features.

Technically, Webmin consists of a simple web server, as well as numerous scripts that make working with it flexible and fast. Files with program settings can be changed either manually or using the “Webmin Configuration” block in the graphical interface.

If you want to install Webmin for Ubuntu to commercial use- you can do this completely free of charge. The program is distributed under a BSD license.

Let's move on to installation

First you need to make changes to the “sources.list” file:

"sudo nano /etc/apt/sources.list"

At the end of the file you need to insert the following lines:

"deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib"

"wget ​​http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc"

Done? Now update the list of data sources to load:

"sudo apt-get update"

Now on Ubuntu Server, installing Webmin becomes a matter of two seconds. Run the command:

"sudo apt-get install webmin"

One of the problems when moving from administration Windows environment to Linux administration is about learning the new tools at your disposal. As an administrator, you want to learn every detail of the operating system to get the most out of it. However, while you are studying, you need the current work to be completed on time. To increase your productivity on Linux, let's install a program called Webmin.

"Webmin is a web-based administration interface for Unix. With it you can configure Accounts users, Apache, DNS, file server, etc., using any browser that supports tables and forms (and Java for the file manager module). Webmin consists of a simple web server and a set of CGI programs that directly update system files, such as /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5 and do not use non-standard Perl modules."


Webmin works on virtually all *nix platforms, including Linux, AIX, HPUX, Solaris, OS X and others. It provides a web interface to many administrative tasks in Linux. It can run on any graphical browser, both locally and remotely. In order to avoid information leakage, Webmin can be additionally protected using SSL. While you're learning Linux, Webmin will save you money great amount time. Webmin can also help with boring and tedious tasks that you haven't automated yet.

Webmin is easily extendable. The author provides a development guide, and a number of third party modules. You can also develop your own custom modules, so Webmin can always be tailored to your needs.

Installing Webmin

The first step in working with Webmin is to install it. Webmin is included in several distributions, but it is easy to download from the Webmin site.

The correct installation method depends on the distribution you are using. If you are using Red Hat Linux or one of the UnitedLinux distributions (SuSE, Turbo, Connectiva, or Caldera), then you will need to download the RPM package. If you are using another distribution, you will need to refer to your distribution's documentation and Webmin installation instructions to determine the best method for you.

Let's look at installation using RPM.

First you need to check if Webmin is installed on your system. In a text terminal, type the following:

If Webmin is installed, you will see the version number:

If not, a message indicating that Webmin is not installed:

package webmin is not installed

Even if Webmin is already installed, it is likely more old version than the one available for download. In this case, you can update or reinstall the program using the following command:

rpm -Uvh webmin-1.090-1.noarch.rpm

Updating in verbose mode occurs with a progress bar displayed using # signs.

Once Webmin is installed, it starts automatically. However, Webmin is installed with SSL support disabled. SSL requires the installation of a Perl module called Net::SSLeay. Until it is installed, the only one safe way use Webmin - run it only locally. Using Webmin

Connect to Webmin through your favorite web browser. Two modules - a file manager and a telnet/ssh client - are implemented as applets and require Java installations Runtime Environment in your browser. These modules are convenient, but not critical. For all other modules none special requirements No.

To use Webmin, connect your browser to port 10000 on your system. If you are using a browser on your local system, you should use http://localhost.localdomain:10000/. This link will take you to the Webmin login page.

Webmin users are separate from operating system users. This allows you to set up users for administration using Webmin outside of the standard Unix identity scheme. However, if you have users on your system that you want to allow to use Webmin, you can add them to the Webmin user list and Webmin will authorize them through standard Unix mechanisms rather than through an internal identity scheme. Access to various modules Webmin can be configured for each user. For example, Helpdesk employees will only need access to password management, while all other employees may have access to all modules.

The root user is created automatically during the installation process with the root system password. Webmin tracks users' activities based on their login, so on a system that is administered by several people, it is better to create an administrator group with root rights and create users for everyone working on the system. Your first login must be as root.

Webmin Sections

The first page you will see is the Webmin Configuration Section. Here you can configure Webmin users, modules and view activity logs (logs). Top row icons allows you to switch between different sections of Webmin. All modules are customizable, you can rearrange them according to your needs.

The System section is associated with general operating system settings. Here you can configure file systems, users, groups, and system boot behavior. You can manage the services running on the system and control whether they are started automatically by the Bootup and Shutdown icons. These services are configured in the Servers section. Of particular interest is the "Software Packages" utility. It allows you to easily view the packages installed on your system, and also provides interfaces to the distribution's update repository and to rpmfind.net, a public RPM repository on the Internet.

The Servers section contains configuration modules various services, which may be running on your system. Utilities for configuring BIND and DHCP are very convenient. It is also very easy to use the utility to configure Samba - file and print servers for Windows and other clients. Webmin will also save you from setup problems SMTP servers Sendmail, which is notorious for having a complex configuration file.

The Networking section allows you to configure network hardware, as well as a number complex functions network management, such as firewalling (internetwork). All utilities work with standard configuration files, so everything you do in Webmin will appear on the command line.

The Hardware section is intended for configuration physical devices, mainly printers and storage devices. The Logical Volume Management (LVM) utility is especially interesting because it allows you to visually manage dynamic volumes on your Linux system.

The Cluster section contains utilities that you can use if you are clustering your system. In this context, cluster is a collection connected systems, for which it is necessary to synchronize their settings. Systems can sync users, groups, packages and more with tracking system failures. These utilities will allow you to configure powerful, fault-tolerant systems, as well as systems for which synchronization is important. Clustering is a fairly complex topic and may require installation of packages that are not included in your distribution.

The Others section contains a variety of utilities that you may find useful. "SSH/Telnet Login" and " File Manager" are implemented as applets and cannot be launched unless the browser has the JRE installed. The "Perl Modules" utility is useful for serving Perl modules, and allows you to connect directly to CPAN in . "File Manager" provides access to file system server with an Explorer-like interface and allows you to move and copy files without moving them through your workstation's memory (if you're working remotely). "SSH/Telnet Login" is a utility that allows you to access the console of a remote machine through your browser.

Summary

Webmin is a web application written in Perl for administration. Webmin is extensible and available besides Linux and for other *nix-like systems operating systems. Once Webmin is installed, it can be accessed on a special port (usually 10000), both locally and remote browser. It provides a point-and-click interface to a variety of administrative tasks in Linux, including user management, network firewall management, and network device configuration.

Webmin is free (both to install and use) and is great for managing a running Linux environment while you're migrating from graphic utilities Windows. Webmin modules are an external interface to console utilities, so the configuration process is the same and administration can be safely performed by both sets of utilities.

Leave your comment!

Typically a Linux server is configured using command line. However, there is another perhaps more easy access using the webmin service in ubuntu server. The best tool For driving unix systems via the web interface.

Using webmin, you can not only conveniently view logs, make changes to the configuration of installed services, but also install packages, remove them, update the system, etc. Even access the terminal!

Webmin is a ready-made web server with a whole bunch of scripts. All the delights of using it can be experienced after installation.

Installing Webmin

First of all, you need to add the webmin repositories to the /etc/apt/sources.list file

Sudo nano /etc/apt/sources.list

At the very end of the file add two lines:

Deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Save and close the file. Now let's import the keys

Wget http://www.webmin.com/jcameron-key.asc sudo apt-key add jcameron-key.asc

Update the list of package sources

Sudo apt-get update

install webmin

Sudo apt-get install webmin

Launching Webmin

After successfully installing the package, open your browser and go to

https://server-ip-address:10000/

instead of " server-ip-address” Enter either the server's IP address or its name. If you did everything correctly, you will see a prompt to enter your username and password.

Enter your server login and password in the fields, after which you will be taken to the webmin main page

The first thing we will do is change the language to Russian. To do this, go to the menu item “ Webmin” - “Change Language and Theme” and set the encoding Russian (RU.UTF-8)

After applying the changes, you need to refresh the page. Great! Now you have a completely Russified webmin


A little review of webmin

I won’t describe all the menu items, take a look for yourself and find a lot of interesting things for yourself. I focus on the most basic points.

The “Webmin” section provides tools for working with the webmin module itself. Setting up users, accesses, Reserve copy etc.

The “System” section provides tools for working with the main functionality of the server. In this section you can find logs, carry out operations with users and groups, update software, manage active processes, work with job scheduling (Cron) and much more.

The “Services” section provides links to tools for working with installed services, in my case DHCP Server, DNS BIND Server, Squid Proxy Server. You can both configure existing settings files and manage new rules and service processes.

In the “Network” section you can configure network interfaces, and also configure the firewall

In the “Equipment” section you can view the equipment connected to the server, as well as view the partitions of local disks.

I will not describe the “Cluster” section. Didn't work with clusters.

Now you can configure webmin in ubuntu server and use it from anywhere in the world.

The previous article discussed the use of a graphical shell to optimize work with the server under Linux control. But what to do if its use for one reason or another is not advisable? Perform work in the console?

Fortunately for Linux there is another alternative - a web interface.

Especially for Linux administration Webmin application was developed. It represents simple web a server and a set of scripts in Perl, which provide the functionality of the web interface.

InstallationWebmin

There is no information about the repository for installing Webmin on the system initially. Therefore, it must be added first.

To do this, you need to open the file /etc/apt/sources.list and add at the end of it next line:

deb http://download.webmin.com/download/repository sarge contrib

Now you can start the Webmin installation using the command:

apt-get install webmin

apt - get install webmin

After installation, Webmin automatically starts. The login page is available at the server address via port 10000 ( server_address:10000)

Login to the system using credentials local user, which has administrative privileges.

Work withWebmin

After logging in, we get to the Webmin start page.

This page contains brief information system information (Webmin version, processor type, memory used, used disk space, etc.) and the main menu (located on the left).

Webmin is quite complicated software with many modules and functions and, even with all the desire, working with it cannot be fully described in one article. Therefore, we will briefly dwell only on the main details.

The main menu consists of several sections:

  • Webmin
    Settings directly from Webmin;
  • System
    System information and system settings(user, processes, services, etc.);
  • Servers
    Control installed servers(web servers, database servers, etc.)
  • Others
    Administration tools not included in other sections (file manager, console window, etc.);
  • Networking
    Network settings;
  • Hardware
    Hardware Management ( system time, disk management, printer management, etc.);
  • Cluster
    Management of several servers united in a cluster. Webmin is installed on only one of them. Work with the rest is carried out using the RPC protocol;
  • Un-usedmodules
    Unused Webmin modules. Modules that have been installed, but are not available on the server for them to work necessary components. If these components are subsequently installed, in order to connect the necessary modules, it is necessary to update the modules (“Refresh Modules”);
  • Search
    Webmin internal search;
  • ViewModule'sLogs
    Webmin module change logs;
  • SystemInformation
    Brief information about the system. Is home page y when logging in.
  • RefreshModules
    Updating Webmin modules. Changes will only take effect after you log out and log in again;
  • Logout
    Sign Out.

When opening file manager The root directory of the file system is displayed. Using hyperlinks, you can go to certain folders and open or download files to your computer.

The screenshot below shows the "Documents" directory in home directory one of the users.

This file manager allows you to perform only simple operations. Creating directories and text files, editing text files, creating archives, unpacking archives (if available, for example, unzip), uploading files from a computer to a server and vice versa.

It is also worth noting the ability to change the owners of files and folders and access rights to them using the file manager interface.

This is especially true when you consider that files and folders are created with a default owner of root:root and permissions of 755 and 644, respectively.

Of course, from a safety point of view, you should not give full access to everyone who wants it. But, using the default owner can also cause various problems. For example, in the absence of web server write rights, in the directory with the site, many web applications may not work correctly or not work at all.

Therefore, the file system access strategy must be properly thought out.

Working with the console

To work with the console, use the “Text Login” page in the “Others” section.

The black field exactly imitates the operation of the Linux console. Therefore, if you need access to a regular console, Webmin provides this option.

Using the “Open in separate window...” button, you can open the “console” in a separate browser window.

Work with

The module for working with Apache is available in the “Servers” section of the main menu via the “Apache Webserver” link.

On the module's start page you can see a list of all available virtual hosts.

When you click on the icon next to the host name, its settings page will open.

In essence, this is nothing more than a web interface for working with host configuration files. With it, you can configure all its parameters, including redirections (redirects), error tracking, resource limits (well known to users of shared hosting), etc.

If desired, you can also edit the host configuration file manually (“Edit Directives”).

The “Create virtual host” tab is used to create a new virtual host and contains basic settings.

Once the virtual host is created, it will appear in general list on home page module and it will be possible to fine-tune it.

The "Global configuration" tab contains General settings Apache.

In particular, you can edit configuration files server (“Edit Config Files”), change the user name and group that are used to operate Apache (“User and Group”), connect or disconnect additional modules Apache (“Configure Apache Modules”).

Work with MySQL

The module for working with Apache is available in the “Servers” section of the main menu via the “MySQL Database Server” link.

The module interface is intuitive.

On the main page you can configure Common parameters MySQL or create or delete a database.

When you click on the database icon, a page with a list of its elements will open.

The built-in visual editor allows you to create tables and views.

If necessary, you can also perform an arbitrary SQL query(“Execute SQL” button).

The query can be written manually, or it can be loaded from a SQL script. This allows you to easily restore your database from a backup.

The ability to create backup copies is also supported.

The backup copy is saved in the SQL script, but the file name along with the extension must be specified explicitly.

In general, the module for working with MySQL is not much inferior in its capabilities to phpMyAdmin. Therefore, when working with Webmin, in most cases you can even abandon this application.

Webmin

If necessary, Webmin can be easily Russified.

In order to change the interface language in Webmin, you need to follow the “Change Language and Theme” link. Then set the “Webmin UI language” switch to the “Personal choice” position and select “Russian (RU.UTF-8)” from the drop-down list.

After clicking the “Make changes” button, the changes will take effect, but they will be visually displayed only after full reboot pages.

It is also worth noting that not all components support the Russian language. At least the full one.

For example, the module for working with MySQL is only partially Russified.

Summary

The Webmin application not only allows you to perform general administration tasks for servers running Linux, but can also replace whole line programs.

However, its functionality is significantly limited by the capabilities of those modules that are installed in the system.

In addition, Webmin is significantly inferior to conventional graphical shells not only in terms of extensibility, but also functionality. Still, the web interface remains a web interface. But, if in the case of a graphical shell for remote administration you need to install additional VNC or RDP server and the corresponding client on the administrator’s computer, then Webmin does not require anything other than a browser.

Thanks to this, coupled with its functionality and ease of installation, the Webmin application has gained wide popularity.

Webmin is not an exclusive alternative to graphical shells and can even work in parallel with them. Choosing a specific environment for working with a server is more a matter of convenience and specific working circumstances.