IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20...

59
IODE OTGA Training Course on Ocean Currents 16 – 20 September 2019 Oostende, Belgium

Transcript of IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20...

Page 1: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

IODE OTGA Training Course onOcean Currents

16 – 20 September 2019

Oostende, Belgium

Page 2: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

CREATING A VIRTUAL MACHINE

Session 2.

2

Page 3: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Objective of The Session

After this session, you can run a virtual machine (VM) on your laptop that provides similar functionality to physical machine.

3

Page 4: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Hardware in Terms of Desktop Operating SystemsI. Windows

a. Has the biggest user base and business applicationsb. High licensing and migration costs

II. Mac OS Xa. lower maintenance and better securityb. Comes bundled with hardware.

III. Linux/Unixa. Free and runs well on old hardware that cannot

support Mac or Windows,b. Perfectly secure, extremely fast, low maintenance

requirements, and exceptional stability .

4

Page 5: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Operating System Selection Factors

1. Low costs

2. Low maintenance

3. User friendliness

4. Security and

5. Stability

5

All above factors point out that the optimal choice of an operating system (OS) for scientificapplications is the Linux-based OS.

Page 6: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Why Linux

• Unless you are a hobbyist, you probably don’t install an OS very often.

• Windows normally comes pre-installed.

• You can do a basic install of Linux very easily.

• You can customize things if you want to.

• You will also gain nerd-points for knowing how your computer works. ☺

6

Page 7: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Linux – Hosting Scheme

Before installing Linux, think about which hosting scheme you want:

I. Devoted host - only Linux will run on your computer

II. Dual boot - Linux and another OS can be chosen at boot time

III. Virtual machine – multiple Operating Systems running at the same time

7

Page 8: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Perspectives of Installing Linux

1) Computational Efficiency: Devoted Host

2) Cost Effectiveness: Dual Boot

3) Training Purpose: Virtual Machine

8

Page 9: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Why Virtual Machine

• It is safer to test software on a virtual machine (the so-called “guest”) that is isolated from the operating system (the so-called “host”).

• A virtual machine can be fully reset as needed.• Last but not least, it is free.

9

Page 10: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

What is a Virtual Machine?

In computing, a virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination. (source Wikipedia)

10

Page 11: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Composition of a Virtual Machine

1) Host Computer: Personal Computer running Windows

2) Virtualization Software: VirtualBox

3) Guest Operating System: Xubuntu (or Ubuntu)

11

Page 12: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Virtual Host Introduction

• A “virtual host” is a fully-functional computer environment, running in a window on a computer.

• The window is operated by “virtualization software” such as:

