CC Record
CC Record
1. Download VirtualBox
o Visit VirtualBox Official Site and download the installer for your OS.
o Install VirtualBox by following the setup wizard.
2. Download Linux ISO
o Choose a lightweight Linux distro like Ubuntu, Debian, or Fedora from their
official websites.
3. Create a Virtual Machine
o Open VirtualBox and click "New".
o Set a name (e.g., Ubuntu VM) and choose Linux as the type.
o Allocate RAM (at least 2GB recommended).
o Create a Virtual Hard Disk (at least 10GB).
o Attach the Linux ISO file and start the VM.
4. Install Linux on VirtualBox
o Follow on-screen instructions to install Linux.
sh
nano hello.py
python
CopyEdit
print("Hello, Linux Virtual Machine!")
sh
python3 hello.py
7. Output:
Title of Experiment: Build and Execute a Modular Program using make in Linux.
sh
mkdir my_python_project && cd my_python_project
sh
nano math_functions.py
Code:
python
def add(x, y):
return x + y
sh
nano main.py
Code:
python
CopyEdit
from math_functions import add, subtract
a, b = 10, 5
print("Sum:", add(a, b))
print("Difference:", subtract(a, b))
Step 3: Create a Makefile
sh
nano Makefile
Content of Makefile:
make
CopyEdit
PYTHON = python3
TARGET = main.py
run:
$(PYTHON) $(TARGET)
clean:
rm -f *.pyc pycache /*
Step 4: Execute Using make
sh
make run
Output:
makefile
Sum: 15
Difference: 5
sh
make clean
EXPERIMENT-3
In VirtualBox:
sh
ls /media
sh
sudo mount -t vboxsf shared_folder_name /mnt
In VMware:
sh
ls /mnt/hgfs/
sh
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
EXPERIMENT-4
Title of Experiment: Launch and Perform Basic VM Operations using Try Stack (OpenStack
Demo)
1. Check VM Status
sh
ssh -i your_key.pem ubuntu@<VM_IP>
OUTPUT:
+ + + + + +
+ + + + + +
sh
$ openstack server list No
servers found.
EXPERIMENT-5
Title of Experiment: Install Git and Perform Basic Version Control Commands (clone,
commit, push, pull, reset, delete).
1. Install Git
Output:
Output:
2. Configure Git
Check configuration:
Output:
user.name=Your Name
[email protected]
3. Clone a Repository
Output:
cd repo
git status
Output:
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
Output:
Output:
Already up to date.
8. Reset Changes
Output:
9. Delete a Branch
Locally:
Output:
Remotely:
Output:
To https://github.com/user/repo.git
- [deleted] branch_name
EXPERIMENT-6
1. Install XAMPP
wget https://www.apachefriends.org/xampp-files/8.2.4/xampp-linux-x64-8.2.4-0-
installer.run
sudo chmod +x xampp-linux-x64-8.2.4-0-installer.run
sudo ./xampp-linux-x64-8.2.4-0-installer.run
Output:
Installation finished.
You can now start XAMPP by calling '/opt/lampp/lampp start'.
2. Start XAMPP
Output:
Go to htdocs:
cd /opt/lampp/htdocs/your_project
5. Manage XAMPP
Stop XAMPP:
Output:
Restart XAMPP:
Output:
app = FastAPI()
@app.get("/")
def
read_root():
return {"message": "Hello, FastAPI!"}
{
"message": "Hello, FastAPI!"
}
5. Stop the Server
Output:
EXPERIMENT-8
1. Install MinIO
1. Download MinIO:
o Go to the MinIO download page.
o Download the minio.exe file.
2. Move minio.exe to a folder:
o Place minio.exe in a folder like C:\minio\.
3. Verify Installation:
o Open Command Prompt and navigate to the folder where you placed
minio.exe:
o cd C:\minio
o Run the following command to check if MinIO is installed:
o minio.exe --version
o You should see output like this:
o MinIO version: RELEASE.2021-12-16T23-56-58Z
Sample output:
2. To upload files:
o Click on the bucket you created (e.g., mybucket).
o Click the Upload button.
o Select the files from your computer to upload and click Upload.
1. Navigate to the bucket where your files are stored (e.g., mybucket).
2. Find the file you want to download.
3. Click on the three dots next to the file name (or right-click on the file).
4. Select Download.
Sample output (on successful download):
Sample output:
Sample output:
Sample output:
Sample output:
Sample output:
Apache: Running
MySQL: Running
1. Go to the Nextcloud download page and download the latest version of Nextcloud for
manual installation.
2. Extract the downloaded zip file to the htdocs directory of your XAMPP installation
(usually located in C:\xampp\htdocs).
Sample path:
C:\xampp\htdocs\nextcloud
Step 3: Set Up Database for Nextcloud
Sample output:
Sample output:
Sample output:
Sample output:
Apache: Running
MySQL: Running
Sample output:
Sample output:
<?php
// Database connection
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "sampledb";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc())
{ echo "<tr>
<td>".$row["id"]."</td>
<td>".$row["name"]."</td>
<td>".$row["email"]."</td>
</tr>";
}
echo "</table>";
} else {
echo "0 results";
}
$conn->close();
?>
Step 5: Run the Application
Output:
User List
+ + + +
| ID | Name | Email |
+ + + +
| 1 | Tom | [email protected] |
| 2 | Sam | [email protected] |
+ + + +
EXPERIMENT-12
Title of Experiment: Creating and Using Object Storage (Swift) using Openstack swift
Output:
export OS_AUTH_URL=https://openstack.example.com:5000/v3
export OS_USERNAME=your_username
export OS_PASSWORD=your_password
export OS_PROJECT_NAME=your_project
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
Run:
source openrc.sh
swift stat
swift post mycontainer
Output:
Account: AUTH_xxxxx
Containers: 0
Objects: 0
Bytes: 0
Container mycontainer created successfully.
Output:
Output: