Franske ITC-2480 Lab 1
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
- 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
- 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.
- 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 "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
- 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..."
- When the settings panel loads click the small grey triangle to the left of "CD/DVD drive 1"
- Ensure the CD/DVD drive is set to "Datastore ISO File"
- Ensure the "Connect At Power On" box is checked
- 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.
- 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.
- Click the OK button again to close the settings dialog box.
- 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.
- Right-click on your virtual machine and select "Power On"
- Click OK on the "Power On Recommendations" dialog box
- Right-click on your virtual machine and select "Open Console" which will open a local terminal to the VM in a new window.
- From the "Installer Boot Menu" choose "Install" not "Graphical Install" or one of the other choices
- Select "English" as the language, "United States" as your location, and "American English" as the keymap.
- Set eth0 as your primary network interface.
- Set a hostname for the system the same as your assigned machine name (e.g. 2480-BF)
- Set the domain name to "localhost"
- 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)
- Create a new user account using your first name (all lowercase) as the username and another password you will not forget
- Select your timezone
- 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.
- 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 "mirror.anl.gov" with no http proxy.
- Choose whether you want to participate in the package usage survey, for our purposes either choice is just fine.
- 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.
- Choose yes to install GRUB to the master boot record
- 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
- Login through the local console with your root account and password (username root, password as set during the installation)
- 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.
- 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.
- Reboot your system using the "shutdown -r now" command to apply the changes
- Log in as your standard user account
- 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.
- Assuming you are running Windows, install the PuTTY software on your home PC from this website.
- 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.
- Click Yes to save the host key on your system
- Enter the standard username and password for your Linux system to connect.
- You should receive a prompt just like the one you had on the local vmWare console.
- 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.
- Install the FileZilla client software on your home PC from this website
- 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.
- 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.
- 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.
- Connect in to your system using the remote SSH console method explained above.
- 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.
- Now would be a good time to also close any vmWare windows you still have open and disconnect from the VPN.