========================================= Install Guide for CS121: Download version ========================================= This guide provides instructions on how to set up the VirtualBox software and download the VirtualBox image that you will need to do the assignments in this course. These are the instructions we are using during our Install Party on Sunday, September 27, 2015. `OS X <#osx>`__ \| `Windows <#windows>`__ [Updated: 9/26 to use newest version of VirtualBox.] OS X ---- #. Go to ``_ and click on the link labelled ``amd64`` next to ``VirtualBox 5.0.4 for OS X hosts`` to download the file ``VirtualBox-5.0.4-102546-OSX.dmg``. #. Go to the Finder. You may have a new window open, titled "VirtualBox". It looks like the screenshot `here `_. a. If not, choose from the menubar Go > Downloads. You should have a file in this window named ``VirtualBox-5.0.4-102546-OSX.dmg``. Open this file. The window titled "VirtualBox" should now appear. b. If your web browser is configured to use a different destination for downloaded files, go to that location instead. 3. Press Continue when presented with a security message. #. Press Continue again on the introductory screen. #. Press the Install button to accept the standard installation. #. Enter the password for your account on your computer. #. Press Close once the installation completes. #. In your web browser, go to ``https://mit.cs.uchicago.edu/`` and log in with your CNet ID and password. #. In your web browser, go to ``http://dani.cs.uchicago.edu/cmsc121/`` and download the file named ``cs121-aut-15-final.ova``. This file is large (multi-GB) and contains a copy of the Linux operating system and the software we will use for the course. This download may take a considerable amount of time. Please use the feature of your web browser that allows you to monitor download progress, and do not proceed until the file is fully downloaded. #. Go to the Finder and choose Go > Downloads. You should have a file in this window named ``cs121-aut-15-final.ova.`` If your web browser is configured to use a different destination for downloaded files, go to that location instead. #. Open the file named ``cs121-aut-15-final.ova``. This step will open a VirtualBox window and a prompt. Within this prompt, click Import. This process may take as much as 5-10 minutes. #. Click Import. This process may take as much as 5-10 minutes. #. Click Start. #. Log in. The username is ``student`` and password is ``uccs``. #. An empty desktop should appear, with a dock on the left. At the top, you may see one or more messages with Xs to dismiss them on the right. Dismiss these so that you can see "ubuntu" at the top left of the display-within-a-window. #. Click on the terminal icon, which is fourth from the top in the dock and looks like a screen. You now have a Linux command line window open. #. You can switch back and forth between programs running on your computer, and programs running within the VirtualBox window. But, you should do all your work (such as writing code) within the VirtualBox environment so that the files are in the right place. You can do other course-related tasks using your standard applications (e.g. using a web browser to visit Piazza). You can copy text from your browser on the OSX-side in the usual way (``Command-c``) and then paste it in the terminal window in the VM using ``Shift-Control-v``. Make sure you have selected the terminal window on the VM (just click on it) before you do the paste. #. Run the following command in the terminal window. .. code:: update-cs-software You will be asked for the password for the ``student`` account when you run this command. The password is ``uccs``. Note that you will not see any characters echoed back as you type the password. #. You are now ready to set up your Git repository. Git is a software version constrol system that we will be using for labs and programming assignments. Run the following commands: .. code:: cd cs-setup-script cs121-aut-15 You will be asked for your username, which is just your CNetID, and your password, which is just your CNet password. You will then be asked which repository you wish to set up, choose option 1. If the command is successful, you will see text of the form: .. code:: Setting up your Git repository... Your git repository has been created in /home/student/cs121-aut-15-username Setting up chisubmit... chisubmit has been set up. You can use chisubmit commands inside /home/student/cs121-aut-15-username where ``username`` has been replaced by your CNetID. #. If you want to suspend your VirtualBox, click the red close button in the top left of the window. We recommend choosing "Save the machine state". That way, you can always pick up where you left off. #. When you want to resume a session, relaunch the VirtualBox application (in your Applications folder. #. If you back up your computer, you may want to exclude the large files maintained by VirtualBox from your backups. In particular, when you use your VirtualBox, the state of the machine is saved to your disk, and a large (multi-GB) file is changed each time. This can result in very large backups with each backup saving another copy of this large file due to the changes. Exclude the files that you downloaded, and the folder named "VirtualBox VMs" within your home folder if you wish to avoid this problem. #. We recommend moving both ``VirtualBox-5.0.4-102546-OSX.dmg`` and ``cs121-aut-15-final.ova`` from your ``Downloads`` folder to the trash. You will not need them again. Windows ------- We will be installing VirtualBox version 5.0.2 rc102096. If you have VirtualBox installed already and it is not this exact version (or you are unsure), please uninstall your current version of VirtualBox before proceeding. #. Use a web browser to go to ``_ and click on the link labelled ``x86/amd64`` next to the label ``VirtualBox 5.0.4 for Windows hosts`` to download a file named ``VirtualBox-5.0.4-102546-Win.exe``. #. Now right-click (do NOT double-click) this file and select "Run as Administrator". If you do not see the "Run as Administrator" option because you are on an older version of Windows, you may resort to double-clicking the executable. Note that if you are not on an administrator account on your machine, your VirtualBox installation may fail. #. If you are presented with a UAC prompt (aka: the screen goes dark and you are asked "are you sure you want to run X?"), select ``Yes`` and accept the prompt. Do not select ``No``/``Cancel``/``Reject``. #. You will now be presented with the installer window. Press ``Next``. On the next screen, accept the defaults by pressing ``Next`` again. You can customize these settings if you feel you need to, but we do not offer troubleshooting help should you fail to install your VM correctly due to tinkering. Keep pressing ``Next`` until you cannot press ``Next`` anymore. The installation will begin at this point and may take several minutes to complete. #. You may be asked to accept the installation of a new network adapter/interface or setting up a new network connection. In case of the former, you should accept the new network adapter/interface by pressing ``Yes``/``Accept``/``Okay``. In case of the latter and a new window pops up, you should indicate that it is a public connection and click ``Okay``/``Close``. #. When the installation is complete, you will be presented with a shiny new VirtualBox window. Minimize/close this window and return to the web browser you had open earlier. #. In your web browser, go to ``https://mit.cs.uchicago.edu/`` and log in with your CNet ID and password. #. In your web browser, go to ``_ and down load the file named `` cs121-aut-15-final.ova``. This will download a large (multi-GB) file which contains a copy of the Linux operating system and the software we will use for the course. This download may take a considerable amount of time. Please use the feature of your web browser that allows you to monitor download progress, and do not proceed until the file is fully downloaded. #. Open the file ``cs121-aut-15-final.ova`` via double-click. #. Give it a few moments. You will eventually be presented with your VirtualBox window and a prompt. Within this prompt, click ``Import``. This process may take as much as 5-10 minutes. #. Once the previous step is complete, you should see your VirtualBox window. On the left, you should see a VM named ``CMSC121-a15``. Click this VM once and then click the ``Start`` button at the top of the window. You will now boot into the VM. Be patient as it may take a few moments for anything to happen. Do not close or otherwise tinker with VirtualBox at this point. #. Once your VM boots up, proceed to log in. The username is ``student`` and password is ``uccs``. #. An empty desktop should appear, with a dock on the left. At the top, you may see one or more messages with Xs to dismiss them on the right. Dismiss these so that you can see "ubuntu" at the top left of the display-within-a-window. #. Click on the terminal icon, which is fourth from the top in the dock and looks like a screen. You now have a Linux command line window open. #. You can switch back and forth between programs running on your computer, and programs running within the VirtualBox window. But, you should do all your work (such as writing code) within the VirtualBox environment so that the files are in the right place. You can do other course-related tasks using your standard applications (e.g. using a web browser to visit Piazza). You can copy text from your browser on the Windows-side in the usual way (``Command-c``) and then paste it in the terminal window in the VM using ``Control-v``. Make sure you have selected the terminal window on the VM (just click on it) before you do the paste. #. Run the following command in the terminal window. .. code:: update-cs-software You will be asked for the password for the ``student`` account when you run this command. The password is ``uccs``. Note that you will not see any characters echoed back as you type the password. #. You are now ready to set up your Git repository. Git is a software version constrol system that we will be using for labs and programming assignments. Run the following commands: .. code:: cd cs-setup-script cs121-aut-15 You will be asked for your username, which is just your CNetID, and your password, which is just your CNet password. You will then be asked which repository you wish to set up, choose option 1. If the command is successful, you will see text of the form: .. code:: Setting up your Git repository... Your git repository has been created in /home/student/cs121-aut-15-username Setting up chisubmit... chisubmit has been set up. You can use chisubmit commands inside /home/student/cs121-aut-15-username where ``username`` has been replaced by your CNetID. #. If you want to suspend your VirtualBox, click the red close button in the top left of the window. We recommend choosing "Save the machine state". That way, you can always pick up where you left off. #. When you want to resume a session, relaunch the VirtualBox application (in your Applications folder. Do not re-open either of the files you previously downloaded) and click Start. #. If you back up your computer, you may want to exclude the large files maintained by VirtualBox from your backups. In particular, when you use your VirtualBox, the state of the machine is saved to your disk, and a large (multi-GB) file is changed each time. This can result in very large backups with each backup saving another copy of this large file due to the changes. Exclude the files that you downloaded, and the folder named "VirtualBox VMs" within your home folder if you wish to avoid this problem.