How to set up smartphones and PCs. Informational portal

webmin installation. Linux administration

There are many web server control panels, both specialized for hosting and general purpose. Today I will install one of these panels - Webmin on centos server 7. In my opinion, this is one of the most popular means. remote control server through a browser.

webmin it web panel to administer a unix server. It is cross-platform, installed on various unix distributions. I once described one of its applications in an article about freebsd. Using webmin, you can perform almost all popular administrative actions on the server, such as:

  • Set up network connections
  • Add Users
  • Mount partitions
  • Configure firewall
  • Shut down or restart the server
  • Update packages

and much more. There are modules for various software that can be controlled through webmin. For example, samba, or a web server, mysql server and many other packages. The list of modules is extensive, you can see the list of third-party custom modules on the official website, or in the panel itself after installation, the list of official modules. Through webmin, you can access the server console, upload or download files from the server. Sometimes this is convenient.

I myself almost never use this panel, there is no need, I'm used to configuring everything in the console. But I know people who actively administer servers using webmin. These were admins who were not very advanced in Linux, but nevertheless this panel allowed them to manage the server normally without proper knowledge and skills.

I almost always use webmin on mail servers. It is convenient for me to analyze and search for something in huge mail logs using the log viewer module. I have not come across anything simpler and more convenient. For example, you have a daily log of 100-300 megabytes, dozens of events are recorded in it every second. You have an email id. You can enter the id of the letter in the search bar and see all the lines of the log in which it appears. It is very convenient. Regular search is indispensable in such a situation. You can, of course, grab the output of cat, or come up with something else, but this is less convenient. Especially if you need to compare values ​​from different log files. You just open different logs in two browser windows and analyze them.

Let's start installing Webmin on a server running СentOS 7. The process is described on the official website in the appropriate section. There is nothing complicated. You need to add the webmin repository, and then install the package itself and dependencies.

Adding a repository:

# mcedit /etc/yum.repos.d/webmin.repo name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum /mirrorlist enabled=1

Import GPG key:

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

Install webmin:

# yum install -y webmin

After installation, it will automatically start. We just have to add it to autoload:

# chkconfig webmin on

We go to web interface webmin via link https://192.168.56.10:10000 , where 192.168.56.10 is the ip address of the server. Be sure to specify the https protocol, you won't be able to log in without it. Enter the root username and password. opens main page webmin:

I will not describe all the possibilities, you can climb the menu on the left yourself and see what can be configured through webmin. I draw attention to several important points. There is an opinion that webmin is not safe and the server can be hacked through it. I do not know how these fears are justified, but just in case, it is better to restrict access to the server.

If you come in with static addresses, then restrict access to these addresses only. It is done right there, in the next setting IP Access Control. I recommend this setting. Personally, I would not open webmin to the world without special need.

If you want to see a panel with the Russian language, then there is no problem. It can be selected under language. Translated as a whole is normal, everything is clear. But it is better, of course, to get used to English, without it there is nowhere in system administration. But if you don’t understand, you can also use Russian. In the end, webmin is most useful for those who do not understand servers, but need to administer something. After changing the language, you need to forcefully refresh the browser page so that the entire interface becomes Russian.

That's all, with the rest of the features and settings you can figure it out yourself, there is nothing complicated in webmin.

Online course "Linux Administrator"

If you have a desire to learn how to build and maintain highly available and reliable systems, I recommend getting acquainted with online course "Linux Administrator" in OTUS. The course is not for beginners, for admission you need basic knowledge on networks and installing Linux on a virtual machine. The training lasts 5 months, after which successful graduates of the course will be able to be interviewed by partners. Test yourself on the entrance test and see the program in more detail. |

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 ubuntu server, secure the console with a Let's Encrypt certificate, add a new one via Webmin account and update server packages.

Requirements

  • Ubuntu Server 16.04.
  • sudo access.
  • A configured firewall (you can find out about this).
  • Apache web server (installation instructions can be found).
  • FQDN and an A record pointing to the IP address of the server.

Step 1 Install Webmin

Add a Webmin repository that you can use to install and then update your console. It needs to be added to the /etc/apt/sources.list file.

sudo nano /etc/apt/sources.list

Add a new repository to the end of the file:

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

