Setting the Hostname and FQDN.
First update the system.
apt-get update apt-get dist-upgrade -y apt-get install nano mc aptitude
Set your very strong root password
passwd new-secure-password reboot hostname -f
Delete the current hostname and replace it with your hostname.
Use just the hostname, not the entire FQDN, in this file. For example, if your FQDN is gusse.no, enter gusse in this file
Modify the line that starts with 127.0.0.1 to use your FQDN and hostname, in that order:
127.0.1.1 your_hostname.your_domain.com your_hostname
Add the IP address 127.0.0.1 to the configuration file.
Change dns-nameservers 184.108.40.206 to dns-nameservers 220.127.116.11 127.0.0.1
wget https://software.virtualmin.com/gpl/scripts/install.sh nano ./install.sh
Once you’re comfortable with the contents of the script, use it to install Virtualmin.
Configuring Webmin Root Password
/usr/share/webmin/changepass.pl /etc/webmin root new-secure-password
This process won’t change the system root password; it’ll just tell Webmin to use the password you specify for the login.
systemctl restart webmin
Configuring Webmin Using The Post-Installion Wizard
To configure Webmin, we’ll use its web-based Post-Installation Wizard. Open your web browser and navigate to https://your_server_ip:10000. You can also use your fully-qualified domain name to access the site.
Press Next to continue.
On the Memory use screen, select No for Preload Virtualmin libraries, no need to run the Virtualmin UI all the time. Select Yes for Run email domain lookup server to enable faster mail processing. Press Next to continue.
On the Virus scanning screen, select No for Run ClamAV server scanner.It will use less RAM. Press Next to continue.
On the Spam filtering screen, select No for Run SpamAssassin server filter and press Next to continue.
On the Database servers screen, select Yes to Run MySQL database server and no to Run PostgreSQL database server. Press Next to continue.
On the MySQL password screen, enter your desired MySQL root password. Make a different than the root password you used to log in to Webmin.
On the MySQL database size screen, select the RAM option that matches the amount of RAM your server has. For a 2GB server, select Large system (1G) on which MySQL is heavily used. Press Next to continue.
Enter your primary and secondary nameservers which you configured in the prerequisites. If you haven’t set these up, check the Skip check for resolvability box to avoid error message and proceed.
On the Password storage mode screen, select Store plain-text passwords if you must support password recovery. Otherwise, choose Only store hashed passwords. Click Next, and you will see the All done screen. Click Next to end.
It may be a message at the top stating that Virtualmin comes with a new theme. To activate the new theme, click the Switch Themes button. The page will reload but may look unstyled, as the new theme’s CSS file might not load properly. To solve this issue, refresh your browser manually.
It may also be a message stating that Virtualmin’s configuration has not been checked. Click the Re-check and refresh configuration button to check your Virtualmin configuration. Address any errors that the check reports.
Creating A New Virtual Server
Click on the Virtualmin tab on the left sidebar to display the Virtualmin sidebar menu. Next, click Create Virtual Server. You’ll see the following screen:
For Domain name, enter the domain name you plan to use for the new virtual server.
For Description, enter an appropriate description of your server.
For Administration password, enter a password that you’ll use to manage this virtual server. It should be different from other passwords you’ll use.
This is not necessary, but is useful if you plan to install wordpress on the server.
apt-get install imagemagick curl php7.0 php7.0-gd php7.0-curl php7.0-xmlrpc a2enmod proxy_fcgi setenvif a2enconf php7.0-fpm systemctl reload apache2