1.
Install VirtualBox/VMware Workstation with different flavors of Linux or
Windows OS on top of Windows 7 or 8
Using VirtualBox:
1. Download VirtualBox:
o Go to VirtualBox’s official site and download the installer for Windows.
2. Install VirtualBox:
o Follow the installation wizard to complete the installation on your Windows 7/8
machine.
3. Download ISO for Linux/Windows:
o Download the ISO image of the desired OS (for example, Ubuntu, Fedora, or a
Windows ISO).
4. Create a New Virtual Machine (VM):
o Open VirtualBox, click New, choose the operating system, and configure the
memory, hard disk, etc.
5. Install the OS:
o After setting up the VM, mount the ISO in the VM and start it. Follow the
prompts to install the OS.
Using VMware Workstation:
1. Download VMware Workstation:
o Go to the VMware website and download the trial or paid version.
2. Install VMware Workstation:
o Run the installer and follow the prompts to install VMware Workstation.
3. Create a New Virtual Machine:
o Open VMware, click Create a New Virtual Machine, and follow the setup
wizard. Select the OS to install and provide the ISO image.
4. Install the OS:
o Proceed with the OS installation within the VMware environment.
2. Install a C Compiler in the Virtual Machine and Execute Simple Programs
1. For Linux OS:
o Install the C compiler (GCC) via terminal:
sql
Copy
sudo apt-get update
sudo apt-get install build-essential
o Create a simple C program:
c
Copy
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
o Save the program and compile it using:
bash
Copy
gcc hello.c -o hello
./hello
2. For Windows OS (using MinGW):
o Download MinGW from MinGW SourceForge.
o During installation, select mingw32-gcc-g++ under Basic Setup.
o Add C:\MinGW\bin to the Windows PATH environment variable.
o Open Command Prompt and compile the C program:
Copy
gcc hello.c -o hello.exe
hello.exe
3. Install Google App Engine. Create a Hello World App and Other Simple Web
Applications Using Python/Java
1. Install Google Cloud SDK:
o Go to Google Cloud SDK installation page and follow the instructions to install
the Google Cloud SDK on your VM.
2. Create a Python Hello World App:
o Create a new directory for your project.
o Inside the directory, create an app.yaml file:
yaml
Copy
runtime: python39
o Create a main.py file:
python
Copy
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello, World!'
if __name__ == '__main__':
app.run()
o Install dependencies:
Copy
pip install flask
o Deploy the application:
Copy
gcloud app deploy
3. Create a Java Hello World App (using Google App Engine Java Runtime):
o Download the App Engine SDK for Java.
o Create a simple Java Servlet:
java
Copy
@WebServlet("/")
public class HelloWorldServlet extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
{
response.getWriter().println("Hello, World!");
}
}
o Configure the appengine-web.xml and deploy the app using mvn
appengine:deploy.
4. Procedure to Transfer Files from One Virtual Machine to Another Virtual
Machine
There are several methods to transfer files between VMs:
1. Using Shared Folders (VirtualBox):
o Enable shared folders in VirtualBox by going to the VM's settings → Shared
Folders.
o Choose the folder on the host machine to share, then mount it inside the VM:
bash
Copy
sudo mount -t vboxsf shared_folder_name /mnt/shared_folder
2. Using SCP (Linux VM to Linux VM):
o Ensure SSH is installed on both VMs.
o Use the scp command to copy files between VMs:
bash
Copy
scp /path/to/file user@vm-ip:/path/to/destination
3. Using SMB (Windows to Windows or Linux):
o Set up a shared folder on one VM and access it from the other VM.
5. Procedure to Launch Virtual Machine Using TryStack (Online OpenStack
Demo Version)
1. Go to the TryStack website.
2. Sign up or log in to access the OpenStack dashboard.
3. In the dashboard, click on Instances and select Launch Instance.
4. Choose an image (e.g., Ubuntu or CentOS) and configure the instance’s resources.
5. After the instance is launched, you can connect to it via SSH.
6. Install Hadoop Single Node Cluster and Run Simple Applications Like Word
Count
1. Install Hadoop:
o Download Hadoop from Apache Hadoop’s website.
o Extract the downloaded file and set up the environment variables:
bash
Copy
export HADOOP_HOME=/path/to/hadoop
export PATH=$PATH:$HADOOP_HOME/bin
2. Configure Hadoop:
o Modify the Hadoop configuration files (core-site.xml, hdfs-site.xml, etc.)
according to your setup.
3. Start Hadoop:
o Start the HDFS and YARN services:
bash
Copy
start-dfs.sh
start-yarn.sh
4. Run Word Count Application:
o Write a simple MapReduce program in Java for word count.
o Compile and run it using Hadoop:
bash
Copy
hadoop jar wordcount.jar input output