Installing CentOS in Virtual Box of Windows Host Machine for Development
It was really excited to use Linux based OS in my Windows Host Machine through Oracle based Virtual Box Manager. Since many months i want to use Linux in Windows. So at last when i assigned with task to fix some bugs in Drupal site that is installed in CentOS with httpd and mariadb and I need to replicate server and site on my local to fix bugs then understands this all stuff altogether. The need to create replica first because we cant do directly change the css on server Drupal site and second it got some direct changes on server and we cant take risk to break the live site by discarding the direct live changes on server.
First installed CentOS-7 from iso file which downloaded from centOS website.
- Installing VBoxGuestAdditions.iso and setting up
Actually this step is essential to mount host machine development folder in virtual host machine. This VBoxAdditions allows your VM to setup shared folders and other good things. We’ll need shared folders to allow your host machine to edit files and have your guest machine use those updated files. Once that is done, you’ll need to restart your VM and remove the VBoxAdditions ISO CD.
First select VBoxGuestAdditions.iso in storage device and select folder to mount. And following commands need to run.
Reference links : http://toolkt.com/site/virtualbox-shared-folders-with-centos-server-guest/ http://www.pc-freak.net/blog/installing-virtualbox-guest-additions-vboxadditions-centos-65-fedora-19-20-rhel-65-510/
By default the path is created and symbolic link is created for easy reference.
Edit the file /etc/sysconfig/selinux to disable it. Change the string from SELINUX=enforcing to SELINUX=disabled. Save it and exit.
Now SELINUX is disabled. We now need to fix our networking. To do that we need to edit our network file at this location :/etc/sysconfig/network-scripts/ifcfg-enp0s3
Now we have network setup
- Install NGINX and MariaDB
Below reference links are best to install nginx and mariadb https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7 https://www.nginx.com/resources/wiki/start/topics/tutorials/install/
In precise following commands used to install same
The way to find ip address of virtual machine
Login to MariaDB
Working in Vim Editor