×
Community Blog How to Install and Configure Virtualmin on Alibaba Cloud

How to Install and Configure Virtualmin on Alibaba Cloud

In this tutorial, you will learn how to install and configure Virtualmin on Alibaba Cloud, and learn how to create other things like a sub-server and subdomain.

By Sajid Qureshi, Alibaba Community Blog author

In this tutorial, you will learn how to install and configure Virtualmin on Alibaba Cloud. Virtualmin is a completely free and open-source web hosting and cloud computing control panel. Virtualmin is very capable, highly flexible, and is relatively easy to use. Virtualmin offers several easy-to-use tools for managing websites, mailboxes, databases, web applications, and web application development environments. Virtualmin also supports features like LDAP authentication, two-factor authentication, command line management, and advanced access controls, being different from other control panels. It is based on the well-known web-based application named Webmin. Below are some of the features in detail.

  1. Virtualmin provides powerful and flexible domain accounts, called virtual servers, and sub-servers, allowing users to manage their own websites.
  2. Virtualmin helps you and your customers manage mailboxes, forwarders and provides several powerful web-based mail clients including Usermin with full Virtualmin integration.
  3. Virtualmin offers a number of tools to help you keep your systems and your data safe.
  4. Virtualmin features easy viewing and searching of system and web server logs, advanced monitoring and email/text alerts for services and network status.
  5. Virtualmin makes it easy to keep good backups of your websites, databases, mailboxes, and more, and makes it easy to migrate to a new server.

Prerequisites

For this tutorial, you'll need the following items:

  1. You must have an Alibaba Cloud Elastic Compute Service (ECS) instance activated and have verified a valid payment method. If you are a new user, you can register for a free account. If you don't know about how to set up your ECS instance, you can refer to this tutorial or this quick-start guide. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  2. A domain name from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.

Setting up Your Server

Before proceeding to the installation of any kind of new package on your system, update and upgrade all the available packages using the sudo apt-get update command.

Next, you will need to set up a hostname for our machine. But first, check your current hostname using the hostname -f command. Then, in order to change the hostname for your server, you will need to modify the /etc/hostname file using the sudo nano /etc/hostname command.

Now delete the current hostname and replace it with your new hostname, then save the file and close. You will need to /etc/hosts file to add both hostname and fully qualified domain name with the sudo nano /etc/hosts command.

You'll have to edit the line that starts with 127.0.0.1, like those below shown:

127.0.1.1   YourHostname.YourDomainname YourHostname
127.0.0.1   localhost

If in case you don't find such line in the file, you can add it to the file.

Installing Virtualmin

Virtualmin can be installed in many ways, but here we will be installing it using an automated script which will install every package by itself. So, let's download the script using the following wget command.

wget https://software.virtualmin.com/gpl/scripts/install.sh

Once the script has been successfully downloaded, you can proceed further by running the script using the sudo /bin/sh ./install.sh command. If you see a license agreement or any warning for installing Virtualmin, then press Y to continue the installation. Note that the script may take some time to complete.

Given that Virtualmin is based on Webmin, and Webmin uses the system root user and password for the web interface login, we recommend you to change the webmin's root password to harden overall security. For this, run the following command, and it will do the job for you.

sudo /usr/share/webmin/changepass.pl /etc/webmin root StrongPassword

Make sure you replace the StrongPassword with a new root password for Webmin. Next, you will need to restart the Webmin service to apply the changes using the sudo systemctl restart webmin command.

Post-Installation Wizard

Now that Virtualmin is installed successfully, you will need to access it through a web browser and complete the post-installation wizard from there. So, for this, open up your favorite web browser, and visit http://YourServerIP:1000 or http://YourFQDN:1000. On entering the page, the page will display a warning, along the lines "Your connection is not secure" or "Your connection is not private", but you can just ignore such message, and continue on.

On the next interface, you should see a login page of Webmin. Simply enter the root as the username and password, as we configured earlier. Then, once you are logged in to the Webmin, you should see a dashboard with a post-installation wizard.

