We Would Love To Hear You! +880 1621 222 111
11 Feb 2018

Virtualmin – Manual installation

Hello Everyone! Assume you have just received brand new Tomattos Dediacted or VPS root access or just reinstalled your server freshly, you might want to install the robust control panel Virtualmin. Virtualmin is the second most widely used and #1 open source server control panel. You might find it handy and want to use it for your server.

Virtualmin

Virtualmin, worlds #1 open source server control panel by popularity!

Just quick check your server minimum requirements along with compatible linux distribution. By default all our dedicated server and vps are perfectly compatible with virtualmin.

Recommended System Specifications:
Automated installation requires a freshly installed, supported OS.
1 GB RAM (less for the –minimal installation), more is better
1 GB free disk space, more for your domain data

We will now discuss about the manual installation of Virtualmin.

 

 

 

 

Manual Installation

 

Unlike the Automated Virtualmin Installation, to make use of this installation type, your OS does not need to be freshly installed, nor does it need to be a supported operating system. This method, however, requires significantly more knowledge on the part of the person doing the installation, and a much larger time investment to insure that all necessary configuration is performed and all Virtualmin managed services are working correctly.

If you are not extremely comfortable with your operating system, the services used in a hosting system, and performing various configuration tasks from the command line, you are advised to use the automatic installation on a Grade A supported operating system.

Partitioning
The partitions on your Virtualmin server should be allocated in one of the the following two ways, depending on your requirements and preference. Either partition scheme is supported by the Virtualmin Professional Installer. Other partition layouts may lead to incorrect configuration of filesystem quotas, but can be corrected after installation is completed if other partitioning schemes are preferred.

One Partition
In this partition layout, you will only have one system partition plus a swap partition and /boot partition. The system partition contains /home for users, /var for logs and databases, as well as all of the normal system executable files, documentation and libraries. It is often simpler to deploy. Traditionally, “one big partition” was considered problematic from an administration standpoint, but most such issues have been resolved by modern filesystems, backup utilities, and improved hardware reliability.

swap: The swap partition should be at least twice the size of RAM on the system.

/boot: The /boot partition should be large enough to accomodate a few system kernels and initrd images. Your OS vendor probably knows best what size this should be.

/: The remainder of the disk(s) should be devoted to /. This is where all system and user data will go.

Note If you plan to use disk quotas, you should be aware of a few potential gotchas with this type of deployment. Quotas apply to all files on a given partition, regardless of the directory. In the case of mail delivery and processing, there are several very sneaky ways for this to cause failures of various types. Because of this, if you are using disk quotas, you probably want to make /home its own very large partition.

Multiple Partitions
This layout spreads files across a few partitions, in order to facilitate usage some types of backup utility as well as making some types of administrative task easier (for example, installing larger disks for some partitions at a later time). Historically, multiple partitions were considered wise administrative policy, but most modern systems and backup utilities eliminate the reasons for utilizing multiple partitions.

/: This partition is used for all of the operating system files, executables, and configuration files. This partition should be at least 3.5 GB for most operating systems.

/boot: The /boot partition should be large enough to accommodate a few system kernels and initrd images. Your OS vendor probably knows best what size this should be.

swap: The swap partition should be at least twice the size of RAM on the system.

/var: The /var partition is where system logs, various changing data, and MySQL and PostgreSQL databases are stored. Depending on whether you will allow your domain users to use the database features, this partition may be between 2 GB and 10 or more GB. If users are expected to be heavy database users, you may opt to divide the remaining disk space between /var and /home.

/home: The home partition is where all of your domain users data, email, CGI scripts, logs etc. will be stored. Pretty much anything that belongs to your users, except for MySQL and PostgreSQL databases, will reside on /home. Devote the remainder of your disk to /home, as usage will likely grow rapidly if you have many users.

Dependencies
Install the following applications, using whatever method is appropriate for your operating system:

Apache (see note below)
BIND
Postfix
procmail
SpamAssassin
ClamAV
Dovecot
ProFTPd
MySQL (optional)
PostgreSQL (optional)
Mailman (optional)
With the exception of Apache, standard versions of these applications are usually sufficient, as long as they are reasonably modern and have all security patches applied.

Additionally, if your system supports disk quotas, and you will be using them with Virtualmin, you need the management tools for disk quotas. Webmin also provides support for firewall management on most UNIX and Linux platforms, assuming the appropriate command line tools are available.

