Learn about Centmin Mod LEMP Stack today
Become a Member

Install Will CentOS Min Mod work on VirtualBox?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by marc3000, Apr 30, 2017.

Tags:
  1. marc3000

    marc3000 New Member

    25
    8
    3
    Feb 2, 2017
    Ratings:
    +13
    Local Time:
    11:05 AM
    I was wondering if CentOS+Min Mod would work normal if i installed it on virtual box,

    This is what i am trying to do,

    Old Desktop (with ubuntu + virtual box installed)
    - on virtual machine1 - CentOS+MinMod = site 1
    -on virtual machine 2 - CentOS+MinMod = site 2
    -on virtual machine 2 - CentOS+MinMod = site 3


    So what i am trying to do is run 3 websites from my old desktop using virtual machines,

    so it would be as if i had 3 different servers, if i mess one up, then i can easily restore the virtual machine,
    it's alot easier than using 3 servers,


    has anyone ever done this before?

    for the networking part, all if have to do is port forward, so i can have all websites online from 1 server
    the only thing i have to change is the listen port 80, on each virtual machine
    so 3 virtual machines would listen on 81,82,83

    but what about ftp? i notice that virtual machines don't have a normal file system, it;s just 1 file .ovf

    so ftp doesn't work on virtual machines?


    has anyone ever done something like this?
    currently i am using 2 servers, but i broke one last week, so i had to reinstall because i didnt know what else to do,

    so i was thinking virtual machines would be much faster and easier for learning


    is this possible, would it work normal?
     
  2. Jimmy

    Jimmy Premium Member Premium Member

    1,025
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    11:05 AM
    1.13.x
    MariaDB 10.1.x
    I run tests on virtualbox. Have a default centos image that I copy for new machines.

    Just setup a range in your router 10.0.0.20 - 10.0.0.30 and assign those to the VM. I've never used port forwarding etc. Though, these are all internal boxes for testing.
     
  3. eva2000

    eva2000 Administrator Staff Member

    28,976
    6,578
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,764
    Local Time:
    1:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod is developed and tested on Virtualbox first https://community.centminmod.com/threads/centos-7-0-install-on-virtualbox-guest-server.730/. Then tested on test VPS and then live VPSes. So yes Centmin Mod fully works with Virtualbox but I only test privately on local lan and not for web accessible serving as well

    Didn't have to do any port forwarding to make different ports work, just ensure the TCP_IN line for /etc/csf/csf.conf has whitelisted the additional HTTP ports and restart CSF Firewall.
     
  4. marc3000

    marc3000 New Member

    25
    8
    3
    Feb 2, 2017
    Ratings:
    +13
    Local Time:
    11:05 AM
    why would i have to whitelist any additional ports when using in the vm? there is no additional ports to whitelist, since the default is on port 80 and i already see port 80 in the list

    when i set up my server(not on the vm) i didn't have to whitelist any ports, or change anything in the firewall, usually there is only 4 setups and my server is up and running quickly

    1. nano -w /etc/hostname
    2. nano -w /etc/hosts
    3. vhostconf
    4. centmin mod option 2

    done!


    i was able to get windows server 2012 working on vm, and access it from outside, and even using a domain,
    all i had to do was

    router
    port forward port80

    vm
    port forward port80



    i did those 4 steps for centos(in the vm) but for some reason i cant access it from outside


    im not sure why window server works in the vm, but centos wont work inside the vm
     
  5. eva2000

    eva2000 Administrator Staff Member

    28,976
    6,578
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,764
    Local Time:
    1:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh i thought you mean you're testing your sites with domain.com:81, domain.com:82 and domain:83 directly as well as default port 80
     
  6. marc3000

    marc3000 New Member

    25
    8
    3
    Feb 2, 2017
    Ratings:
    +13
    Local Time:
    11:05 AM
    oh yes, i did write that, i forgot,

    originally i was using different ports because i thought each server would need to have different ports, but then i found out all all servers can stay on the default port 80 at the same time

    windows_server.png


    centos.png



    then both the vm's have this settings in the vm machine network settings,
    vm.png


    and my router is port-forwarded, port 80


    i dont turn on both machines at the same time, i turn on either windows or centos,

    and windows works, i can access it from outside but not centos,



    maybe i will check my settings again,
    or maybe i will try another port other than the default 80

    but its strange
     
    Last edited: Apr 30, 2017
  7. marc3000

    marc3000 New Member

    25
    8
    3
    Feb 2, 2017
    Ratings:
    +13
    Local Time:
    11:05 AM
    i did it!!!!!!!!!!!!!!!!!!!!

    i had to start fresh
    i re-installed centos, re-installed centmin mod, and it worked!!

    must of been something wrong with my last version, maybe the option 2 i said no to ssl, or something else, i dont know what was wrong with it, so i re-installed everything ,

    anyways, it's working!! now i can run many different operating system from 1 server,

    this will help me in learning, and save me time!!





    i just have to figure out how to ftp and i will be set!!


    yay!!!
     
    Last edited: May 1, 2017
    • Like Like x 1
  8. marc3000

    marc3000 New Member

    25
    8
    3
    Feb 2, 2017
    Ratings:
    +13
    Local Time:
    11:05 AM
    i figured it out!!!!!!!!!!


    just had to port forward port 22 on my router and the vm!!!!!! and it works!!!!!


    now i can get rid of my 4 old desktops and just run all my test websites from 1 desktop


    woohoo!!
     
  9. eva2000

    eva2000 Administrator Staff Member

    28,976
    6,578
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,764
    Local Time:
    1:05 AM
    Nginx 1.13.x
    MariaDB 5.5
    Nice.. enjoy the learning :D
     
    • Like Like x 1