Teo En Ming's Notes for Setting Up Web Hosting Control Panel using Virtualmin GPL

Subject: Teo En Ming's Notes for Setting Up Web Hosting Control Panel using Virtualmin GPL


Author: Mr. Turritopsis Dohrnii Teo En Ming (TARGETED INDIVIDUAL)

Country: Singapore

Date: 18 Oct 2021 Monday Singapore Time


Type of Publication: Plain Text

Document Version: 20211018.01


DETAILED INSTRUCTIONS

======================


Create DNS A (Hostname) Record

==============================


1. Login to your domain registrar. In my case it is namecheap.


2. Click Account on the top right.


3. Click Dashboard.


4. Click Domain List on the left menu.


5. Select the domain turritopsis-dohrnii-teo-en-ming.com and click Manage.


6. Click Advanced DNS.


7. Click ADD NEW RECORD.


8. Choose "A Record". 


9. Host: hosting


10. IP Address: 185.182.9.61


11. TTL: Automatic


12. Click the green check mark to save changes.


Now, you can putty/SSH into your Virtual Private Server (VPS) at hosting.turritopsis-dohrnii-teo-en-ming.com.


VPS Login banner

================


Last failed login: Mon Oct 18 01:06:54 CEST 2021 from 221.131.165.56 on ssh:nott                                                                                        

There were 97 failed login attempts since the last successful login.

  _____

 / ___/___  _  _ _____ _   ___  ___

| |   / _ \| \| |_   _/ \ | _ )/ _ \

| |__| (_) | .` | | |/ _ \| _ \ (_) |

 \____\___/|_|\_| |_/_/ \_|___/\___/


Welcome!


This server is hosted by Contabo. If you have any questions or need help,

please don't hesitate to contact us at support@contabo.com.


Information Gathering on My VPS

=================================


CentOS Linux Operating System

===============================


[root@vmi696121 ~]# cat /etc/os-release

NAME="CentOS Linux"

VERSION="7 (Core)"

ID="centos"

ID_LIKE="rhel fedora"

VERSION_ID="7"

PRETTY_NAME="CentOS Linux 7 (Core)"

ANSI_COLOR="0;31"

CPE_NAME="cpe:/o:centos:centos:7"

HOME_URL="https://www.centos.org/"

BUG_REPORT_URL="https://bugs.centos.org/"


CENTOS_MANTISBT_PROJECT="CentOS-7"

CENTOS_MANTISBT_PROJECT_VERSION="7"

REDHAT_SUPPORT_PRODUCT="centos"

REDHAT_SUPPORT_PRODUCT_VERSION="7"


4 vCPU Cores

============


[root@vmi696121 ~]# cat /proc/cpuinfo

processor       : 0

vendor_id       : GenuineIntel

cpu family      : 6

model           : 79

model name      : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz

stepping        : 1

microcode       : 0x1

cpu MHz         : 2199.998

cache size      : 16384 KB

physical id     : 0

siblings        : 4

core id         : 0

cpu cores       : 4

apicid          : 0

initial apicid  : 0

fpu             : yes

fpu_exception   : yes

cpuid level     : 20

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat umip md_clear spec_ctrl intel_stibp arch_capabilities

bogomips        : 4399.99

clflush size    : 64

cache_alignment : 64

address sizes   : 40 bits physical, 48 bits virtual

power management:


processor       : 1

vendor_id       : GenuineIntel

cpu family      : 6

model           : 79

model name      : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz

stepping        : 1

microcode       : 0x1

cpu MHz         : 2199.998

cache size      : 16384 KB

physical id     : 0

siblings        : 4

core id         : 1

cpu cores       : 4

apicid          : 1

initial apicid  : 1

fpu             : yes

fpu_exception   : yes

cpuid level     : 20

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat umip md_clear spec_ctrl intel_stibp arch_capabilities

bogomips        : 4399.99

clflush size    : 64

cache_alignment : 64

address sizes   : 40 bits physical, 48 bits virtual

power management:


processor       : 2

vendor_id       : GenuineIntel

cpu family      : 6

model           : 79

model name      : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz

stepping        : 1

microcode       : 0x1

cpu MHz         : 2199.998

cache size      : 16384 KB

physical id     : 0

siblings        : 4

core id         : 2

cpu cores       : 4

apicid          : 2

initial apicid  : 2

fpu             : yes

fpu_exception   : yes

cpuid level     : 20

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat umip md_clear spec_ctrl intel_stibp arch_capabilities

bogomips        : 4399.99

clflush size    : 64

cache_alignment : 64

address sizes   : 40 bits physical, 48 bits virtual

power management:


processor       : 3

vendor_id       : GenuineIntel

cpu family      : 6

model           : 79

model name      : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz

stepping        : 1

microcode       : 0x1

cpu MHz         : 2199.998

cache size      : 16384 KB

physical id     : 0

siblings        : 4

core id         : 3

cpu cores       : 4

apicid          : 3

initial apicid  : 3

fpu             : yes

fpu_exception   : yes

cpuid level     : 20

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat umip md_clear spec_ctrl intel_stibp arch_capabilities

bogomips        : 4399.99

clflush size    : 64

cache_alignment : 64

address sizes   : 40 bits physical, 48 bits virtual

power management:


8 GB RAM

=========


[root@vmi696121 ~]# free

              total        used        free      shared  buff/cache   available

Mem:        8008644      291372     7659556        8616       57716     7547152

Swap:             0           0           0


200 GB SSD

===========


[root@vmi696121 ~]# df -h

Filesystem      Size  Used Avail Use% Mounted on

devtmpfs        3.9G     0  3.9G   0% /dev

tmpfs           3.9G     0  3.9G   0% /dev/shm

tmpfs           3.9G  8.5M  3.9G   1% /run

tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup

/dev/sda2       196G  1.5G  185G   1% /

/dev/sda1       969M  112M  792M  13% /boot

tmpfs           783M     0  783M   0% /run/user/0


Networking

==========


[root@vmi696121 ~]# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:50:56:43:dc:29 brd ff:ff:ff:ff:ff:ff

    inet 185.182.9.61/23 brd 185.182.9.255 scope global noprefixroute eth0

       valid_lft forever preferred_lft forever


Change your root password

=========================


# passwd


Downloading and Installing Virtualmin

=====================================


# wget http://software.virtualmin.com/gpl/scripts/install.sh


# chmod +x install.sh


[root@vmi696121 ~]# sudo /bin/sh install.sh

ERROR: cannot verify software.virtualmin.com's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:

  Issued certificate has expired.

To connect to software.virtualmin.com insecurely, use `--no-check-certificate'.

