0% found this document useful (0 votes)
371 views

Lab 1: Installing The Fedora OS On A Virtual Machine: Learning Outcome

This document provides instructions for installing Fedora 11 in a virtual machine, then installing and using additional tools like Midnight Commander and Eclipse. It explains that a virtual machine allows installing and testing an operating system separately from the host system. It outlines steps to install VMware Workstation and then Fedora 11 as a guest operating system. It also details how to install Midnight Commander for file management and Eclipse for C/C++ development, including compiling and running a sample program.

Uploaded by

Hoàng Võ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
371 views

Lab 1: Installing The Fedora OS On A Virtual Machine: Learning Outcome

This document provides instructions for installing Fedora 11 in a virtual machine, then installing and using additional tools like Midnight Commander and Eclipse. It explains that a virtual machine allows installing and testing an operating system separately from the host system. It outlines steps to install VMware Workstation and then Fedora 11 as a guest operating system. It also details how to install Midnight Commander for file management and Eclipse for C/C++ development, including compiling and running a sample program.

Uploaded by

Hoàng Võ
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Subject: Operating Systems

Lab 1: Installing the Fedora OS


on a Virtual Machine
Learning outcome
Upon successful completion of this lab, you will be able to
 Setup the VMware-workstation 8.0.0
 Setup the Fedora Core 11 (a Linux-based operating system) on VMWare
 Install and use the Midnight Commander (MC), an external tool to the Fedora.
 Install the Fedora Eclipse and use it to develop C/C++ programs in the Fedora

Requirement
Capture all windows for showing that you installed successfully the Fedora, MC, Fedora Eclipse
and two programs demonstrated in this tutorial to file (PDF format is recommended) and upload it
to the CMS. You must give an explanation to the program 1 about processes.

Content
1- What is a virtual machine and why it should be installed?
2- Steps to install the Fedora.
3- Install and use the Midnight Commander.
4- Install and use the Fedora Eclipse.

1- What is a virtual machine and why it should be installed?


- Virtual machine is a software running in a specific computer that will simulate a physical
computer.
- When a specific operating system(OS) is being used in a computer but the owner wants studying
another OS, a virtual machine is needed to separate the current system with a new OS will be
installed.

2- Steps to install the Fedora


Suppose that your computer is running under the MS Windows OS. The following two steps help
installing the Fedora:

- Step 1: Install the VM (VMware Workstation 8.0.0 is introduced, it is supplied)


- Step 2: Install a new OS (Fedora 11 is introduced, it is supplied)

2.1- Install the VMware Workstation 8.0.0


- Installing software
- Preparation

VMware must be installed to a sub-directory of a root directory. You can install it to the Program
Files folder or another such as:

- Run the setup.exe and give it parameters


Click the Next button.

Click the Custom choice.


Tick to the Enhanced Keyboard Utility, then click the Change button
to specify the install folder if you want.

Click the OK button


Click the Next button

Click the Next button


You may receive a message about a portal conflict happen.
Give another port number such as:

Click the Next button


Click the Next button

Click the Next button


Click the Next button

Click the Continue button


Wait the setup process executing.

Enter the key (supplied) than click the Enter button


Click the Restart Now button to terminate the setup process.

After restarting the computer:

On the Taskbar:

You can see what are installed in the installing folder?

2.2- Setup the Fedora 11 on the VMware

- Setup DVD (supplied):


- Preparation: A folder that will store all needed file of the Fedora on a disk that remains greater
than 10 GB empty space, such as:

- Start-up the VM to install the Fedora

Click the icon on the desktop :

Or from the menu Start/All Programs/VMware

Tick to the Yes option then click the OK button


Click the link Create a New Virtual Machine

Tick to the Custom option then click the Next button


You should choose the Workstation 6.0 option to limit resources.
See limits on tables then click the Next button

Tick to the Installer disc image file option then click the Browse
button to specify the supplied an iso file, then click the Next button.
Fill personal details then click the Next button

Click the Browse button to specify the prepared storing folder such as:
Give a name to the VM and specify the OS location then click the Next button.
Specify number of CPUs then click the Next button

You can specify RAM capacity (minimum: 512MB, default: 1024 MB)
then click the Next button
You should choose the NAT option for easy to connect to
the internet without domain configuration then click the Next button

Specify a type of IO controller then click the Next button


