Should you set up a local environment or should you use the IDE? To find out, read this article first: http://help.learn.co/the-learn-ide/the-basics-of-the-learn-ide/using-the-ide-versus-a-local-environment
If you are taking the Full Stack Web Development program with instructional support and want support from technical coaches when you have envronment issues (as opposed to coding isasues), this is the only local environment setup that we can provide support for.
This article walks through the steps for installing the Linux operating system on top of your current operating system. Why might you want to do this? Because it is currently not easy to install a development environment for our curriculum on a Windows machine or any machine that may already have certain settings. For this reason, we suggest installing a fresh copy of UbuntuMATE so that we know the starting state of the environment for ease of setup!
Note: Feel free to use the latest version of VirtualBox and feel free to upgrade VirtualBox. If an upgrade causes and issue, just go ahead and roll back to a previous version.
Step 1: Download UbuntuMate (LTS version). You'll need either the 64-bit or 32-bit versions (don't worry about PowerPC or Raspberry Pi). If you're not sure check here. This is a large file (around 1.7GB) and may take a while to download. Note: You only need to download this file. Trying to open it / install it will probably give you an error like this:
Step 2: Download and install VirtualBox for your operating system. You'll be looking for the links that say things like "Windows host" (for windows) or "OS X host" (for mac). For this file, please make sure you do install it.
- Once VirtualBox is installed, open the application and select New:
- Name your virtual machine (this is just so you can easily tell which machine is which if you setup more than one), set Type: Linux and Version: Ubuntu (XX-bit) - where XX is the version you had previously selected:
- On the next screen, select how much memory you would like to allocate to the virtual box. We recommend using at a minimum 2048mb. 4096mb would be better. If at all possible, stay out of the orange and red range on the slider.
- Next we need to create a storage space for your VirtualBox. Select "Create a virtual hard disk now":
- Next select to use VDI:
- You can now select the amount of space this will take up. We recommend using "Dynamically allocated":
- Next select the maximum amount of space you wish to allow your virtual drive to expand to. The operating system itself will take up 8GB. I would not select a size smaller than 15GB as we will need to install extra tools. (You can use the slider, or manually enter the number in the box on the right)
Step 3: We can now see our created VirtualBox. Before we start it, we need to setup where to install Ubuntu from. Select our VirtualBox and then click the Settings option:
- Now select Storage from the top, then "Empty" right below "Controller: IDE" (Note: your CD icon and the word "Empty" may be under another heading, this is OK), and then the CD icon on the right:
- Select to "Choose Virtual Optical Disk File...". This will open up a window for you to select a file from your computer. Navigate to where you initially downloaded UbuntuMate to and select that file (it should be a
- Simply press OK once you have done this to get back to the main VirtualBox screen. Now it's time to start our virtual machine:
- Ubuntu will now be running in a window on your computer! Note: The screen is tiny and you'll notice even if you resize it, you are not making the Ubuntu screen any larger. Don't worry, we will solve this once Ubuntu is fully installed. :)You are not done yet though as this is just a 'live CD' meaning that nothing you save will actually be saved. This is just like a 'testing mode' that allows you to play around with Ubuntu first if you wanted to before installing. We already think this is a fantastic option for a developer, so continue along to install UbunutMATE.
- Note: The screen is tiny and you'll notice even if you resize it, you are not making the Ubuntu screen any larger. Don't worry, we will solve this once Ubuntu is fully installed. :)
Step 4: You are not done yet though as this is just a 'live CD' meaning that nothing you save will actually be saved. This is just like a 'testing mode' that allows you to play around with Ubuntu first if you wanted to before installing. We already think this is a fantastic option for a developer, so continue along to install UbunutMATE.
You might see this screen:
or you might see this screen:
- We recommend installing updates and additional tools when installing Ubuntu MATE:
- When asked about installation type, select "Erase disk and install Ubuntu MATE". This will not erase your current OS, it is using the space you allotted to this virtual machine several steps ago:
- You may get a box asking you to confirm. Go ahead and click "Continue" here:
- Next you'll have to select some basic setup stuff (images not shown) like time zone, language (note, you may have to drag the install window inside Ubuntu around to see select continue for some of these)
- You'll have a few more screens to setup username (do not create a username with spaces in it!), password.... I would recommend not enabling auto login or encryption. Once you have gone through all these settings, the install will start. This may take a while, so be patient:
- When you're all done, you'll get a message. Select "Restart Now":
- If you get a message about pressing "Enter" after removing installation medium, simply press "Enter":
- The screen will re-load with your installed copy of Ubuntu Mate.
- If a message pops up about capturing the mouse and keyboard, it's just checking to make sure that when you move the mouse and type, you want it to be captured in VirtualBox. Take note of the Host Key and what to press to escape this in case you need it later! Besides that, you should be all set to press OK/Capture. Note: it is not a problem if you do not see this message, this is simply and explanation if you do.
- Now you can log in:
Step 5: The first thing to do is fix the screen size. You should see an option outside of the virtual machine (along the VirtualBox menu bar) that says Devices. Select that drop down and then select "Insert Guest Additions CD image...". Note, you will only see this bar on Mac if your VirtualMachine was the last thing that you had clicked on, if you click your host desktop (Mac, Windows...) background, you may loose this menu.
- You will now see a CD and a box pop up inside your virtual machine. Select OK to run the script and then Run when it asks if it's OK to do so:
- If you got the following error, it simply means that the virtual CD is already inserted. You can close the error, double click on the CD on the desktop, and then double click on
autorun.sh. In either case, continue onto the next step.
- Type in your password and and follow prompts to run as needed. Once this completes your screen should properly resize! You may need to stretch the screen around a bit or go into full screen mode to get this to work. You may also need to power off and power back up the virtual box (use the power icon in the top right corner of the virtual machine and select shutdown if needed).
- You have now completed the Ubuntu MATE VirtualBox installation! Now it's time to install the development tools needed to program!
Step 6: Open up the MATE Terminal (Note: you may want to right click on this and select "Add this launcher to panel" for quick access later).
Now that the rest of the work will be happening inside your Virtual Machine, it may be easier to open this page up inside of your virtual machine to copy and paste it in. Without enabling more settings, it is not possible to copy in your host operating system and then paste into your virtual machine. (Note: to use copy paste shortcuts inside terminal you'll need to do
ctrl + shift + cand
ctrl + shift + v).
Step 6: Set your terminal to be a login shell by following these instructions. DO NOT SKIP THIS STEP!
- Once you have set your terminal as a login shell, make sure to close it and re-open it. You can test that it is now a login shell by typing in
shopt -q login_shelland pressing enter. If you get get a new line and no message, it's working! (Note: If you have a
.bash_profileon your host operating system, this is a different one. This
.bash_profileis internal to your new virtual machines.)
Step 7: For the next step, we'll need to install
sudo apt-get install curl : (Note: when you type your password into the terminal, no texts or dots show up, but you're still typing it in)
- Next type in the command
curl https://raw.githubusercontent.com/flatiron-school/local-setup/master/linux-setup | bashand press enter to install all the necessary development tools (Note: This may take a while to run).
- Once this script is done running, all the core dev tools are installed! Close your terminal and re-open it to make sure everything is loaded properly.
Step 8: Head on over to Manual Environment Set up (on your virtual machine, NOT on your local machine) and follow steps 9 - 16 to finish up setup.
- You'll probably also want to download Atom and Google Chrome. From here on out, you can go through and run labs on a local environment. Here are some help center article that might be helpful:
- - How To Manually Open A Lab
- - How To Manually Submit A Lab
- If you run into any issues when setting this up, please use Ask A Question for help and be prepared with your current error message and where you are in the instructions.