chmod: cannot access ‘slib.sh’: No such file or directory

install.sh: line 297: ./slib.sh: No such file or directory


Solution for Above Virtualmin Installation Error

=================================================


Topic: Cannot install Virtualmin - software.virtualmin.com’ is not trusted.

Link: https://archive.virtualmin.com/node/70497


# yum install ca-certificates


# ./install.sh


2021-10-18 02:00:41 URL:https://software.virtualmin.com/lib/slib.sh [22148/22148] -> "slib.sh" [1]


  Welcome to the Virtualmin GPL installer, version 6.2.2


  This script must be run on a freshly installed supported OS. It does not

  perform updates or upgrades (use your system package manager) or license

  changes (use the "virtualmin change-license" command).


  The systems currently supported by install.sh are:


    CentOS/RHEL Linux 7, and 8 on x86_64

    Debian 9, and 10 on i386 and amd64

    Ubuntu 16.04 LTS, 18.04 LTS, and 20.04 LTS on i386 and amd64


  If your OS/version/arch is not listed, installation will fail. More

  details about the systems supported by the script can be found here:


    https://www.virtualmin.com/os-support


  The selected package bundle is LAMP and the size of install is

  full. It will require up to 650 MB of disk space.


  Exit and re-run this script with --help flag to see available options.


 Continue? (y/n) y


[INFO] Started installation log in /root/virtualmin-install.log


▣□□ Phase 1 of 3: Setup

/usr/sbin/setenforce: SELinux is disabled

Updating yum Groups                                                     [  ✔  ]

Downloading virtualmin-release-latest.noarch.rpm                        [  ✔  ]

Installing virtualmin-release package                                   [  ✔  ]


▣▣□ Phase 2 of 3: Installation

Installing EPEL release package                                         [  ✔  ]

Installing yum-utils                                                    [  ✔  ]

Enabling extras repository                                              [  ✔  ]

Installing scl-utils                                                    [  ✔  ]

Install Software Collections release package                            [  ✔  ]

Installing PHP7                                                         [  ✔  ]

Marking 'Virtualmin LAMP Stack' for install                             [  ✔  ]

Marking 'Virtualmin Core' for install                                   [  ✔  ]

Installing dependencies and system packages                             [  ✔  ]

Installing Virtualmin and all related packages                          [  ✔  ]

Cleaning up software repo metadata                                      [  ✔  ]

Installing updates to Virtualmin-related packages                       [  ✔  ]


