Franske ITC-2480 Lab 1: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
Line 5: Line 5:
# Connect to the ITCnet either by directly plugging into an ITCnet port in one of the ITC labs or by connecting to the VPN
# Connect to the ITCnet either by directly plugging into an ITCnet port in one of the ITC labs or by connecting to the VPN
# Open your browser (Firefox is suggested) to https://vsphere/ and click on the "Log in to vmWare vSphere Web Client" link on the right side of the page
# Open your browser (Firefox is suggested) to https://vsphere/ and click on the "Log in to vmWare vSphere Web Client" link on the right side of the page
# Do NOT login yet. If you have not worked with vmWare vSphere on your system before you should see a small black banner at the bottom of your screen with a link "Download the Client Integration Plug-in". Click that link to download the VM console access software. Install the plug-in for your browser and restart your browser. The next time you get to this login page you should not see the black banner at the bottom and you may proceed with logging in.
#* If you get an error in Firefox when trying to load the site about insecure DH settings you will need to open a new browser tab and visit the about:config and set the "security.ssl3.dhe_rsa_aes_128_sha" AND "security.ssl3.dhe_rsa_aes_256_sha" settings to FALSE (they are set to TRUE by default in current versions of Firefox).
# Do NOT login yet. If you have not worked with vmWare vSphere on your system before you should see a small black banner at the bottom of your screen with a link "Download the Client Integration Plug-in". Click that link to download the VM console access software. Install the plug-in for your browser and restart your browser. The next time you get to this login page you should not see the black banner at the bottom and you may proceed with logging in. You will see a browser banner in Firefox asking if the site has permission to run plugins which you will need to authorize. You should allow the site to run Flash, the browser integration, and the console integration plugins and to remember the setting.
# Enter your vmWare credentials (the same as your VPN credentials)
# Enter your vmWare credentials (the same as your VPN credentials)
# Click the "vCenter" tab on the left side of the screen just under "Home"
# Click the "vCenter" tab on the left side of the screen just under "Home"
# Click the "Hosts and Clusters" tab on the left side of the screen under "Inventory Trees"
# Click the "Hosts and Clusters" tab on the left side of the screen under "Inventory Trees"
# Expand the ITC Datacenter -> Cluster One -> "2480 SS14" resource pool by clicking the small black triangle to the left of it
# Expand the ITC Datacenter -> Cluster One -> "2480 FA15" resource pool by clicking the small black triangle to the left of it
# In the center panel of your screen find your virtual machine (which your instructor has given you an ID letter for) and click on it, for example, mine is "2480-BF". Do not use the second VM (like "2480-BF-II") yet.
# In the center panel of your screen find your virtual machine (which your instructor has given you an ID letter for) and click on it, for example, mine is "2480-BF". Do not use the second VM (like "2480-BF-II") yet.
# Right click on your virtual machine and select "Edit Settings..."
# Right click on your virtual machine and select "Edit Settings..."
Line 17: Line 18:
## Click the "Browse..." button to the right of the "CD/DVD Media" box.
## Click the "Browse..." button to the right of the "CD/DVD Media" box.
### Click the "SAN0 Shared" datastore and then double click on the "ISOs" folder.
### Click the "SAN0 Shared" datastore and then double click on the "ISOs" folder.
### Select the "debain-7.5.0-i385-netinst.iso" file and click the OK button. Make sure that you are using the i386 (32-bit) version for this course and not the amd64 version.
### Select the "debain-8.1.0-i386-netinst.iso" file and click the OK button. Make sure that you are using the i386 (32-bit) version for this course and not the amd64 version.
## Click the OK button again to close the settings dialog box.
## Click the OK button again to close the settings dialog box.
# Your VM is now setup and ready to be installed.
# Your VM is now setup and ready to be installed.

Revision as of 22:19, 24 August 2015

Introduction

In this lab you will install the latest version of Debian Linux in a virtual machine, learn how to login and check the IP address of the system, and learn to remotely access the system with SSH and SFTP.

VM Setup

  1. Connect to the ITCnet either by directly plugging into an ITCnet port in one of the ITC labs or by connecting to the VPN
  2. Open your browser (Firefox is suggested) to https://vsphere/ and click on the "Log in to vmWare vSphere Web Client" link on the right side of the page
    • If you get an error in Firefox when trying to load the site about insecure DH settings you will need to open a new browser tab and visit the about:config and set the "security.ssl3.dhe_rsa_aes_128_sha" AND "security.ssl3.dhe_rsa_aes_256_sha" settings to FALSE (they are set to TRUE by default in current versions of Firefox).
  3. Do NOT login yet. If you have not worked with vmWare vSphere on your system before you should see a small black banner at the bottom of your screen with a link "Download the Client Integration Plug-in". Click that link to download the VM console access software. Install the plug-in for your browser and restart your browser. The next time you get to this login page you should not see the black banner at the bottom and you may proceed with logging in. You will see a browser banner in Firefox asking if the site has permission to run plugins which you will need to authorize. You should allow the site to run Flash, the browser integration, and the console integration plugins and to remember the setting.
  4. Enter your vmWare credentials (the same as your VPN credentials)
  5. Click the "vCenter" tab on the left side of the screen just under "Home"
  6. Click the "Hosts and Clusters" tab on the left side of the screen under "Inventory Trees"
  7. Expand the ITC Datacenter -> Cluster One -> "2480 FA15" resource pool by clicking the small black triangle to the left of it
  8. In the center panel of your screen find your virtual machine (which your instructor has given you an ID letter for) and click on it, for example, mine is "2480-BF". Do not use the second VM (like "2480-BF-II") yet.
  9. Right click on your virtual machine and select "Edit Settings..."
  10. When the settings panel loads click the small grey triangle to the left of "CD/DVD drive 1"
    1. Ensure the CD/DVD drive is set to "Datastore ISO File"
    2. Ensure the "Connect At Power On" box is checked
    3. Click the "Browse..." button to the right of the "CD/DVD Media" box.
      1. Click the "SAN0 Shared" datastore and then double click on the "ISOs" folder.
      2. Select the "debain-8.1.0-i386-netinst.iso" file and click the OK button. Make sure that you are using the i386 (32-bit) version for this course and not the amd64 version.
    4. Click the OK button again to close the settings dialog box.
  11. Your VM is now setup and ready to be installed.