Tick to the Create a new virtual disk option then click the Next button.
Don’t worry about that. Virtual disk is a file only on the physical disk
but it will be presented as a structure to users.
So, your system is not be affected.

Choose a type of virtual disk then click the Next button.


.

Specify the maximum disk size (multiple of 2GB).


The Split virtual disk into multiple files option should be selected.
Click the Next button..

Specify the basic name for the virtual disk then click the Next button.
If you choose the Power on this virtual machine after creation then click the Finish button:
The virtual machine will be created and it starts immediately and then the Fedora will be installed.
Else, if you do not choose the option and click the Finish button only, you must power on the
machine after it is created (this tutorial used this way)..
The virtual machine data are presented in VMware

Click the link Power on this virtual machine

You may receive the following message because the Fedora 11


will run on the 32-bit CPU. Click the OK button.
VMware is loading the Fedora installing program

Be patient! About 2 hours for setting up the Fedora

After the Fedora started up:

Login
Power on/off/ Shut down:

Fedora GUI
Open the file system of the current user:

Double click on the Home icon of the user on the desktop.

3- Install and use the Midnight Commander


Midnight Commander (mc) makes utilities when users interact with the file system of the Fedora
easily. It’s user interface is similar with the Norton Commander interface in DOS. It covers almost
all basic operations on the file system of the Fedora.

3.1- Install the Midnight Commander


Install package (supplied)

Steps of installation:

1- Copy the package to the user’s directory


2- Install the package

Step 1: Copy the package to the user’s directory

Step 1.1: Insert the DVD disk or the USB flash drive containing this package. The VM will
recognize it automatically.
Step 1.2: Open the device, right click to the package, choose Copy
Step 1.3: Open the user directory, Paste it to the user’s directory.

Step 2: Install the Midnight Commander package


Result:

The directory name is so long. It should be renamed to a shorter one:


You can view the structure of the package in the user directory. Click to the triangle in front of
each name.

3.2- Use the Midnight Commander


The executable file of the Midnight Commander has the name mc. It will run only in the console
mode. So, you should run it in a terminal window using command prompt.

Step 1: Get the path of the file

Step 2: Open the terminal window


Paste the copied path to the terminal window then enter the command name: mc.

The user interface of the MC includes two panels (left and right).
- At a time, the highlight panel is the source panel and the other is the destination. Each
panel is presenting the content of a directory.
- Users will use it’s menu or hot keys they are introduced at the bottom of the interface such
as: means that use the F5 key to copy a selected object (directory or file) from the
source to the destination.
- Operations with hot keys F4, F7, F8 affect on the source directory (current panel) only.

Create your own script file to run the mc easily


Linux supports shell script (file.sh) containing commands as bat file of DOS and Windows
OS. Now, we want to create a script file to run mc more simply.

Step 1- Create the file run_mc.sh, stored in the user’s root directory using Text Editor

Enter the file content:

Click the Save button, give it a name


Step 2- Run run_mc.sh in the Terminal window:

The program sh of the Linux will interpret the content of the script file then execute commands
listed in this script file.

4- Install and use the Fedora Eclipse for C/C++


Link to download: http://eclipse.org/downloads/?osType=linux
Two packages(32 bit and 64 bit):

4.1- Install the Fedora Eclipse


Do the same as done for the Midnight Commander

Step 1: Copy the package eclipse-cpp-juno-SR1-linux-ght.gz ( 32 bit) to user’s directory using


USB.

Step 2: Extract this package

Extract more time to eclipse-cpp-juno-SR1-linx-gtk

You can remove source packages for de-allocating disk size


(Right click the removed object/ Move to Trash)
4.2- Use the Fedora Eclipse
Run Eclipse

You may right click to the eclipse/ Make Link then cut and paste it to the desktop.

Click the OK button

Open a new project


Choose C++ Project

Give the project a name, it will be sub-directory of the workspace directory.


Select a tool chain (chain of tools: Compiler, linker, assembler).
Click the Next or Finish button

If you click the Next button:


You may configure you project then click the Finish button.

Add a file to project


Write code:

Compile

When errors occur, Eclipse remember them and remove them only when they are cleaned:
If the compilation succeeds, no message is presented.

Run the program in Eclipse


Try to explain why the line 2 is printed (Use OS concepts about processes and multi-threading).

Project’s structure

Run your program out side the Eclipse

Your program is a console application. So, you should run it in the Terminal window.
Exercise

Create a object-oriented Project with the following structure:


Result of the program:

END

You might also like