Note The Apache web server package provided with most operating systems requires customization to be suitable for use in a virtual hosting system, specifically it must be rebuilt with suexec_docroot set to /home. The standard OS Apache package will not work with applications in home directories, and thus is not suitable for virtual hosting usage. A custom build of Apache is not optional on most operating systems. This configuration cannot be done without a rebuild of the suexec binary on most operating systems, for security reasons. Debian and Ubuntu provide an apache-suexec-custom package that can be used, instead of rebuilding the binary; it must be installed and configured appropriately for executing scripts in /home (but, Debian and Ubuntu LTS are both Grade A supported operating systems by our install script, and so there should rarely, if ever, be a need to perform a manual install on these operating systems).

Webmin and Usermin
Download and install Webmin and Usermin, from http://www.webmin.com Webmin.com. There are multiple package types of available, so choose the most appropriate one for your OS. Installation instructions can be found on the Webmin site.

Virtualmin modules and theme
Once Webmin is operational you can download and install the Virtualmin modules and theme in either RPM format (for RPM-based Linux distributions), deb format (for deb-based Linux distributions), or wbm format (for any other UNIX or Linux system), and install them using the Webmin Modules module found in Webmin:Webmin Configuration.

Virtualmin Professional
The modules and themes can be found in the following locations:

http://software.virtualmin.com/wbm – wbm format modules

http://software.virtualmin.com/universal – RPM format modules for all RPM-based Linux distributions

http://software.virtualmin.com/debian/dists/virtualmin-universal/main/ – Debian module packages

http://software.virtualmin.com/ubuntu/dists/virtualmin-trusty/main/ – Ubuntu Trusty Tahr (14.04 LTS) packages

http://software.virtualmin.com/ubuntu/dists/virtualmin-universal/main/ – Ubuntu Universal packages

You will need to make a note of your serial number and license key, found on the http://www.virtualmin.com/serial/|Serial Numbers page at Virtualmin.com, so that you can login using the serial number as the username and the license key as the password.

Virtualmin GPL
http://software.virtualmin.com/gpl/wbm – wbm format modules

http://software.virtualmin.com/gpl/universal – RPM format modules

http://software.virtualmin.com/gpl/debian/dists/virtualmin-universal/main/ – Debian module packages

http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-trusty/main/b… – Ubuntu Trusty Tahr (14.04 LTS) packages

http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-universal/main/ – Ubuntu Trusty Tahr (14.04 LTS) packages

Service Configuration
Apache
On most platforms Apache must be built with suexec_docroot set to /home. This requires a recompile of Apache, unless an apache2-suexec-custom. We provide packages for the most popular operating systems in our GPL repositories at http://software.virtualmin.com/gpl/ . For other systems, you will need to download a source package from your OS vendor and rebuild it with the necessary change.

On Debian and Ubuntu systems, you can instead use the apache2-suexec-custom package. This option requires no rebuild of Apache. Configuring the custom suexec package is performed in /etc/apache2/suexec/www-data, and is as simple as changing the first line from /var/www to /home.

If installing on Ubuntu, you’ll need to edit /etc/apache2/conf.d/php5.conf, and comment out the two SetHandler lines.

BIND
BIND needs to be installed, and configured to accept queries from any address. Also, it is recommended that you configure the system to query the local name server by adding 127.0.0.1 to /etc/resolv.conf.

Postfix
Postfix should be installed, and configured for virtual hosting. The best way to do this for the vast majority of deployments is to use a simple map file.

Edit main.cf and add the following line:

virtual_alias_maps = hash:/etc/postfix/virtual

Also, make sure that home_mailbox is set to Maildir/.

Save it, and restart Postfix.

procmail
Procmail is necessary if you plan to make use of the spam and anti-virus filtering capabilities in Virtualmin. A reasonable starting procmailrc might be:

LOGFILE=/var/log/procmail.log
 TRAP=/usr/libexec/webmin/virtual-server/procmail-logger.pl
 VERBOSE=true

:0wi
 VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
 :0
 * ?test "$VIRTUALMIN" != ""
 {
 INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
 }
 DROPPRIVS=yes
 DEFAULT=$HOME/Maildir/
 ORGMAIL=$HOME/Maildir/

Procmail-Wrapper
The procmail-wrapper program is necessary for for mail to work properly, and in particular, spam and virus processing.

First, put the following code into a file named procmail-wrapper.c:

#include

#ifndef REAL_PROCMAIL
 #define REAL_PROCMAIL "/usr/bin/procmail"
 #endif