– Virtual Box (https://www.virtualbox.org/),

– VmWare (http://www.vmware.com/), or

– Parallels (http://www.parallels.com/).

12

Page 13: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

What is VirtualBox

• A powerful x86 and AMD64/Intel64 virtualization product runs on Windows, Linux, Macintosh, and Solaris hosts.

• A community effort backed by a dedicated company (Oracle).

• Supports a large number of guest operating systems including but not limited to Windows, Linux, Solaris and OpenSolaris, OS/2, and OpenBSD.

13

Page 14: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

The Advantages of Ubuntu

• The most popular Linux distribution, plenty of people and websites supporting it.

• User-friendliness and choice of huge repository of (free) software available make Ubuntu recommended for novice Linux users.

14

Page 15: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

What is Xubuntu?

• Xubuntu is a community developed, GNU/Linux based Free/Open Source operating system. It is an officially recognized flavor of the popular Ubuntu operating system.

• The Xubuntu community is built around the ideals enshrined in the Ubuntu Philosophy

• Xubuntu = Ubuntu + Xfec

• http://xubuntu.org/about/

Page 16: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

GUIDE TO INSTALL LINUX INSIDE WINDOWS USING VIRTUALBOX

16

https://itsfoss.com/install-linux-in-virtualbox/

Page 17: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Requirements

• Good internet connection to download software and Linux ISO. (You can also use some other computer with an internet connection to download these files.)

• Windows system with at least 12 GB of free space.

• Windows system with 4GB of RAM. (It can work with less RAM as well, but your system will start to lag while using Linux in the virtual machine.)

17

Page 18: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Steps to Create a VM

1. Download and install the most recent version of the virtualization software such as VirtualBox (v6.0 or later).

2. Download and install Oracle VM VirtualBox Extension Pack

3. Download and install the Xubuntu (or Ubuntu) operating system.

18

Page 19: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Download Oracle VM “VirtualBox”

19

https://www.virtualbox.org/

Page 20: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Downloading Oracle VM VirtualBox Extension Pack

• Download Oracle VM VirtualBox Extension Pack from the following URL: https://download.virtualbox.org/virtualbox/6.0.10/Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack

20

Page 21: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Downloading Guest Operating System

• Download the Xubuntu IOS image:

– xubuntu-18.04.3-desktop-amd64.iso or

– xubuntu-18.04.3-desktop-i386.iso

21

Page 22: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox I

22

Page 23: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox II

23

Page 24: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox III

24

Page 25: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox VI

25

Page 26: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox V

26

Page 27: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox VI

27

Page 28: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox VII

28

Click on the “finish” button to run the virtualization software, after it says “Virtual Box installation Complete.

Page 29: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

VirtualBox Manager Window

29

Page 30: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Name and Operating System

30

Page 31: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Allocating Memory Size

31

Page 32: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Creating a Virtual Hard Disk

32

Page 33: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Choosing Hard Disk File Type

33

Page 34: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Choosing Storage on Physical Hard Disk

34

Page 35: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Selecting File Location and Size

35

Page 36: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Selecting Start-Up Disk

36

Select a Linux ISO image,Click “Start” to continue

Page 37: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Self-Explanatory Steps Forward

37

Click to install Xubuntu

Page 38: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installation Type

38

It is safe to erase disk under virtual machine

Page 39: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Setting region

39

Page 40: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Setting names and password

40

Page 41: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Restarting your VM

41

You may close the VirtualBox, if it gets stuck on the screen after you restart your VM.

Page 42: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Installing Oracle VM VirtualBox Extension Pack

• It is highly recommended to download and install Oracle VM VirtualBox Extension Pack from the following URL: https://download.virtualbox.org/virtualbox/6.0.10/Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack

• Oracle VM VirtualBox extension pack provides better compatibility.

42

Page 43: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

INSTALLING TRAINING TOOLKIT

43

Page 44: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Starting Your Virtual Machine

44

Page 45: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Login Screen

45

Page 46: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Desktop of the Virtual Machine

46

Click on the “Apps” icon

Page 47: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

List of Applications

47

Page 48: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Downloading Training Toolkit

• Click on the “Apps” icon located at the upper left corner of the screen to open the Firefox browser

• Enter the following URL: https://classroom.oceanteacher.org/ in the address bar.

• Press <ENTER>

48

Page 49: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Ocean Currents Training Web Page

49

Page 50: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Location of Training Toolkit

50

Save it to the “Downloads” directory

Page 51: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Steps to Install Training Toolkit

1. Open a terminal on your VM by clicking on the “terminal” icon

51

Page 52: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Steps to Install Training Toolkit

2. Type “mv Downloads/octraining2019.tar.gz” and press the “ENTER” key to move the training toolkit file to your home directory.

3. Type “tar -xzf octraining2019.tar.gz” and press the “ENTER” key to unzip the compressed training toolkit package.

52

Page 53: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Steps of Installing Training Package

1. One shell script named “install_software.sh” and one directory named “octraining2019” with three sub-directory, “data”, “mLib”, and “pgms” should be created in the “home” directory.

2. To install the third-party (open source) software as a “root” user, you enter “sudo –s” at the system prompt followed by the root password.

3. Type “install_software.sh” and press the “ENTER” key, then follow the instruction on the screen, till the installation is completed.

53

Page 54: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Directory Structure of Your VM

/home/your_name (the default home directory)• Desktop• Documents• Downloads• octrainings2019• install_software.sh• octraining2019.tar.gz

54

Page 55: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Testing the VM Installation

Here are some simple tests to see if everything is working correctly

1. Start a Terminal window

2. Go to the “octraining2019/pgms” directory

3. View directory structure, type: ls -l

4. To verify that you have the GNU Octave installed correctly, type: octave

$ octave <ENTER>

55

Page 56: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Octave Main Window

56

Page 57: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Finishing the VM Installation

• Type “exit” to close the Octave main window.

• Type “exit” at the system prompt to close the terminal window.

57

Page 58: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

Review of Unix Commands

58

Purpose-------------------------------------------1. show directory contents 2. change to your home directory3. change to local subdirectory4. change to directory data5. show whole contents of file.txt6. show contents of file.txt by more

('space' bar goes forward)7. copy A to B 8. delete (remove) A9. make a new directory A10. print current working directory

Linux Command----------------------------------1. ls -l2. cd3. cd dirA4. cd /home/adcpproc/data5. cat file.txt6. more file.txt

7. cp A B8. rm A9. mkdir A10. pwd

Page 59: IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20 September 2019 Oostende, Belgium

59

It’s time for a break!