Editor’s Note: This article assumes knowledge and comfort with working on the command line of your server. If you would like to learn more about working on the command line, you can begin here.
After the choices of hosting provider and server package, one of the most important considerations a VPS customer can make when purchasing service is his or her choice of control panel. Control Panel software allows a user to configure and administer a server without the need to log in on the command line, greatly simplifying both routine and complex server administration tasks.
ServInt offers and fully supports the cPanel control panel, but there are other choices. Some of our customers wish to install their own control panel. One of the more popular choices is Virtualmin. There are two version of Virtualmin, a paid version and a free version. In this article, we’ll discuss how to install the free version of the Virtualmin software on a VPS server.
- The first step is to download Virtualmin to your server. Log into your server and download it using wget:
- For security reasons, ServInt enables noexec on our /tmp directory by default. This will cause issues with the Virtualmin installation. There are two options to get around this, the first is to disable the noexec protection, and the other is to edit the installation script.
Option A: disabling noexec protection
ServInt does not recommend disabling no exec protection on your entire server. Disabling no exec will allow files to be executed from the /tmp directory, a common exploit path for hackers. Still, this is the simpler path and some of our customers choose this option.
To disable no exec protection, simply open a ticket in your customer portal and request that we remove the secure /tmp protection.
Option B: editing the installation script
For this option, you will need to work on the command line.
- Open up the install.sh script. You will have to make edits to two areas, the first is to disable the noexec check and the other is to move the tmp directory for the install.
- To disable the noexec check add a # in front of each of these lines (If you had noexec disabled skip ahead to “Then run the installation script”)…
TMPNOEXEC=`grep /tmp /etc/mtab | grep noexec` if [ "$TMPNOEXEC" != "" ]; then echo "/tmp directory is mounted noexec. Installation cannot continue." exit 1 fi
…so it will look like this:
#TMPNOEXEC=`grep /tmp /etc/mtab | grep noexec` #if [ "$TMPNOEXEC" != "" ]; then # echo "/tmp directory is mounted noexec. Installation cannot continue." # exit 1 #fi
- Then navigate to the part of the install script that identifies where it should place its temp files, it will look like this:
# Find temp directory if [ "$TMPDIR" = "" ]; then TMPDIR=/tmp fi
I changed mine to the below, but you can specify any directory:
# Find temp directory if [ "$TMPDIR" = "" ]; then TMPDIR=/home/tmp fi
While technically beyond the scope of our support, if you feel uncomfortable making this change, simply reference this article in a ticket or list precisely what needs to be disabled and changed and the MST will be able to help.
Then create the directory if it does not exist already, for me:
- Next, run the installation script:
You will be prompted to confirm a few things, read the questions, and progress through.
- Once the installer finishes, you can log into Virtualmin by going to: https://ip.add.re.ss:10000 Where ip.add.re.ss is the main IP address of your server.
You will get a security warning, but since we know that we just installed this software and it is legitimate accept the warning and keep on moving through. You will then be prompted for a username and password, this will be the username root and your root password.
- Once done, you will see the Virtualmin Post Installation Wizard, clicking through this will allow you to optimize Virtualmin to use the resources that you think you will use the least of. If you do not know you can cancel out of it and return to it at a later time.
- You will then need to add your credentials and enable server software to Virtualmin. Virtualmin makes this easy with a series of prompts. You will be prompted for your MySQL credentials (For Virtualmin, I used the root username and password. You can alternatively create a separate user for Virtualmin with its own username and password.)
- Virtualmin will also prompt you to turn on mailman: “The mailman queue processor /usr/lib/mailman/bin/qrunner is not running on your system.”
Click on the link next to the error and turn on mailman by clicking “turn on now.” If this hangs for you, you can SSH into the server and start it via:
This completes the initial set up check list for Virtualmin. Please keep in mind that ServInt does not support Virtualmin beyond installation and that the managed services team is fully cPanel certified.