Save and close the file.

Add the Webmin PGP key so that the system knows that 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 the 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 in future work.

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

sudo ufw allow 10000

To provide additional security you can configure this port to be accessible only from specific IP address ranges.

Step 2: Adding a Trusted Let's Encrypt Certificate

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

Open in browser:

https://your_domain:10000

Replace your_domain with your domain name.

Note: The first time you access 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 will appear. 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 hostname of the server. Find the System hostname field and open the link it contains.

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, as well as update it in a timely manner. Let's Encrypt certificates are valid for 3 months. Webmin supports automatic update certificates; you can set up your console to renew your Let's Encrypt certificate monthly. The Let's Encrypt service 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 default Apache web server root directory). To set up a certificate, follow these steps:

  • Enter your FQDN in the Hostnames for certificate field.
  • On the Website root directory for validation file line, click the Other Directory button and point to /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. Within a few seconds, you will receive a confirmation screen.

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

Step 3: Using Webmin

Webmin offers many modules with which you can manage the server and perform almost everything from configuring BIND DNS server before adding users to the system. Try creating a new user and updating system packages using Webmin.

User and group management

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

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; enter the username, password, group, and other user information.

  • In Username, enter the name: deploy.
  • Select Automatic in the User ID field.
  • In Real Name, specify a description of the user (for example, Deployment user).
  • In the Home Directory, select Automatic.
  • Select /bin/bash from the Shell drop-down list.
  • In the Password field, select Normal Password and enter a password.
  • In Primary Group, select New group with same name as user.
  • In the 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's shell, home directory support, and 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 the number of updates and a link to them in this field.

Conclusion

Now you have convenient console for server management, protected by a trusted certificate. Webmin's intuitive interface provides many useful features and modules.

Familiarize yourself with Webmin's features. More useful information can be found in

Using the "Terminal" is not always convenient even for professionals. Therefore, graphical interfaces are increasingly used today - 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.

Installing Webmin is required to work in graphical interfaces instead of the terminal.

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

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

  1. Helps save time on server management.
  2. Allows you to configure networks, as well as firewalls for them.
  3. Supports backup data.
  4. Allows you to perform fine tuning OS.
  5. And it 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 both manually and using the "Webmin Configuration" block - in the graphical interface.

If you want to install Webmin for Ubuntu for commercial use, you can do it for free. The program is distributed under the 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"

Insert the following lines at the end of the file:

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

It is not always convenient to configure the system through the terminal. Many administrators prefer GUI terminal for simple tasks. It is not customary to use a full-fledged graphical interface on servers so as not to waste valuable computing resources, but web interfaces are often used for configuration.

With the help of the web interface, you can access the web server settings from anywhere where there is Internet access and you only need a browser. One such open source web interface is webmin. He is very popular among Linux users because of its simplicity and great functionality.

In most cases, to administer the server, you can do without the command line, but simply perform all the actions through the web interface. Let's take a look at what features Webmin supports:

  • Creating and deleting user accounts;
  • Configuring services and services with special modules, such as Apache or DNS;
  • Creation of user mailboxes;
  • View system usage statistics.

By default, Webmin contains more than 500 scripts that implement the connection between the web interface options and the system command shell. And additional modules can be added to all this to further expand the functionality of the program. Webmin is written entirely in Perl and, as I said, is available for free. In this article, we'll walk you through installing Webmin on Ubuntu Server 16.04.

Installing Webmin on Ubuntu Server

Before moving on to installing Webmin on Ubuntu, you need to add the official program repository to the application sources. To do this, open the /etc/apt/sources.list file and add the lines there:

sudo vi /etc/apt/sources.list

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

Then add the repository's GPG key:

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

It remains to update the package lists:

sudo apt-get update

Only now the installation of webmin ubuntu 16.04 can be done:

sudo apt-get install webmin

When the installation is complete, to allow access to the web interface from the outside, you need to open port 10000 using the firewall. To do this, run:

sudo ufw allow 10000

Setting up Webmin on Ubuntu 16.04

You can access the Webmin interface by simply typing your server address and port 10000 into address bar browser. By default, Webmin uses https, so you will need to use this protocol too. The address will look like this:

https://ip_address:10000