int main(int argc, char **argv)
 {
 setuid(geteuid());
 setgid(getegid());

execv(REAL_PROCMAIL, argv);
 }

Then, run the following commands to compile the code, install it into /usr/bin, and give it the proper permissions:

gcc -o /usr/bin/procmail-wrapper procmail-wrapper.c
 chmod 6755 /usr/bin/procmail-wrapper

Lastly, edit /etc/postfix/main.cf, and set mailbox_command to the following:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

SpamAssassin
SpamAssassin should be installed if you will be using the spam filtering features of Virtualmin.

ClamAV
ClamAV should be installed if you will be using the anti-virus features of Virtualmin.

Dovecot
Dovecot should be installed and configured for use with Maildir mail spools.

PAM or shadow authentication should be used.

ProFTPd
ProFTPd should be installed.

PAM or shadow authentication should be used.

MySQL
If you plan to use MySQL, or any of the Install Scripts in Virtualmin Professional that rely on MySQL, it should be installed, and accessible to localhost. The root account should have a password set. Once Webmin is installed, you will need to configure the MySQL module to know the root MySQL password.

Note – Virtualmin does not require MySQL, and no Virtualmin-related user data is stored in MySQL. If you’ve read setup guides on the web for virtual mail hosting that require MySQL, we strongly recommend you ignore them. This is a very common source of confusion for new users, and there’s simply no reason to introduce the complexity of this kind of deployment.

PostgreSQL
If you plan to use PostgreSQL or any of the Install Scripts in Virtualmin Professional that rely on PostgreSQL, it should be installed, and accessible to localhost.

SASLauthd
If users will be sending email through your server, you will need to configure saslauthd. This requires interaction with your MTA (probably Postfix), and it should be configured to use PAM or shadow authentication.

Mailman
When enabled, Virtualmin can allow your users to create and manage Mailman mailing lists.

Dont have Virtualmin Compatible Server yet? Here is the VPS or more robust Dedicated Server for you!

Share this
11 Feb 2018

Virtualmin – Automatic Installation

Hello Everyone! Assume you have just received brand new Tomattos Dediacted or VPS root access or just reinstalled your server freshly, you might want to install the robust control panel Virtualmin. Virtualmin is the second most widely used and #1 open source server control panel. You might find it handy and want to use it for your server.

Virtualmin

Virtualmin, worlds #1 open source server control panel by popularity!

Just quick check your server minimum requirements along with compatible linux distribution. By default all our dedicated server and vps are perfectly compatible with virtualmin.

Recommended System Specifications:
Automated installation requires a freshly installed, supported OS.
1 GB RAM (less for the –minimal installation), more is better
1 GB free disk space, more for your domain data

We will now discuss about the automatic installation of Virtualmin.

 

 

 

Virtualmin Automated Installation:

The automated installation described here is highly recommended, as it removes many possible errors during configuration and insures that all applications are built with appropriate options for virtual hosting within the Virtualmin system. If you haven’t read the Download page yet, you should do so now, as it provides all of the steps needed for installation in most cases on a single page. You should only proceed to more complex installation docs, if the steps provided on the download page won’t work for you.

Automated installation with install.sh
In most cases, installing Virtualmin is as simple as installing a supported Operating System of your choice, followed by running Virtualmin’s install.sh script.

A list of supported Operating Systems is provided at the OS Support page.

We recommend using a server version (or minimal version, with sshd if it is not part of the default install) of your Operating System. Virtualmin’s install.sh script will install any additional packages that it requires.

Partitioning
We typically recommend putting everything on one partition, unless you have a good reason for doing otherwise. If everything is on one partition, and the partition uses the XFS filesystem, you’ll need to reboot the system to enable quotas

If you wish to use multiple partitions, it’s no problem to put /home and /var onto a separate partition. Virtualmin puts all user data, including websites and email, into /home. Database data and log files are stored in /var.

If you choose to use multiple partitions, we’d suggest devoting as much space as possible to /home.

Running the Install Script
Installation is performed automatically by the OS-neutral Virtualmin install.sh script. This script sets up the license key in /etc/virtualmin-license and configures the appropriate package management and installation tool for use with the password-protected Virtualmin software repository. It will then install the virtualmin-base package, which performs the remainder of the installation, appropriate for your OS and version.

Download the file from the Software Licenses page on your Account page, under the Software Licenses tab, if you’re using Virtualmin Pro. All of your purchased products will be available for download throughout the life of your license period. If you’re using Virtualmin GPL, that can be downloaded from the Download page or from this link.

