Gokul NA Lab
Gokul NA Lab
Gokul NA Lab
COLLEGE
ATTINGAL
…………………………………………
LABORATORY RECORD
Certified that this is the bonafide record of experiment done
by Miss/Mr...................................of...........................Year/Semester
(RollNo.........................of....................................................Branch)
in the.........................................during the year........................
Name of Subject......................................................
Reg No................................................................
DEMONSTRATION OF THE
INSTALLATION OF
LINUX SERVER OPERATING SYSTEM
AND IT'S
CONFIGURATION
AIM:
Date :
Theory:
Aim: Familiarize partitioning of Hard Disk using gdisk command in Linux Server.
Procedure:
15. To automatically mount all the partitions during booting, modify fstab file and add
all the mount points and corresponding partition. Follow the below steps
a. #nano /etc/fstab.
b. Add each partitions into the file using the format
Partition name mount point file system defaults 0 0
(ex: /dev/sdc1 /mnt/downloads ext4 defaults 0 0 )
16. Reboot the server and check whether the partitions are mounted or not. This
completes the partitioning of herddisk using fdisk utility.
Result: Hard disk partioning Using fdisk has been successfully completed.
Experiment no.06
Procedure:
1) To create partitions in a particular hard disk, start parted command and select hard
disk
#sudo parted /dev/sdd.
• Mk label ms dos
• Mk part.
• Primary partition.
• lsblk to check the status
2) The next step to create file system. Mkfs command is used for this purpose
Use mkfs.ext4 /dev/sdd1 command to create file system in sdd1 partition.Using the
same command create file systems in other partitions also
To automatically mount all the partitions during booting, modify fstab file and add
all the mount points and corresponding partition. Follow the below steps
#nano /etc/fstab.
Add each partitions into the file using the format
Partition name mount point file system defaults 0 0
(ex: /dev/sdd1/mnt/programext4 defaults 0 0 )
Reboot the server and check whether the partitions are mounted or not. This
completes the partitioning of harddisk using parted utility
Result: Harddisk partition using parted is successfully completed.
Experiment no.07
Procedure:
• To create Partition.
• Give appropriate size for the Partition
• To Provide the type of file system we use ‘8200’ for swap
Enter the following to that file and save and exit from nano
network:
ethernets:
enp0s3:
dhcp4:true
enp0s8:
dhcp: no
addresses: [192.168.100.10/24]
nameservers:
addresses: [8.8.8.8]
version:2
5) Apply configuration changes using command
#sudo netplan apply
6) Confirm ip address configuration using ip a command.
7) Check network connection between host and internet using ping
command
8) Between server and internet using ping google.com
9) Between server and host machine using ping host-ip-address.
10) Check connection between host and server from host machine
using ping server-address
6) To check the network configuration, ping the ip address which got from
commandprount.
#ping 192.168.50.1
Result :Successfully configure network in Linux server.
Experiment no.09
Procedure:
10) Go to apps & features -> optional features -> add a feature
• Choose OpenSSH Client and click install
• Windows will download and install openSSH Client
• Once insalled, it will appear in installed features lis
• Open command prompt (cmd) in windows
• Connect to Linux sever using ssh username@ipaddress (of sever).
• Download and Enter ip address [192.168.100.10] in putty. Then check the network
configuration by list or make file in one and check status in both.
Result: Successfully Download and install puTTY for windows. Can use as SSH client.
Experiment no.10
Date:
Procedure:
File compression helps to reduce file size and share files efficiently. And compressed files
are also easier to copy to remote servers. Also compress older and rarely used files and save
them for future use which helps you conserve disk space.
tar
The tar command is used to create an archive, grouping multiple files in a single file.Its name
comes from the past and means tape archive.
Syntax
This command creates an archive named archive.tar with the content of file1 and file2:
c stands for create. The f option is used to write to file the archive. The v is providing details
of the files that have been archived.
• To remove the original files after creating an archive, use the –remove-files flag.
• Tar is often used to create a compressed archive, gzipping the archive. This is done
using the z option:
This is just like creating a tar archive, and then running gzip on it.
• To unarchive a gzipped archive, use gunzip , or gzip -d , and then unarchive it, but tar
-xf will recognize it’s a gzipped archive
Gzip
Gzip (GNU zip) is a compressing tool, which is used to truncate the file size. By default
original file will be replaced by the compressed file ending with extension (.gz).
• compress a file using the gzip compression protocol using the gzip command.
Gzip filename
• This will compress the file, and append a .gz extension to it. The original file is
deleted.
To prevent deleting files, you can use the -c option and use output redirection to write
the output to the filename.gz file:
Gzip -k filename
There are various levels of compression. The more the compression, the longer it will take to
compress (and decompress). Levels range from 1 (fastest, worst compression) to 9 (slowest,
better compression), and the default is 6.
Gzip -1 filename
Gzip -r a_folder
• The -v option prints the compression percentage information. Example to used along
with the -k option:
Gzip -kv wget-log
Gzip -d filename.gz
• The compression ratio or how much the original file has compressed, use -l option.
Gzip -l filename.gz
Gunzip
The gunzip command is basically equivalent to the gzip command, except the -d option is
always enabled by default.
• The command can be invoked in this way:
Gunzip filename.gz
This will gunzip and will remove the .gz extension, putting the result in the
filename file.
decompressed file
Gunzip -k filename.gz
Gunzip -r directory
Gunzip -l filename.gz
Result: Successfully executed File compressing mechanisam using tar Gzip and gunzip.