Debian Linux Installation

Note: These instructions assume that you have already installed the vSphere Client Integration Plugin in your browser. See above for information on downloading and installing this plugin.

  1. Right-click on your virtual machine and select "Power On"
  2. Click OK on the "Power On Recommendations" dialog box
  3. Right-click on your virtual machine and select "Open Console" which will open a local terminal to the VM in a new window.
  4. From the "Installer Boot Menu" choose "Install" not "Graphical Install" or one of the other choices
  5. Select "English" as the language, "United States" as your location, and "American English" as the keymap.
  6. Set eth0 as your primary network interface.
  7. Set a hostname for the system the same as your assigned machine name (e.g. 2480-BF)
  8. Set the domain name to "localhost"
  9. Set the root password to something you will NOT FORGET, this is the administrator account, "cisco" might be a good choice for our purposes though that would not be secure for a system directly accessible from the Internet (we are protected by a firewall which you are bypassing via the VPN connection)
  10. Create a new user account using your first name (all lowercase) as the username and another password you will not forget
  11. Select your timezone
  12. Choose "Guided - Use entire disk" as the partitioning method and select the "sda" drive and "All files in one partition" as the partitioning scheme and then write the changes to the disk and confirm it.
  13. You want to select a mirror located close to you with good speed. Because your VM is actually running from the campus and is connected to the campus Internet connection a good option is "debian.cites.illinois.edu" with no http proxy.
  14. Choose whether you want to participate in the package usage survey, for our purposes either choice is just fine.
  15. On the software selection screen UNSELECT "Debian desktop environment" and "Print server" and make sure that "SSH server" and "Standard system utilities" are the only two selected options. Use the space bar to select and unselect and the tab key to move to the continue button.
  16. Choose yes to install GRUB to the master boot record
  17. When the installation is complete you can select continue to "eject" the virtual CD and reboot into the new install

Installing sudo and checking your IP address

  1. Login through the local console with your root account and password (username root, password as set during the installation)
  2. For security purposes it is usually the case that you do not want to log in as the root user. Instead, best practice is to log in as a standard user and then execute specific commands that require root access with administrative privileges through the "sudo" program. The sudo program is not installed by default so after you have logged in to the root account enter "apt-get update" and press enter which will update the list of software available for installation and then "apt-get install sudo" and press enter to install the sudo software.
  3. We now need to add our standard user account to the group which is allowed to have administrative access to do this enter the command "adduser <username> sudo" and press enter, replacing <username> with the name of your standard user account (set during the setup process). We'll learn more about these commands later in the course.
  4. Reboot your system using the "shutdown -r now" command to apply the changes
  5. Log in as your standard user account
  6. Use the "sudo ifconfig" command to check the IP address of your system, you will need to enter in your password again when you run this command. The IP address should be something like 172.17.50.xxx and be on the eth0 adapter

Logging in to a remote terminal

A faster way to interact with your system is not through the vmWare local console but through a remote SSH session. For our purposes you will always need to connect to the ITCnet VPN before doing this so that you have access to the 172.17.50.0 network.

  1. Assuming you are running Windows, install the PuTTY software on your home PC from this website.
  2. Run the PuTTY software on your computer and enter in the IP address of your VM in the "Host Name" box and click the "Open" button.
  3. Click Yes to save the host key on your system
  4. Enter the standard username and password for your Linux system to connect.
  5. You should receive a prompt just like the one you had on the local vmWare console.
  6. Type "exit" to close the connection while leaving your VM running.

Remote File Transfer

The easiest way to transfer files to and from your VM is with SFTP software. For our purposes you will always need to connect to the ITCnet VPN before doing this so that you have access to the 172.17.50.0 network.

  1. Install the FileZilla client software on your home PC from this website
  2. Run FileZilla and use the Quick Connect bar at the top of the screen to access your system. Enter the IP address of your Linux system in the "Host:" box, your standard username and password in the appropriate boxes and "22" in the "Port:" box and click the "Quickconnect" button.
  3. You should see some connection text scroll on the top of the screen and some files on the right side of the screen now such as ".bashrc" and ".profile". The right side of the screen is the drive on your Linux system and the left side of the screen is the drive on your home system. Files and folders can be dragged between the two sides to transfer them back and forth.
  4. Close the FileZilla software to disconnect.

Safely Shutdown

We will normally leave our VM running but it is important that you know how to shutdown a Linux system correctly so this time we'll turn it off.

  1. Connect in to your system using the remote SSH console method explained above.
  2. Run the "sudo shutdown -h now" command to safely shutdown the system. You should soon get a message that PuTTY has lost it's connection. Click OK and then you can close the PuTTY window.
  3. Now would be a good time to make sure that you have disconnected the virtual CD so that your system will not try to boot into the installer again.
    1. Right click on your virtual machine and select "Edit Settings..."
    2. When the settings panel loads click the small grey triangle to the left of "CD/DVD drive 1"
      1. Ensure the CD/DVD drive is set to "Datastore ISO File"
      2. Ensure the "Connect At Power On" box is NOT checked
  4. You can now close any of the vmWare browser windows you may still have open.