The browser will warn you that the SSL certificate is not trusted, this is because webmin automatically generates its own certificate after installation. And since this certificate was issued by a non-CA, the browser cannot trust it. But we know that this is our server, so we can continue.

On the next screen, you will need to enter your username and password on the server to enter the web interface. This user must have superuser authority:

This is what the main page will look like:

The first page shows general information about a system that will help you understand what system you are currently dealing with. It will also show Webmin updates if there are any.

On the left side of the screen you will find the navigation menu, through which you can access various modules Webmin and you will be able to manage the server. The Webmin section contains the settings of the Webmin program itself, other sections are responsible for other system services or parameters.

conclusions

That's it, the installation of Webmin on Ubuntu Server 16.04 is complete and now you can configure your system remotely. This can be very useful when you can't or don't want to use the terminal. If you have any questions, ask in the comments!

Unix-like operating systems have many positive sides: security, stability, some are attracted by free. But for novice admins, setting up the system can turn into a real hell. Digging in configuration files, constant reading documentation, besides, not for everyone in an understandable English language, can scare away anyone, especially those who have had time to work with Windows. And even if the system is at least a hundred times secure, errors in the configuration files can lead to serious security problems.

Developed by Jamie Cameron, Webmin (http://www.webmin.com/) is a complete front-end for system administration Unix, the use of which greatly simplifies the system management process, and the use of web technologies makes it accessible from anywhere in the world and regardless of the settings used at the time operating system. It will be useful for remote system management for those administrators who do not currently have access to a computer with installed Unix-like system, and standard network Windows tools, do not shine with a special choice necessary utilities. In this case, using any web browser that supports tables and forms (and JAVA for some modules), you can easily, in a visual form, from a local or remote computer configure user accounts, install, uninstall programs, configure Web, mail, DNS server, print server, manage databases, organize sharing files using Samba or NFS, set up a firewall, synchronize time, organize sharing access the Internet, monitor the status of services, make backups, burn a CD, access files on a remote computer, including documentation and countless other administrative tasks, which are innumerable, but require certain knowledge and skills. At the same time, Webmin will save you from syntax errors, and inaccuracies, as soon as possible, will warn of potentially dangerous actions. But this, however, does not mean that it is not necessary to know anything at all and that a smart utility will do everything by itself. It is still necessary to have some understanding of the structure of Unix, the meaning of certain utilities, the features of the operation of protocols and services. Experienced administrators should also not ignore the presence of such handy utility, because remember all the parameters in the configuration files and the subtleties of setting up services on various systems, agree quite hard.

Features of Webmin

Written in Perl version 5, Webmin has modular structure, which allows you to freely increase the required functionality, or vice versa, remove all unnecessary. It uses its own mini web server to work, which makes it independent of the presence and use of Apache or other web servers (although you can make it work through Apache as well). Open source code has only benefited the project. While Jimi Cameron was fiddling with the main code of the system, numerous developers translated the interface into more than 30 languages ​​(there is Russian) and created more than 270 modules that significantly expand the capabilities. Some of the modules are already included in the standard distribution, others are available for download separately.

I will focus only on security measures and convenience. It is quite possible that after registration you will see English interface. Though English language and is the native language of the administrator, but agree to communicate in your native language is still more pleasant. Let's go " Webmin Configuration-Language” and select from the drop-down list desired language, confirm your choice by clicking on “ Change language". Then we return to now Configuring Webmin. By default, Webmin will accept connections from all addresses, which is not always necessary and unsafe, using the “ IP Access Control” (IP Access Control) you can restrict access only from those addresses that you trust (for example, internal network), full access can only be allowed if, for example, you are going on vacation and want to be able to get to your server. Here it is possible to set as a parameter immediately a network or subnet, individual nodes by IP address or domain name. In the latter case, for insurance, check the box “ Determine IP address by name on every request". For speed, this operation can be done manually, using in the file /etc/webmin/miniserv.conf parameters allow= or deny=. The first contains a list of nodes and computers, separated by a space, that are allowed to connect, the second, on the contrary, access attempts from which will be ignored. After installation, with a positive answer to the question “Start Webmin at boot time”, Webmin will be loaded at system startup, another launch option would be to use xinetd for this purpose. To do this, add the line inetd=1 to the miniserv.conf file and remove session=1. After that in the file /etc/xinetd.conf(in some distributions like Slaskware, we first create it with the touch command /etc/xinetd.conf) :

service webmin

{

user = root

env=LANG=

port = 10000

socket_type = stream

protocol=tcp

wait = no

disable=no

type = UNLISTED

server=/usr/local/webmin-1.400/miniserv.pl

server_args = /etc/webmin/miniserv.conf

Then restart xinetd .

Now it is a high time to be engaged in users. Let's start with the module Authentication”, which allows you to enable an increase in the delay between unsuccessful attempts to enter a password for the same user and blocking access after several failed attempts on the certain time, which will make it difficult to try to guess a password on the forehead, all such actions can also be logged. For forgetful and lazy users, you can activate an option that allows you to automatically disable access after a certain period of time and here also disable the ability to remember the entered password. Next useful moduleWebmin Users” (Webmin Users) will allow you to create a user or group with certain rights to work with certain services. Here you can also convert Unix users to Webmin users with certain rights, set up user synchronization, in which newly created users automatically fall into one of the Webmin groups, set up user authentication, view work logs and terminate the user session.

Webmin can log events in standard format log files CLF (combined log format), while it has quite flexibility by registration. So going to " Configuring Webmin” — “Journal” you can specify which IP addresses and hostnames will be logged, which module and user activity will be logged, and how often the log will be cleared. Log entries will be written to a file /var/webmin/miniserv.log . In addition, when activating the option “ Record changes made to files on each action”, will also be conducted detailed records user actions to file /var/webmin/webmin.log. This log can be viewed and analyzed using the module “ Webmin activity log” (Webmin Actions Log).

Where is my command line?

Yes, where without it. If Webmin features are still not enough or you miss command line, then in the tab “ Other” (Others) there are several special points. “SSH/Telnet Login” (SSH/Telnet Login) which tries to connect to port 23 by default telnet service to change the behavior, click “Module Settings” and in the “Connection Type” line select Secure Shell, here you can also set the number of lines, another node to work with and use separate window for work. So Webmin can come in handy in order to get into their computers using SSH in places where it is not so easy to find necessary applications(even from an Internet cafe), all you have to do is run it on one of your machines. Further in the tab " Other” detected and interface to the shell “ command shell(shell)” (Command Shell) allows you to remotely execute shell commands and maintains a history of commands. The next item “User Commands” (Custom Commands) allows unprepared users to execute commands or scripts by pressing a single button. It is enough for the administrator to create a command by filling in the appropriate fields (register the command, set parameters, the user on whose behalf the command will be executed, add a description, etc.). Here, in the “Other” tab, you will also find the file manager in Fig. 4 (requires JAVA support), which will allow you to access files on a remote computer in a convenient graphical shell.

Webmin modules

The modularity of Webmin allows you to expand the functionality to right level, and on the other hand, remove the excess so that it does not hurt the eyes and does not distract from work. Some modules are available at http://www.webmin.com/third.html . First of all, I would like to note the Usermin module, also written by Jamie Cameron. Unlike Webmina, which is aimed at the administrator, Usermin is aimed at the end user, allowing you to read mail, work with GPG, have remote access to your files via Java file manager, manage cron jobs, etc. To install, just go to the “ Setting Usermin” (Usermin Configuration) and click on the “Install Usermin” button. To work with modules (usually a file with the extension .wbm, although it is possible to install and rpm packages) go to “ Webmin modules” (Webmin Modules), where you can install a new one by specifying its location on a local disk or on the Internet, remove a module by selecting it from the list, or copy a module. Copying modules allows you to have the same module with different settings, which can be put into different groups for quick access and allow access to different users.

Of the other goodies, it should be noted the possibility of change appearance(in the tab of the same name) i.e. pick colors to taste and more globally change the look, including icons, colors, backgrounds and page layout can themes. Maybe to someone it will seem like a toy, but when you have to simultaneously configure the operation of several nodes, then different design allows for less confusion.

This is how Webmin is. Easy to install and configure, useful to use, allowing administrators to focus more on the process of setting up the system, allows you to work safely and get information from those places where there is no access to the necessary utilities.

Top Related Articles