▣▣▣ Phase 3 of 3: Configuration

[1/23] Configuring AWStats                                              [  ✔  ]

[2/23] Configuring Apache                                               [  ✔  ]

[3/23] Configuring Bind                                                 [  ✔  ]

[4/23] Configuring ClamAV                                               [  ✔  ]

[5/23] Configuring Dovecot                                              [  ✔  ]

[6/23] Configuring Firewalld                                            [  ✔  ]

[7/23] Configuring MySQL                                                [  ✔  ]

[8/23] Configuring NTP                                                  [  ✔  ]

[9/23] Configuring Net                                                  [  ✔  ]

[10/23] Configuring ProFTPd                                             [  ✔  ]

[11/23] Configuring Procmail                                            [  ✔  ]

[12/23] Configuring Quotas                                              [  ✔  ]

[13/23] Configuring SASL                                                [  ✔  ]

[14/23] Configuring Shells                                              [  ✔  ]

[15/23] Configuring SpamAssassin                                        [  ✔  ]

[16/23] Configuring Status                                              [  ✔  ]

[17/23] Configuring Upgrade                                             [  ✔  ]

[18/23] Configuring Usermin                                             [  ✔  ]

[19/23] Configuring Webalizer                                           [  ✔  ]

[20/23] Configuring Webmin                                              [  ✔  ]

[21/23] Configuring Fail2banFirewalld                                   [  ✔  ]

[22/23] Configuring Postfix                                             [  ✔  ]

[23/23] Configuring Virtualmin                                          [  ✔  ]

▣▣▣ Cleaning up


[SUCCESS] Installation Complete!

[SUCCESS] If there were no errors above, Virtualmin should be ready

[SUCCESS] to configure at https://vmi696121.contaboserver.net:10000 (or https://185.182.9.61:10000).

[SUCCESS] You'll receive a security warning in your browser on your first visit.


Now, you can login to Virtualmin web hosting control panel at https://hosting.turritopsis-dohrnii-teo-en-ming.com:10000/


Post-Installation Wizard

=========================


Introduction

============


This post-installation wizard allows you to configure Virtualmin optimally for your system. You can make selections depending on whether you want to host websites, email or databases, and based on your system's memory and CPU power.

To continue, click the Next button below. To skip it and use the default settings, click Cancel.


Click Next.


Memory use

==========


Virtualmin can be tuned to improve performance in its user interface and email processing, but at the cost of increased memory use. The best choice depends on how your system will be used.


Preload Virtualmin libraries? Choose Yes (more RAM used, faster Virtualmin UI - approximately 40M)


Run email domain lookup server? Choose Yes (more RAM used, faster mail processing - approximately 70M)


Click Next.


If your system is going to host domains that will receive a large amount of email, scanning incoming messages for viruses can generate high CPU load. Because scanning is done using the ClamAV scanning server clamd, it will consume RAM even when not processing email. If your system will not be hosting email, virus scanning can be disabled.


Enable virus scanning with ClamAV? Choose  Yes (uses approximately 750 MB RAM)


Click Next.


Error

======


Systemd service clamd@scan cannot be created unless a command is given


Resolution to above Error

==========================


Enable virus scanning with ClamAV? Choose Keep using on-demand scanner


Click Next.


Spam filtering

==============


If your system is going to host domains that will receive a large amount of email, filtering incoming messages for spam can generate significant CPU load. This is due to CPU use by the SpamAssassin mail filter when it is started, which can be avoided by running the SpamAssassin filter server spamd in the background. This consumes RAM, but reduces CPU load and makes mail processing faster.


Run SpamAssassin server filter? Choose Yes (more RAM used, faster mail processing, no per-domain settings - approximately 30M)


Click Next.


Database servers

================


Virtualmin supports both the MariaDB and PostgreSQL database servers, but you might want to run only one (or neither) on your system. Each consumes RAM when running, even if they are not being used.

Depending on the websites and applications you plan to host, running MariaDB only may be enough, as most web applications do not support or require PostgreSQL. If your system will only be used for mail or DNS hosting, there is no need to run either.


Run MariaDB database server? Choose Yes (more RAM used, needed for most non-static websites) 


Run PostgreSQL database server? Choose No (less RAM used) 


Click Next.


MariaDB password

=================


To prevent other users on your system from managing the MariaDB database, a password for the root user should be set. Currently the MariaDB password is not set, which is highly insecure.


Set MariaDB password: <REMOVED>


Remove test MariaDB database? Yes


Remove anonymous MariaDB user? Yes