1

Click on the Next button to continue and proceed further. On the next interface, you'll see a memory use screen. Select No for Preload Virtualmin libraries since you'll not want or need to run the Virtualmin interface all the time, and select Yes for Run email domain lookup server and then click the Next button to continue and proceed further.

On the next interface, select No for Run ClamAV server scanner to save the usage of RAM, and then click on Next to continue and proceed further. Then, on the following interface, select No for Run SpamAssassin server filter and click the Next button. Next, you'll be asked to configure the database details. So, on the next interface, select Yes to Run MySQL database server and No to Run PostgreSQL database server and then click on Next button to continue.

On the next interface, you'll need to set a new MySQL root password. For this, simply, enter a password of your choice and click Next. Following this, you will have to choose the MySQL database size. You can select any option for the database size, but we recommend you to choose option Large System (1G) which is mostly used.

Click Next, and you'll be asked to enter your Primary nameserver. Simply enter your primary nameserver or you can select Skip Check for resolvability to avoid any errors if you want.

You will be asked to choose the Password Storage Mode, we recommend you to choose Only store hashed passwords for security reasons. You can also select Store plain-text passwords if you must support password recovery.

Click Next to continue, and you'll see that our post-installation wizard is completed now. Click on Next, and you'll see a Virtualmin dashboard. You can manage and adjust the settings on features and Plugins from Virtualmin dashboard.

You might see a message that Virtualmin's configuration has not been checked. Just click on the Re-check and refresh configuration button to check your Virtualmin configuration.

Switching between Webmin and Virtualmin

Every Virtualmin dashboard contains a Webmin tab and a Virtualmin tab in the left-hand menu. We can switch between the Webmin menu and Virtualmin menu. Let's see some of their uses:

  • Webmin provides general purpose systems management features, such as user/group management, listing processes, managing installed packages, network settings, and firewall settings.
  • Virtualmin provides access to domain accounts management functionality, including creating new domain accounts, new databases associated with those accounts, and installing applications.

Creating a Sub-Server

You can set up a second domain within a given Virtual Server account by creating a sub-server. We also recommend creating a sub-server to create a sub-domain website that is owned by the parent domain.

You can easily create a sub-server by following these steps:

  1. Choose the domain where you want to add the sub-server. You can do so by selecting the domain name from the drop-down box on the top-left.
  2. Click on Create Virtual Server.
  3. Once a virtual server is created then click on Sub-server.
  4. Enter the domain name and description for the Sub-server and click on Create Server.

Create a virtual server alias

You can easily create an alias for the existing virtual server. Follow the steps below to create a virtual server alias:

  1. Log in to the Virtualmin dashboard and choose the domain you where you would like to add the Virtual Server Alias from the drop-down menu on the left.
  2. Click on Create Virtual Server.
  3. Click Alias of example.com, where example.com represents the domain for which you are setting up the alias.
  4. Enter the domain name for the alias in the Domain name field.
  5. Enter a description for the alias in the Description field.
  6. Click Create Server to finish.

Creating an FTP Account

Follow these steps to create an FTP account:

  1. Choose the domain you want to add the FTP account to from the drop-down box on the top-left.
  2. Once the domain is selected, click on Edit Users then click on Add a website FTP access user (on the far-right).
  3. You'll be asked an Email address so in the Email Address. When prompted, enter the name for the new FTP account and enter the FTP user's name in the Real name field.
  4. You can also set a password in the Password field if you want to override Virtualmin's password that it puts there by default.
  5. Finally, click on the Create button to create an FTP account.

Conclusion

To sum up things, in this tutorial, you've learned to install and configure Virtualmin on an Alibaba Cloud ECS instance. You also learned to create a sub-server, create a subdomain, create a virtual server alias and creating an FTP account.

0 0 0
Share on

Alibaba Clouder

2,599 posts | 762 followers

You may also like

Comments

Alibaba Clouder

2,599 posts | 762 followers

Related Products