With the install.sh script on your server, run this command as root:

# sh ./install.sh

The install.sh has a number of options that can be used to perform a particular type of installation. The usage (–help) output describes the available options:

–uninstall|-u – Removes all Virtualmin packages (do not use on a production system)
–help|-h – This message
–force|-f – Skip confirmation message
–hostname|-h – Set fully qualified hostname
–verbose|-v – Verbose
–setup|-s – Setup software repositories and exit (no installation or configuration)
–minimal|-m – Install a smaller subset of packages for low-memory/low-resource systems
–bundle|-b – Choose bundle to install (LAMP or LEMP, defaults to LAMP)

For the most reliable, predictable, and well-tested configuration, use the default installation target. Minimal and LEMP modes are new in Virtualmin 6.0 and have had much less real world testing than the default.

LAMP vs. LEMP
The Virtualmin install script can setup Apache or nginx. The default, and best-tested and most feature-complete, is Apache. But, if you prefer nginx, you can install a bundle with the LEMP stack instead of the LAMP stack. Use the –bundle LEMP option for nginx.

Full Install vs. Minimal Install
The full LAMP or LEMP stack, plus a full mail processing stack including SpamAssassin and ClamAV, is quite large, requiring about 1GB minimum system memory in order to function well (and more is better). If you’re using a lower memory system, it’s not recommended, and maybe not even possible, to run the full mail stack along with LAMP or LEMP.

So, we provide an installation option, –minimal, that leaves off much of the mail processing stack. The installed components can still send and receive mail from local processes, but SMTP authentication and IMAP/POP are not installed or configured, and spam and AV scanning will need to be outsourced to a remote system (for example, a Cloudmin Services host). The minimal installation type can probably operate OK with only 512MB of RAM.

If you want to locally host mail for end users (including IMAP/POP clients), the minimal installation target is probably not the right choice.

Questions install.sh might ask you
Depending on your OS and the state of your system, the install.sh script may ask one or more questions.

Fully qualified domain name
If your system does not have a fully qualified domain name (FQDN), the installer will stop and ask you to choose one. This is mandatory because many services rely on having a fully qualified domain name in order to function. Mail, in particular, but some Apache configurations and many of the Virtualmin-created configuration files, also require a valid fully qualified domain name to function correctly. A fully qualified domain name is one of the form “www.virtualmin.com”, or simply “virtualmin.com”. We recommend you choose a name that is not one for which you will be receiving mail, in order to simplify later configuration. A good choice is to use a name server designator, such as “ns1.virtualmin.com”. Some customers also choose something like “host1.virtualmin.com” or “primary.virtualmin.com”. Any of these would be valid and would satisfy the install script and the services that rely on this option. The install script will add this name to /etc/hosts, which will satisfy all local services. It is even better if this name resolves correctly when looked up from outside of the system–this requires the name be added to your DNS zone for the second level domain. If the Virtualmin server you are installing will be the authoritative name server for this zone, you can later use Webmin to add a record for this name to the zone.

Completing the installation
Once the necessary questions have been answered, installation will proceed automatically. After 2-20 minutes, depending on the speed of your network connection and hardware, your system will be configured for Virtualmin and ready to login to. You can then login to Virtualmin. Virtualmin runs on port 10000 and is encrypted using SSL. Thus, you can connect to your system with an address of the form:

https://example.com:10000

Or:

https://192.168.1.1:10000

And then log in as the “root” user, or any user with sudo access.

It will then walk you through a post-installation setup wizard, asking you a series of setup questions.

The final step in the installation is to perform the configuration check, by clicking the Check Configuration button at the top of the Virtualmin System Information page.

Setting a root password
If your system does not have a password set for the root user, you may need to set a Virtualmin root password before you can login on port 10000. This can be the case when installing on an EC2 instance that uses an SSH key to login as root, or an Ubuntu system that uses sudo. If you have an administrative user with sudo ALL privileges, you can use that user to login to Virtualmin.

To set a root password for Virtualmin, run the command :

/usr/{share,libexec}/webmin/changepass.pl /etc/webmin root XYZ

where XYZ is the password you want to use. Make sure it is strong, as an attacker who guesses this password would have full control over your system.

Dont have Virtualmin Compatible Server yet? Here is the VPS or more robust Dedicated Server for you!

Share this

© 2012-2018 Tomattos Technologies Ltd. All rights reserved.

Click Me