Click Next.


Error

======


DBI connect failed : Access denied for user 'root'@'localhost' (using password: NO)


MariaDB database size

=====================


MariaDB can be configured to trade off memory use for performance, depending on how much RAM your system has and how heavily you expect the database to be used.


MariaDB configuration size: Choose Huge system (2G or more) on which MariaDB is heavily used (RECOMMENDED) 


Click Next.


DNS configuration

==================


For DNS zones created by Virtualmin to be resolvable, the primary nameserver record for each zone must be set to something that can itself be resolved by other systems on the Internet.


Primary nameserver: vmi696121.contaboserver.net


Uncheck Skip check for resolvability


Secondary nameservers (optional):


Click Next.


Password storage

================


Virtualmin gives you the option of storing plain-text passwords for virtual servers and mailboxes, or storing only one-way encrypted (hashed) passwords. Plain text passwords are more convenient, but less secure if your system is compromised.


Password storage mode: Choose Only store hashed passwords


Warning - when hashed passwords are used, password recovery for virtual servers will no longer be possible. In addition, the MariaDB password for new servers will be different from the administration password, and will be randomly generated.


Click Next.


Virtualmin can create a default virtual server that will serve web requests to your system that don't match any other domain. It can also be used to request a Let's Encrypt SSL certificate for use by Virtualmin's own UI.


Setup default virtual server? Choose No, thanks


Enable SSL on default server? No


Click Next.


All done

=========


Virtualmin post-installation configuration is now complete!


Click Next.


Virtualmin Virtual Servers

===========================


Version 6.17, master admin mode


Virtualmin's configuration has not been checked since it was last updated. Click the button below to verify it now.


Click Re-check and refresh configuration


Checking Configuration

======================


The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

Your system has 7.63 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB.

BIND DNS server is installed, and the system is configured to use it.

Mail server Postfix is installed and configured.

Postfix is configured to support per-domain outgoing IP addresses.

Apache is installed.

The following PHP versions are available : 5.4.16 (/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi)

The following PHP-FPM versions are available on this system : 5.4.16 (php-fpm) 7.2.24 (rh-php72-php-fpm)

The following PHP execution modes are available : none cgi fcgid fpm

PHP versions have changed to 5, 7.2 since last check. Regenerating any missing php.ini files.

Webalizer is installed.

Apache is configured to host SSL websites.

MariaDB 5.5.68 is installed and running.

ProFTPD is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and running.

Plugin AWstats reporting is installed OK.

Plugin Protected web directories is installed OK.

Using network interface eth0 for virtual IPs.

Default IPv4 address for virtual servers is 185.182.9.61.

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

Chroot jails are available on this system

.. your system is ready for use by Virtualmin.

Updating all Webmin users with new settings..

.. done

Updating Virtualmin library pre-load settings ..

.. done

Updating status collection job ..

.. done

Re-loading Webmin ..

.. done


Click Return to Virtual Servers list


Virtualmin Virtual Servers

===========================


Version 6.17, master admin mode


No virtual servers have been created yet.


Dashboard

==========


System Information

==================


System hostname: vmi696121.contaboserver.net (185.182.9.61) Operating system: CentOS Linux 7.9.2009

Webmin version: 1.981 Usermin version: 1.823

Virtualmin version: 6.17 Authentic theme version: 19.83-2 

Time on system: Monday, October 18, 2021 2:56 AM Kernel and CPU: Linux 3.10.0-1160.el7.x86_64 on x86_64

Processor information: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 4 cores System uptime: 8 hours, 54 minutes

Running processes: 122 CPU load averages: 0.17 (1 min) 0.13 (5 mins) 0.15 (15 mins)

Real memory: 797.59 MiB used / 60.83 MiB cached / 7.63 GiB total Local disk space: 12.94 GiB used / 183.77 GiB free / 196.71 GiB total

Package updates: 88 package updates are available, of which 1 is security update


Mr. Turritopsis Dohrnii Teo En Ming, 43 years old as of 18 Oct 2021, is a TARGETED INDIVIDUAL living in Singapore. He is an IT Consultant with a Systems Integrator (SI)/computer firm in Singapore. He is an IT enthusiast.






REFERENCES

===========


[1] https://sourceforge.net/p/webadmin/mailman/message/37368877/


[2] https://marc.info/?l=webmin-l&m=163456246226087&w=2


Comments

Popular posts from this blog

[24 Mar 2022 Thursday] Erectile Dysfunction and Viagra

[YOUTUBE] Mental illnesses were invented by governments to punish targeted individuals