### Setup Webmin Repository Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Automates the setup of Webmin repositories for RHEL and Debian-based systems, enabling easy installation and upgrades via package managers. ```bash curl -o webmin-setup-repo.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh sh webmin-setup-repo.sh ``` -------------------------------- ### Install Webmin from Source (Linux/FreeBSD) Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Details the process of installing Webmin from a source tarball on Linux or FreeBSD, including uncompressing, navigating, and running the setup script. ```bash # Change directory cd /tmp # Uncompress gunzip webmin-current.tar.gz tar xf webmin-current.tar.gz cd webmin-current # Install ./setup.sh /usr/local/webmin ``` -------------------------------- ### Install Usermin from Source Source: https://github.com/webmin/webmin.com/blob/main/content/usermin.md Installs Usermin from source code on FreeBSD and other Linux distributions. This involves downloading, uncompressing, and running the setup script. ```bash # Change directory cd /tmp # Uncompress gunzip usermin-current.tar.gz tar xf usermin-current.tar.gz cd usermin-current # Install ./setup.sh /usr/local/usermin ``` -------------------------------- ### Install Foobar Webserver Module Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md Steps to install a demo Webmin module for the Foobar Webserver from a URL. This involves navigating the Webmin interface and providing the module's download URL. ```text Login to Webmin as _root_ and go to **Webmin** ⇾ **Webmin Configuration** ⇾ **Webmin Modules** Select the **From HTTP or FTP URL** option and enter the URL `http://download.webmin.com/download/modules/foobar.wbm.gz` into the adjacent text box Click the **Install Module** button ``` -------------------------------- ### Webmin module.info File Example Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md An example of a `module.info` file, which contains meta-information about a Webmin module. It includes the module's description, supported operating systems, and category. ```text desc=Foo Web Server os_support=*-linux category=servers ``` -------------------------------- ### Virtualmin Automated Installation Script Source: https://github.com/webmin/webmin.com/blob/main/content/virtualmin.md This script automates the setup and installation of Virtualmin by configuring the package manager and downloading necessary packages and dependencies. ```bash curl -o virtualmin-install.sh https://software.virtualmin.com/gpl/scripts/virtualmin-install.sh sh virtualmin-install.sh ``` -------------------------------- ### Setup Usermin Repository Source: https://github.com/webmin/webmin.com/blob/main/content/usermin.md This script automates the setup of Usermin repositories for RHEL and Debian-based systems, enabling easy installation and upgrades of the 'usermin' package. It configures the system to fetch the latest Usermin versions and GPG keys. ```bash curl -o usermin-setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh usermin-setup-repos.sh ``` -------------------------------- ### Webmin Installation Script Source: https://github.com/webmin/webmin.com/blob/main/content/faq.md Instructions on how to execute the Webmin setup script after extracting the archive. It emphasizes the need to navigate to the directory and use the correct execution path. ```bash cd webmin-current ./setup.sh ``` -------------------------------- ### Cloudmin Installation - Xen Setup Source: https://github.com/webmin/webmin.com/blob/main/content/cloudmin.md This describes the Xen installation process for Cloudmin. The Xen install script is responsible for downloading and setting up a Xen-capable kernel on the system. It then registers this system as a Xen host within Cloudmin. If the system is not already running a Xen kernel, a reboot is necessary before Xen instances can be created. ```English The Xen install script should download and setup a Xen-capable kernel on the system you run it on, and then register that system as a Xen host within Cloudmin. If you aren't already running a Xen kernel you will need to reboot the system before Xen instances can be created. ``` -------------------------------- ### Webmin Overlay Theme Installation Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-overlay-themes.md Instructions for installing an example overlay theme in Webmin to demonstrate theme customization. This involves downloading a theme archive and selecting it within the Webmin Themes configuration. ```APIDOC 1. Login to Webmin. 2. Navigate to **Webmin** ⇾ **Webmin Configuration** ⇾ **Webmin Themes**. 3. Click on **Install theme**. 4. Enter the URL: `http://download.webmin.com/download/modules/overlay-theme.wbt.gz` 5. After installation, go to the **Change overlay** tab on the **Webmin Themes** page. 6. Select the **CSS Overlay Demo Theme**. 7. Click the **Change** button. ``` -------------------------------- ### Usermin Manual Installation Source: https://github.com/webmin/webmin.com/blob/main/content/changelog/webmin-2.300-and-usermin-2.200-released.md Fixes the manual installation process for Usermin using the setup script. ```text * Fix Usermin manual installation using setup script ``` -------------------------------- ### Install Webmin (RHEL Derivatives) Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Installs the Webmin package on Red Hat Enterprise Linux and its derivatives using the DNF package manager after repository setup. ```bash dnf install webmin ``` -------------------------------- ### Webmin Module Configuration File Example Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md An example of a Webmin module's configuration file, specifying parameters like configuration file paths and sorting modes. This file is typically copied to the Webmin configuration directory. ```text foobar_conf=/etc/foobar.conf sort_mode=0 ``` -------------------------------- ### Example useradmin_update.pl Script Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md An example Perl script demonstrating how to implement the user creation callback to read and write user information to a file. ```perl do 'foobar-lib.pl'; sub useradmin_create_user { my ($user) = @_; my $lref = &read_file_lines($users_file); push(@$lref, "$user->{'user'}:$user->{'pass'}"); &flush_file_lines($users_file); } ``` -------------------------------- ### Webmin BIND DNS Initial Configuration Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/bind-dns-server.md Guides users through the initial setup of BIND DNS configuration files using Webmin, including downloading root name server lists. ```APIDOC Webmin BIND DNS Server Module: Initialize Configuration: - Allow Webmin to initialize configuration. - Download root name server list. - Option to use included root name server list if not connected to the network. ``` -------------------------------- ### Install Webmin on Solaris Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Provides steps for installing Webmin on Solaris systems, including uncompressing the package and using `pkgadd`. ```bash # The root user be switched from a role account to a normal account to logins to work rolemod -K type=normal root # Uncompress gunzip webmin-current.pkg.gz # Install pkgadd -d webmin-current.pkg ``` -------------------------------- ### Install Usermin Source: https://github.com/webmin/webmin.com/blob/main/content/usermin.md Instructions for installing Usermin on different Linux distributions after setting up the repository. For RHEL derivatives, 'dnf install usermin' is used, while for Debian derivatives, 'apt-get install usermin --install-recommends' is the command. ```bash dnf install usermin ``` ```bash apt-get install usermin --install-recommends ``` -------------------------------- ### Install Webmin from RPM Package Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Installs Webmin on RHEL-based systems by directly installing a downloaded RPM package. ```bash dnf install ./webmin-current.rpm ``` -------------------------------- ### PostgreSQL Server Management with Webmin Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/postgresql-database-server.md This section details the Webmin module for managing PostgreSQL databases. It covers initial setup, connection issues, and error handling, providing guidance on starting the server, logging in, and resolving configuration problems. ```English If the message PostgreSQL is not running on your system appears, you will need to start the database server before this module can be used to manage it. Just click the **Start PostgreSQL Server** button at the bottom of the page. If you want it to be started at boot time from now on, use the Bootup and Shutdown module (covered on [Bootup and Shutdown](/docs/modules/bootup-and-shutdown)) to create a new action to start it. If PostgreSQL is running by Webmin does not know the administration username and password needed to connect to it, and **PostgreSQL Login** form will be displayed on the main page. You must enter valid login details for your database server, typically for the postgres user who has full access to all databases and features. Logging in as some other less privileges user may work at first, but you will not be able to use all of the features of the module. Sometimes PostgreSQL is set up to authenticate users by their Unix username, rather than by a separate login and password (the ident authentication mode). If this is the case on your system, you will need to check the **Connect as same Unix user?** box on the form. If an error message like The PostgreSQL host configuration file **hba.conf** was not found appears, then either the module's configuration is incorrect or your server has not yet been initialised for the first time. Many packaged versions for Linux systems need to be initialised before they can be used, usually by running the initdb command. If the module knows how to do this on your system, an **Initialize Database** button will be displayed that you can click on to set up the server for the first time. The error message The PostgreSQL client program `psql was not found on your system` indicates that PostgreSQL is not installed at all, or that it is in a different directory to the one Webmin expects. On Linux and FreeBSD systems, the module assumes that you have installed the packages for the database included with your distribution, while on other operating systems it assumes that a standard installation from the source code into `/usr/local/pgsql` was done. If you have installed it and that error message still appears, you will need to read the *Configuring the PostgreSQL Database Server module* section for details on how to adjust the paths that the module uses. ``` -------------------------------- ### Install Webmin from DEB Package Source: https://github.com/webmin/webmin.com/blob/main/content/download.md Installs Webmin on Debian-based systems by directly installing a downloaded DEB package, including recommended dependencies. ```bash apt-get install --install-recommends ./webmin-current.deb ``` -------------------------------- ### Webmin Module Library Example (perl) Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md An example of a Webmin module library file (`-lib.pl`). This file contains common functions that CGI programs within the module will call, including initialization of the Webmin environment and custom functions for managing module-specific configurations. ```perl =head1 foobar-lib.pl Functions for managing the Foobar webserver configuration file. foreign_require("foobar"); my @sites = foobar::list_foobar_websites() =cut BEGIN { push(@INC, ".."); }; use WebminCore; init_config(); =head2 get_foobar_config() Returns the Foobar Webserver configuration as a list of hash references with name and value keys. =cut sub get_foobar_config { my $lref = &read_file_lines($config{'foobar_conf'}); my @rv; my $lnum = 0; foreach my $line (@$lref) { my ($n, $v) = split(/\s+/, $line, 2); if ($n) { push(@rv, { 'name' => $n, 'value' => $v, 'line' => $lnum }); } $lnum++; } return @rv; } ``` -------------------------------- ### Webmin CGI Script Example Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md A Perl CGI script demonstrating the use of Webmin UI functions for generating headers, displaying text with placeholders, and creating footers. It includes requirements for Webmin libraries and configuration. ```perl #!/usr/bin/perl require 'foobar-lib.pl'; ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); $conf = get_foobar_config(); $dir = find($conf, "root"); print &text('index_root', $dir),"
\n";
ui_print_footer("/", $text{'index'});
```
--------------------------------
### Webmin Module Packaging (Bash)
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md
Provides a command-line example using `tar` to package a Webmin module directory into a compressed archive. This is a standard method for distributing Webmin modules, with specific file extensions indicating the content type (module, theme, Usermin module).
```Bash
cd /usr/libexec/webmin
tar cvzf /tmp/foomod.wbm.gz foobar
```
--------------------------------
### Configure PPP Options for Server
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/ppp-dialin-server.md
Details on setting global PPP options in Webmin. This includes enabling automatic PPP detection, defining local and remote IP addresses, and configuring control line modes.
```APIDOC
PPP Options:
Automatically detect PPP connections on serial ports?: 'Yes' to enable automatic pppd execution.
PPP IP Address:
Local IP: Server's IP address for the connection.
Remote IP: Client's IP address for the connection.
Create proxy ARP entry?: Enable to assign client an IP within the local LAN range.
Control lines mode: 'Local' for null-modem, 'Modem' for actual modems.
```
--------------------------------
### Webmin Configuration File Translation
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md
Provides an example of a translated `config.info` file for German, showing how to define configuration options with translated labels and values.
```Perl
users_file=Die Benutzer-Datei,8
```
```Perl
groups_file=Gruppen-Datei,8
```
```Perl
show_groups=Details anzeigen Gruppe?,1,1-Ja,0-Nein
```
--------------------------------
### Webmin Two-Factor Authentication Setup
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/webmin-configuration.md
Guides users through enabling and configuring two-factor authentication in Webmin. This involves selecting a provider, entering necessary details, and enrolling users for the additional security layer.
```APIDOC
Enable Two-Factor Authentication:
1. Navigate to the 'Webmin Configuration' module.
2. Select 'Two-Factor Authentication'.
3. Choose an authentication provider (e.g., Authy, Google Authenticator).
4. Enter provider-specific details (e.g., API key for Authy).
5. Click 'Save'.
Enroll User for Two-Factor Authentication:
1. Navigate to the 'Webmin Users' module.
2. Click the 'Two-Factor Authentication' button for the desired user.
3. Provide provider-specific information:
- Authy: Email address and cellphone number linked to an Authy account.
- Google Authenticator: Existing TOTP secret or allow Webmin to generate one.
4. Click 'Enroll For Two-Factor Authentication'.
5. For Google Authenticator, a QR code will be displayed for app scanning.
Verification:
- Log in using an incognito tab or different browser.
- The login page will prompt for a two-factor token (6-7 digit number from authenticator app/device) in addition to username and password.
```
--------------------------------
### Install Webmin
Source: https://github.com/webmin/webmin.com/blob/main/content/cloudmin.md
Executes the downloaded Webmin installation script on a Linux system.
```shell
sh cloudmin-install.sh
```
--------------------------------
### Install Webmin (Debian Derivatives)
Source: https://github.com/webmin/webmin.com/blob/main/content/download.md
Installs the Webmin package on Debian and its derivatives using the APT package manager, including recommended dependencies.
```bash
apt-get install webmin --install-recommends
```
--------------------------------
### Configure mgetty and pppd for Dial-in Server
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/ppp-dialin-server.md
This section describes the process of setting up a Linux system with an attached modem as a dial-in server using the point to point protocol (PPP). It involves configuring `mgetty` to answer calls and `pppd` to handle PPP sessions, authentication, and IP address assignment.
```APIDOC
PPP Dialin Server Module:
- Configures mgetty and pppd for dial-in service.
- Supports Linux and Solaris systems.
- Main page displays icons for:
- Serial Port Configuration
- Caller ID Access
- PPP Options
- PPP Accounts
Dependencies:
- mgetty: For modem communication and answering calls.
- pppd: For establishing PPP sessions, authentication, and IP assignment.
Configuration Notes:
- mgetty entries are added to /etc/inittab for boot-time execution.
- Solaris serial port device files differ from Linux (e.g., /dev/term/a vs /dev/ttyS0).
Functionality:
- mgetty: Answers phone, displays login prompt, runs pppd for PPP sessions.
- pppd: Creates PPP network interface, authenticates client, assigns IP, handles PPP data transfer.
Limitations:
- Module currently only supports Linux and Solaris.
- Requires mgetty and pppd to be installed.
```
--------------------------------
### Install CSF Webmin Module
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Third Party Modules/configserver-security-and-firewall.md
Instructions for installing the ConfigServer Security & Firewall Webmin module through the Webmin interface after the core CSF package is installed.
```APIDOC
Navigate to Webmin ⇾ Webmin Configuration ⇾ Webmin Modules.
Select the 'From local file' option.
Choose '/usr/local/csf/csfwebmin.tgz' file.
Click 'Install Module'.
```
--------------------------------
### Webmin Module Installation via Command Line
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/webmin-configuration.md
Installs a Webmin module from a .wbm or .wbt file using the `install-module.pl` script. The script is typically located in the Webmin installation directory.
```bash
install-module.pl /path/to/your/module.wbm
```
--------------------------------
### Perl Module Installation Actions
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Modules/perl-modules.md
Describes the different actions that can be performed during Perl module installation via Webmin, including building, testing, and installing the module.
```APIDOC
Install action:
- Make only: Extracts the file, generates Makefile (perl Makefile.PL), and runs make. Does not install.
- Make and test: Like 'Make only', but also runs 'make test' to verify compilation.
- Make and install: Extracts, builds, and runs 'make install' to copy compiled files to Perl directories.
- Make, test and install: Like 'Make and install', but runs 'make test' before installation. This is the default.
```
--------------------------------
### Webmin Module Post-Installation Script
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/creating-modules.md
Modules can define a `postinstall.pl` file containing a `module_install` Perl function. This function is executed after a module is successfully installed, allowing for setup tasks like copying configuration files. It can utilize Webmin's common functions library.
```perl
require 'foobar-lib.pl';
sub module_install
{
if (!-r "$config_directory/somefile") {
copy_source_dest("$module_root_directory/somefile", "$config_directory/somefile");
}
}
```
--------------------------------
### Perl Installation from Source
Source: https://github.com/webmin/webmin.com/blob/main/content/faq.md
Guidance on installing Perl by downloading and compiling the source code, typically for systems where Perl is not pre-installed.
```text
Download and compile the latest Perl from source (e.g., http://www.cpan.org/src/stable.tar.gz).
```
--------------------------------
### Get Webmin Installation Type
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/API/Module/webmin.md
Returns the package type used to install Webmin (e.g., 'rpm', 'deb', 'solaris-pkg'). Returns `undef` if installed from a tarball.
```APIDOC
get_install_type
Returns the package type Webmin was installed form (_rpm_, _deb_, _solaris-pkg_ or `undef` for _tar.gz_).
```
--------------------------------
### Get Module Installation Type
Source: https://github.com/webmin/webmin.com/blob/main/content/docs/Development/API/Module/webmin.md
Determines the installation method for a given module directory (e.g., 'rpm'). Returns `undef` if the module was installed from a `.wbm` archive.
```APIDOC
get_module_install_type(dir)
Returns the installation method used for some module (such as _rpm_), or `undef` if it was installed from a _wbm_.
```
--------------------------------
### Access Webmin Interface
Source: https://github.com/webmin/webmin.com/blob/main/content/download.md
Instructions on how to access the Webmin web interface through a browser, emphasizing the default port and firewall considerations.
```text
https://