WSL CentOS7 distro, install and autostart httpd and mariadb

Download the cento7 distro exported from docker https://drive.google.com/file/d/1RQPGrnzFBA6x-o3QvNXO4qDtR4bQC8Md/view?usp=sharing

Import the centos7 distro to WSL
wsl –import Centos7[suffix] [drive letter]:\[folder path to store the wsl image] [drive letter]:\centos7.tar
wsl –import Centos7 x:\wsl\centos7 x:\downloads\centos7.tar

Run the distro
wsl -d Centos7

Terminate the running distro
wsl -t Centos7

Terminate all running distro
wsl –shutdown

List distro
wsl -l -v

Side load CentOS7 distro to WSL

yum install yum-utils epel-release net-tools joe httpd mariadb mariadb-server -y
mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl

Install the relevant software

joe ~/.bash_profile
mkdir /run/httpd
mkdir /run/mariadb
chown mysql:mysql /run/mariadb
systemctl start httpd
systemctl start mariadb
env | grep -i wsl_distro_name

Add the following commands to the bash profile to execute upon boot