IT 341 Introduction to System Administration Project I Installing Ubuntu Server on an Virtual Machine Here we create a new virtual machine and install Ubuntu 16.04 LTS Server on it. In this instance, we follow most of the defaults, meaning that the virtual network spoofs the identity of your server to be that of the host (the real) computer. This is how most home networks work; a router attached to the internet service provider (ISP) uses Network Address Translation to fool the ISP into thinking all of the computers on your local network are actually just one, by rewriting the packets going out through the router with the single (spoofed) MAC address, keeping track of this in a table, and then using this table when packets come back from the ISP to rewrite the destination MAC addresses for the local computers the packets are meant for. Please read instructions in full before proceeding! 1. Check the Ethernet outlets next to your host (it2x): If the CAT5 cable is plugged into the right-hand-side (RHS) CAT5 outlet associated with your host then the computer is connected to it20, an Ubuntu server that acts as a router for the network it.cs.umb.edu If the CAT5 cable is plugged into the left-hand-side (LHS) CAT5 outlet the computer is directly connected to the cs.umb.edu network. Make sure that the CAT 5 network cable is in the RHS drop. 2. Boot up your computer and log in using your Windows login. If you do not have a Windows login, then please notify your professor 3. We want to install a virtual machine running Ubuntu 16.04 LTS Server. (See also, end-of-report questions.) Fortunately, we have iso images on our computers so this will run quickly. First, invoke Start -> All Programs - > VMWare -> VMware Workstation. There may be a shortcut for this on the desktop. (If you are unable to get VMWare Workstation working, then use VMWare Player, for now.) 4. Create a new Virtual Machine. A Typical (recommended) installation should be sufficient, so click File > New Virtual Machine. Make sure the radio button for
Typical is highlighted then click the Next> button. 5. Now we have a choice. We can either: (a) let the installation proceed on its own after giving a few parameters; this is suitable if you ve installed Ubuntu before. Or, (b) Install Ubuntu step-by-step; this is suitable if you are installing Ubuntu for the first time or just want to refresh your memory. a. Here, we let installation proceed on its own after providing a few parameters. i. Instead of installing the operating system later, we are going to install from an ISO image, which we have already copied over to our host system. Choose "Installer disc image file (ISO):" and then Browse to (from File System) C:\OS ISOs\Linux\Ubuntu\Server\ubuntu-16.04.1-server-amd64.iso Highlight this file, choose Open and then Next. ii. Now we are given an opportunity to name a user with administrative privileges. Use the name sysadmin (both as the Full name and as the User name.) For a password, choose the name you will use for the machine such as itvm2x-yz 1. This is important because, if you are out sick, we may require quick access to your system. Click Next. iii. Now, for a virtual machine name, we want (instead of the default "Ubuntu") a name that is meaningful to our network 2. Choose the name itvm2x-yz where it2x is the name of your host y is your section number And z is your group ID. 1 Where 2 represe ts the a hi e ou are o, represe ts our se tio, a d z represe ts our group, either a or as assig ed our professor. 2 There is a pro le with this whi h we will fi later.
For example, if you are sitting at host it25 (The host name is labeled at the bottom of your flat screen) in Professor Bird's section 2 and group a, then use the name itvm25-2a. iv. There will exist a subdirectory of c:/it341 with the name sectionyz where y is your section number and z is your group ID. The location where the virtual machine image will be stored is in the directory c:/it341/sectionyz so browse to that location and hit the OK button then click the Next button. You may get a prompt about the location containing another virtual machine. As long as you are following directions for naming your machine this will not be a problem so click the continue button. For example, if your team name is "itvm25-2a", then your VM will be in the directory c:/it341/section2a of machine it25 If you have more than two groups using a machine, please see me! v. Go along with the default disk size and "Split virtual disk into multiple files". 20 GB should be more than sufficient. Choose Next. vi. We needn't customize any hardware. If we want to later, it is very easy as long as our virtual machine has been powered down. Click Finish. vii. Now just sit awhile. Your Ubuntu server installation will proceed very quickly -- almost too quickly to watch. You can always install Ubuntu Server (or Ubuntu Desktop) at home should you want to step through the installation process. Now might be a good time to update your administrator's log, writing down what you have been doing
and writing about any problems you have encountered. This will help you if you have to re-install, and it will help you to write the progress report for this first project. Make sure to wait until the VMware tools are installed and you are looking at a (virtual) screen with: Ubuntu 16.04.1 LTS ubuntu tty1 ubuntu login: viii. If you look at the login screen you will see that the machine is still named "ubuntu", so you will need to fix that. Log in to the machine using the username and password you created, change the directory to /etc and edit the file hostname in the /etc directory. Replace "ubuntu" with the your machine name i.e. itvm2x-yz and save the file. Now log out and power down then power up the VM and you should see this login prompt with the correct machine name where 2x represents your hardware id, y represents your section, and z represents your group ID. Ubuntu 16.04.1 LTS itvm2x-yz tty1 itvm2x-yz login: ix. Go on to step 6. b. Here we will first create a VM and then (later) install Ubuntu, so that we may proceed step by step. i. Choose I will install the operating system later. Then, click Next. ii. For a Guest Operating System, choose (2) Linux. For a Version, choose Ubuntu. Click Next. iii. Now, for a virtual machine name, we want (instead of
the default "Ubuntu") a name that is meaningful to our network. Choose the name itvm2x-yz where: iv. it2x is the name of your host, y is your section number, And z is your group ID. For example, if you are sitting at host it25 (The host name is labeled at the bottom of your flat screen) in section 2 and group a, then use the name itvm25-2a. There exists a subdirectory of c:/it341 with the name sectionyz where y is your section number and z is your group ID. The location where the virtual machine image will be stored is in the directory c:/it341/sectionyz so browse to that location and hit the OK button then click the Next button. You may get a prompt about the location containing another virtual machine. As long as you are following directions for naming your machine this will not be a problem so click the continue button. For example, if your team name is "itvm25-2a", then your VM will be in the directory c:/it341/section2a of machine it25 If you have more than two groups using a machine, please see me! v. Go along with the default disk size and "Split virtual disk into multiple files". 20 GB should be more than sufficient. Choose Next. vi. We needn't customize any hardware. If we want to later, it is very easy as long as our virtual machine has been powered down. Click Finish. vii. Now, under Devices, you will see that the CD/DVD drive is associated with the host s drive /dev/sr0. We want to
change this temporarily, so: 1. Double-click on CD/DVD. This will bring us to a panel where we can (temporarily) change the association so that we can install Ubuntu Server from an iso image. 2. Choose Use ISO image; and then Browse to (from File System) C:\OS ISOs\Linux\Ubuntu\Server\ubuntu-16.04.1-server-amd64.iso 3. Once ubuntu-16.04.1-server-amd64.iso is highlighted, choose Open, and then click OK. 4. Now, our (virtual) CD/DVD reader is associated with the iso image for Ubuntu Sever. viii. Now choose Power on this virtual machine. You will be led, step-by-step, through the installation. ix. To give control of your keyboard and mouse over to the virtual machine, click on its screen. (Whenever you want to give control back to your host, press Ctrl-Alt. A reminder of this simple sequence is on the lower-left corner of your VMware Workstation window.) x. For a Language, choose English and hit Enter. xi. Choose Install Ubuntu Server, and hit Enter. xii. For a language, choose English, and hit Enter. xiii. For a country, choose United States, and hit Enter. xiv. We don t want Ubuntu to choose a keyboard layout, so choose No and hit Enter. xv. For Origin of the keyboard, choose English (US) and hit Enter. xvi. For a Keyboard layout, choose English (US) and hit Enter. xvii. Now, for a hostname, we want (instead of the default
"ubuntu") a name that is meaningful to our network. Choose the name itvm2x-yz where it2x is the name of your host, y is your section number, And z is your group ID. For example, if you are sitting at host it25 (The host name is labeled at the bottom of your flat screen) in section 2 and group a, then use the name itvm25-2a. Erase ubuntu, replace it with the appropriate name, tab to <Continue> and hit Enter. xviii. For a full name for the new user, choose sysadmin. Tab to continue and hit Enter. xix. Use sysadmin for the username, too. Tab to continue and Enter. xx. For a password, choose the name you used for the machine such as itvm2x-yz. Continue and Enter. xxi. Again. xxii. We don t want to encrypt our home directory, so choose No and Enter. xxiii. We are in the same time zone as New York, so choose Yes and hit Enter. xxiv. Use the up-arrow to choose Guided use entire disk and hit Enter. Do not use an LVM! (See end-of-report questions.) xxv. Go with the default disk to partition hey, it s just a virtual disk and hit Enter. xxvi. Use your left-arrow to move to <Yes>, as we want to write these changes to the disk, and hit Enter. Partitioning will commence and the base system is loaded. xxvii. There is no proxy so just leave it blank and hit Enter.
xxxii. 6. Log in as sysadmin. xxviii. Choose No automatic updates, and hit Enter. xxix. We won t install any additional software components now; we ll install this stuff later at the command line. So tab to Continue and Enter. xxx. We want to install the GRUB boot loader (it s cool), so choose Yes and Enter. xxxi. Now your installation should finish. Continue and Enter. The system will reboot. 1. Ctrl-Alt to return focus to the host. 2. Right-click on itvm2x-yz in the sidebar and choose Power Off; confirm that you want to Power Off. 3. Double-click on CD/DVD. This will bring us to a panel where we can) change the association back. 4. Choose Use a physical drive and choose Auto detect for the device. Save. 5. Now we are ready to restart the virtual machine. Choose Power on this Virtual Machine. If asked and you wish, install the VMware Tools package inside of this machine.) You will see: Ubuntu 16.04.1 LTS itvm2x-yz tty1 itvm2x-yz login: 7. Let s see if we can reach the outside: ping www.yahoo.com Quit the command; you know how to do this. Be sure to record success or failure in your lab report. 8. We want to install some software; but it s always a good idea to do an update of your catalog before doing so. Now, to do system stuff, you will have to do so as a
sudo-er. First, we ll do an update. sudo apt-get update Then we will do an upgrade. sudo apt-get upgrade apt-get is the software maintenance application. Because you are running as sudo, you will be asked for sysadmin s password (at least this first time). You will want to read up on sudo and apt-get. See also, the end-of-report questions. 9. Then install both the ssh server and the ssh client: sudo apt-get install openssh-server (You will want to answer Y.) Notice the server is automatically started up. Notice that the client is already installed; no bother. 10. OK, write about all of this in your lab report entries. And be prepared to write about it in any narrative that you are asked to hand in or exam questions. 11. Now you can log out. logout 12. And, now you can power off the machine (Ctrl-Alt to return focus to the host, right-click on itvm2x-yz in the Sidebar, and choose Power Off. 13. There you go, you have installed Ubuntu Server on a Virtual Machine.
14. Notice you can take a Snapshot of your VM at any time. Where was it saved? Figure this out and write about it. You can change this, or you can copy it to a memory stick if you have one. Then you won t lose your work if you mess up! Write about this. Questions: 1. Why LTS? What is LTS? Please explain. 2. What is an LVM? Please explain. 3. Please explain what sudo is, how it is used, and why we need it. 4. Please explain what apt-get is and why we use it. 5. Please explain what snapshots are and why they are useful to us.