Linux

Build CentOS 8 vagrant box from scratch in Windows

We need to install VirtualBox and Vagrant in Windows and download the DVD ISO image of CentOS 8 to be able to build CentOS 8 vagrant box. It is recomended to use Chocolatey (a software management automation for Windows) to install these software. To install Chocolatey, follow the procedure here.

Steps:

  1. Install VirtualBox by executing the following command from the command line or from PowerShell:

Alternative way to get Linux image for Vagrant

Vagrant box downloads are extremely slow and there are no other trusted sources (links, torrents, magnets) available. But there's an alternative way to download your Linux image from faster source and use it with your Vagrant. Instead of downloading the Vagrant box, download the Oracle Virtualbox "ova" image file then convert it to Vagrant box image.

Steps:

  1. Download the Oracle Virtualbox "ova" Linux image file. In this article, CentOS 8 "ova" Linux image file downloaded from https://www.linuxvmimages.com/images/centos-8 will be used as an example.

How to route external domain to router website hosted in local virtualbox web server (Windows as host OS and CentOS 7 as guest OS)

There are test scenarios that requires a development site hosted in local web server accessible via live external domain. In this article, will show how to make a development site hosted in local virtualbox web server (Windows as host OS and CentOS 7 as guest OS). Note: make sure you have full administrator access to your router and the router's WAN IP is a public IP address.

Steps:

  1. Open and configure your Vagrantfile. Add the following lines:

Logout in Linux shell command prompt without leaving your commands history

When we logout in Linux shell command prompt, we leave all the commands we have executed in Bash history file. For some reason you don't want your activity to be traced, the following is a command that will prevent your history of commands to be saved:

  
kill -9 $$
  

Just in case this command is hard to remember, it is useful to make this command available for easy access by using up/down arrow keys . Edit your Bash history file:

  
vi ~/.bash_history
  

… and enter:

Tags

Running PHP 7.0 as one of multiple PHP versions on CentOS 7 using Virtualmin

In connection to my post Running multiple PHP versions on CentOS 7 using Virtualmin, this guide will show how to install additional PHP 7.0 version on CentOS 7 by using the Software Collections and have Virtualmin detect and use it.

Here are the steps:

  1. Login as root to your server's console terminal.

  2. Install the CentOS Linux Software Collections release file:

          
    yum install centos-release-scl
          
        
  3. Install the PHP package:

Monit configuration checks for common services running in CentOS 7

The following are Monit configuration that are created specifically for CentOS 7 system. If you have not installed Monit yet, please check this guide: Installing Monit to monitor your server running CentOS 7 with nginx.

Apache

Create the file /etc/monit.d/httpd and add the following to it: