developing... install Linux in virtual box or full install on separate hard drive

Discussion in 'PHP' started by leadinmarketing, Sep 5, 2014.

  1. #1
    Hey. I am trying to work on Linux for my php programming and scripting. And then other languages down the road. I have some basic experience in Linux. I'm a windows user. I just ordered a separate hard drive to install Ubuntu Linux.

    Some people here have offered some serious recommendations in favor of installing in virtualbox in windows. On the site it has an additional package for supporting some additional features

    I am trying to figure things out so I can get out dive once the driver comes

    My main concern is functionality. If I install Ubuntu full on a fresh drive, I get the full functions and features of the operating system.

    If I install in virtualbox , will I have any limitations? I believe that it's not directly connected to the GPU, and there an issue with usb support. Am I correct with the latest versions?

    Will I have any other restrictions or limitations?
     
    leadinmarketing, Sep 5, 2014 IP
  2. ByteChef

    ByteChef Active Member Affiliate Manager

    Messages:
    64
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    75
    #2
    Well if it is for PHP development then you can use XAMPP which installs PHP, Mysql and Apache on Windows itself. It is just a software.

    You should go for Virtualbox only if you have good amount of RAM, otherwise the performance is kind of sluggish.

    Installing on a different partition leads to multiple reboots and waste of time. These reboots are necessary as you might need to login into Windows for a particular task or using a particular software.

    So the best thing is to use XAMPP.
     
    ByteChef, Sep 5, 2014 IP
  3. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #3
    There can be issues with graphics as they are virtualized by VirtualBox. But you are using this as a development server, not for playing or developing video games, right? Then it is not an issue.

    You could install VirtualBox, download a Linux distribution of your choice (server or desktop, whichever you prefer as you can run a web server on either), and be up in running in less than an hour. At least try it out.
     
    billzo, Sep 6, 2014 IP
  4. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #4
    You're right. It won't hurt to try. I will do this first..... And nope. Don't see myself developing any games anytime soon (maybe 2 years)... I will install in virtualbox and use that hard drive as the storage for the virtual machine....

    By the way. Which Linux distro do you use?
     
    leadinmarketing, Sep 6, 2014 IP
  5. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #5
    Yea. Since I won't be using anything to graphic intensive, I will use virtualbox and install Ubuntu. And I have 16gb of good ram on a windows 8.1 with a 3.5 quad core i7. People at saying I should be fine..... So I will give it a try
     
    leadinmarketing, Sep 6, 2014 IP
  6. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #6
    Also. How much ram should I allocate to the VM? I have 16gb. On windows 8.1
     
    leadinmarketing, Sep 6, 2014 IP
  7. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #7
    What I did was allocate the same amount to the VPS as I had on my VPS. If you can, allocate for whatever you are developing for. A desktop Ubuntu will require more RAM than a "headless" server only install. On a server only install, 2 GB should be plenty. You can run the server, Apache and MySQL just fine with 2 GB of RAM. Same thing applies to the number of cores. I allocated 1 core when I had a 1 core VPS then changed to 2 cores when I got a 2 core VPS. As you are on a one CPU system with 4 cores, setting your virtual machine up to use 2 cores should be enough. I would not go more than that.

    You will be more than fine on that system. And using VirtualBox, you can also install other Linux distributions and see which one you like best. There are differences between Debian-derived distros like Ubuntu and RedHat-derived like CentOS. Most of the core Linux commands are the same, but the software available in the repos will be different and the package manager commands will be different as well. Using VirtualBox, you can install multiple distributions easily whereas it would be much more time consuming on a multi boot computer.

    If you ever want to know which Linux distribution is best, you are going to get wildly different answers. Each distribution has its advantages and disadvantages and annoying little quirks. One thing that most agree on is that Ubuntu tends to be more user friendly than CentOS. Also, if you are developing for the web, you may want to develop targeting the distribution and server setup you will be using. If you are hosting on a CentOS server running Apache 2.2.x and PHP 5.4.x, you may want to have your setup mimic your production server. Using VirtualBox, it is easy to clone a base installation and install different Apache and PHP versions on the cloned virtual machines.

    One more thing: It is helpful but not necessary to install the VirtualBox Guest Additions if you need to (I don't know if Ubuntu includes it by default now). And when you install your virtual machine, go into its settings for the Network virtualization and choose "Bridged Adapter". Then you can access your virtual machine from your host operating system using the virtual machine's IP address (192.x.x.x). When you log into your Linux virtual machine, type the command ifconfig and it will give you the address of the virtual Linux machine.
     
    Last edited: Sep 6, 2014
    billzo, Sep 6, 2014 IP
  8. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #8
    Looks like great advice. Thanx for taking the time to share your knowledge. I was definitely on the edge about which distro to start to develop in. Ubuntu=most used desktop distro. CentOS=most used server distro. Debian, RHEL, Fedora following in place after CentOS for web servers..... That's what my research has lead me to understand. All free OS's except rhel. And then, I started looking around at some of the dedicated server providers and all give you the option to install most of these, including Ubuntu. So then I did a quick search to see about the Ubuntu vs CentOS for a web server. And the mass opinion is that centOS is the way to go and Ubuntu is slightly slower. But I didn't do much research on this

    What's the general consensus. Is Ubuntu ready to be a quality web server.??? Doing a quick search of some of the well known dedicated server providers(media temple,lease web,100tb, and sine others) all of then seem to offer several different variations of Ubuntu Linux for their servers.

    Is there a general idea of where web servers are going? Is Ubuntu going to take over?
     
    leadinmarketing, Sep 6, 2014 IP
  9. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #9
    CentOS has a reputation for stability due to it being derived from RedHat. RedHat is one of the most if not the most popular distributions for corporate use (one of the reasons for that is because RedHat sells support). CentOS is also the only distribution supported by cPanel. So if a web host wants to use cPanel, they do not have much choice but to use CentOS. That is a factor in why it is the most popular distro used by hosting companies.

    CentOS also has a reputation for not supporting newer software for years. Debian/Ubuntu has a reputation for being more cutting edge, but that is really not saying much because as of April 2014, Ubuntu's official repos only had PHP 5.3 available (for Ubuntu 12.04). As of Ubuntu 14.04, it supports PHP 5.5 in its repos. So it is up-to-date in that respect. If you want to use Apache 2.4, PHP 5.5, it is not officially supported on CentOS. Though it may very well work, it will not be in the CentOS repos for some time. You would have to find a third-party repo you trust enough to install its software on your machine or compile your own which is a major hassle.

    I have read nothing to indicate that Ubuntu is slower than CentOS. And even if that were true, it really would not matter unless you were serving so many requests you were maxing out a server.

    Yes. Although Ubuntu has a customized setup of Apache which may frustrate you at first. Normally, when you enable a mod, you would remove a # sign from in front of a line in a config file then gracefully restart the server. Ubuntu/Debian derivatives have a little program accessed through the command line called a2enmod which you must use to enable or disable Apache mods. It is stupid beyond my ability to criticize what they did with that. CentOS, on the other hand, keeps Apache more basic but has a few of its own customizations, which I also do not like, such as sticking Apache files in different folders all over the hard drive. If you compile Apache yourself, it sticks most if not all of its files under one folder.

    As cPanel only supports CentOS, I do not think Ubuntu is going to take over. As I said, each distribution has its own quirks but I think I like Ubuntu best. It is faster than CentOS when it comes to supporting newer software and Ubuntu has a very active and helpful community over at askubuntu.com, ubuntuforums.org, and good documentation at help.ubuntu.com. So when you run into a roadblock, you can usually get help.
     
    billzo, Sep 7, 2014 IP
  10. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #10
    I see I see.... Think I may stick with Ubuntu. Will probably throw the CentOS in a VM to check it out though.... You seem very knowledgeable. Are you a server admin, or a programmer?
     
    leadinmarketing, Sep 8, 2014 IP
  11. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #11
    I make my own websites. Make a little bit of money from it. Not too much. I like to learn new things when I can find the time. Earlier this year it was Linux and VirtualBox.
     
    billzo, Sep 8, 2014 IP
  12. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #12
    Nice.... Have some sample sites I can checkout?
     
    leadinmarketing, Sep 8, 2014 IP