Академический Документы
Профессиональный Документы
Культура Документы
Class
Year
4.
5.
6.
7.
Virtualization on Linux
8.
Experiment no. 1a
Aim: Installation of Linux OS in Dual boot Environment
Theory:
GNU/Linux
Linux is an operating system: a series of programs that let you interact with your computer and run other programs.
Linux is modelled on the Unix operating system. From the start, Linux was designed to be a multi-tasking, multi-user
system. These facts are enough to make Linux different from other well-known operating systems. However, Linux is
even more different than you might imagine. In contrast to other operating systems, nobody owns Linux. Much of its
development is done by unpaid volunteers.
Linux users have immense freedom of choice in their software. For example, Linux users can choose from a dozen
different command line shells and several graphical desktops. This selection is often bewildering to users of other
operating systems, who are not used to thinking of the command line or desktop as something that they can change.
Linux is also less likely to crash, better able to run more than one program at the same time, and more secure than
many operating systems. With these advantages, Linux is the fastest growing operating system in the server market.
More recently, Linux has begun to be popular among home and business users as well.
Ubuntu
Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.
The Ubuntu community is built on the ideas enshrined in the Ubuntu Manifesto: that software should be available free
of charge, that software tools should be usable by people in their local language and despite any disabilities, and that
people should have the freedom to customize and alter their software in whatever way they see fit.
Ubuntu will always be free of charge, and there is no extra fee for the enterprise edition, we make our very
best work available to everyone on the same Free terms.
Ubuntu includes the very best in translations and accessibility infrastructure that the Free Software community
has to offer, to make Ubuntu usable by as many people as possible.
Ubuntu is shipped in stable and regular release cycles; a new release will be shipped every six months. You
can use the current stable release or the current development release. A release will be supported for 18
months.
Ubuntu is entirely committed to the principles of open source software development; we encourage people to
use open source software, improve it and pass it on.
Ubuntu is suitable for both desktop and server use. The current Ubuntu release supports Intel x86 (IBM-compatible
PC), AMD64 (Hammer) and PowerPC (Apple iBook and Powerbook, G4 and G5) architectures.
Ubuntu includes more than 1000 pieces of software, starting with the Linux kernel version 3.2 and GNOME 3.4, and
covering every standard desktop application from word processing and spreadsheet applications to internet access
applications, web server software, email software, programming languages and tools and of course several games.
Implementation details:
Installation of Ubuntu 12.04 Precise Pangolin:
These instructions apply for Ubuntu 12.04 and may cause serious damage to other versions.
Ubuntu 12.04 Precise Pangolin came out on April the 26th. It features an improved version of Unity, the new Heads-Up
Display (HUD), and version support for the next five years. It is completely free to download and install and offers a
fast, free, and secure alternative to Windows or OS X.
Warnings:
When choosing how to install, some options will completely erase your drive before doing so. Please read carefully
the description of your options below before choosing an install method. If you are comfortable managing partitions,
we recommend doing so manually.
Downloading:
You can Download Ubuntu 12.04 directly. The file size is just under a Gigabyte and may take anything from a few
minutes to a few hours, depending primarily on your connection speed. Downloads will be faster after the first day of
release (as less people download).
32 or 64 Bit
A good general rule of thumb is if your computer has 4GB of RAM or more, go for 64bit. Less, go for 32bit.
Basically, 64bit is faster.
To install Ubuntu, you must first put the installation image onto some form of media. Your choices are CD, DVD or
USB. Most computers can boot from both, unless they lack a disc drive, in which case you can skip the next
paragraph, as youll be using a USB then.
CDs and DVDs offer no real advantage over one another, DVDs may be larger, but the space will not be used, but cost
only a tiny amount more. RW means you can write new data again and again, whereas R means once the Ubuntu
installation image is on there, there it will stay. It can be used again, but never written to again. As for + or -, + means a
computer can treat it like a USB drive, whereas is a little older and wont. Either + or -, and R or RW will work for this.
USB sticks need to be at least 2GB in size, and be prepared for it to be formatted (everything deleted).
Once youve put the image you downloaded onto a CD, DVD, or USB, you will need to shut down your computer.
Turn your computer back on, tapping F12 to select a boot device when your screen shows the name of the
manufacturer. You can then use the arrow keys, finally hitting enter, to select either USB or Disc Drive.
Once Ubuntu has booted, you will be presented with a screen that looks like this:
If you dont want to install all updates while installing, then you can leave the relevant box(es) unchecked.
If you dont have at least 4.5GB of available drive space, then you cant continue. If youre not plugged in, then plug in
before continuing. If youre not connected to the internet, then youll be prompted to connect when you click continue.
You can do it now using the icon to the left of the sound menu to connect. You can continue without connecting, but
you wont be able to get updates, or any language packs you may require.
Now you get to choose your location by dropping a pin on this nifty looking map. This is to select your timezone and
apply any regional adjustments.
Keyboard Layout
Now you get to enter your name, the name you want your computer to be, your username, a password, whether or not
to log in automatically, and whether or not to encrypt your home folder (which is where documents, music, and video
folder can be found, among others).
Experiment no.1b
Aim: Execution of Basic Linux Commands
Theory:
cd changes directories
Usage: cd [DIRECTORY]
eg. cd prabhat
pwd print
name of current working directory
Usage: pwd
Pattern
A Pattern is an expression that describes a set of strings which is used to give a concise description of a set, without
having to list all elements.
eg. ab*cd matches anything that starts with ab and ends with cd etc.
ls *.txt prints all text files
Text Processing
echo $HOME
grep print
lines matching a pattern
Usage: grep [OPTION] PATTERN [FILE]...
eg. grep -i apple sample.txt
wc print
the number of newlines, words, and bytes in files
Usage: wc [OPTION]... [FILE]...
eg. wc file1.txt
wc l file1.txt
2 3 4 5 6 7 8 9 10
= 764
673 = rw-rwx-wx
System Administration
Archival
Network
File Systems
eg. quota v
Conclusion:
Experiment no. 2a
Aim -: To study and Implement Basic Linux Networking commands
Theory
Basically there are various addresses used in network configuration like ipaddress,subnetmask,default
gateways,dns etc & There are various commands can be used to setup network configuration.they are
as follows
Networking is sometimes considered to be complex, and hard to troubleshoot and manage. However, Linux provides
you with some tools to figure out exactly what's going wrong on your network, and how to fix it.
1. ping - ping command is used to find out whether the peer host/gateway is reachable.
It is used to detect whether a system is up and running in the network or not
Syntax: ping [options] <ipaddress>
e.g ping 192.168.1.1
2. finger - finger command is used to lookup information about an user. finger command will display login, username,
home directory, shell information about a particular user
3. ifconfig - The "ifconfig" command allows the operating system to setup network interfaces and allow the user to
view information about the configured network interfaces
Syntax #ifconfig <interfactname> Eg.
#ifconfig eth0
this views the configuration of interface eth0
To set up ip address following command can be
used.
Syntax: ifconfig <interfacename> <ipaddress>
<broadcast-address> up/down
For example-: To Assign ip-address, netmask at the same time to interface eht0 following command can be
used.
# ifconfig eth0 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255 up/down
4. traceroute - print the route packets take to network host. Traceroute utilizes the IP protocol `time to live' field and
attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to some host
root@ubuntu:~# traceroute6 gmail.com
5. host - host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses
and vice versa.
6. nslookup - nslookup is a network administration tool for querying the Domain Name System (DNS) to obtain
domain name or IP address mapping or any other specific DNS record. It is also used to troubleshoot DNS related
problems.
Syntax-:nslookup <domainname>
e.g. nslookup yahoo.com
7. dig - (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups
and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use
dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output.
Syntax: dig<domain-name>
e.g dig yahoo.com
8.netstat - Netstat command displays various network related information such as network connections, routing
tables, interface statistics, masquerade connections, multicast memberships etc.,
Syntax:netstat <option>
e.g.netstat a
9. route - Route command is used to show/manipulate the IP routing table. It is primarily used to setup static routes
to specific host or networks via an interface.
Genmask
255.255.255.0
0.0.0.0
Flags Metric
U
0
UG
0
Ref
0
0
0
0
Use Iface
eth0
eth0
Experiment no. 2b
Aim : Assign Multiple IP address to Single LAN
Theory:
To have multiple IP address it is necessary to create alias for eth0.
To create alias for eth0 ifconfig command is used.
It is use to configure a network interface and aliases
Implementation Details:
Assuming that your eth0 IP is 192.168.1.10 and you would like to create an alias eth0:0 with IP 192.168.1.11. Type the
following command:
sudo ifconfig eth0:0 192.168.1.11 up
OR
sudo /sbin/ifconfig eth0:0 192.168.1.11 up
Verify that alias is up and running using following two command(s):
/sbin/ifconfig
ping 192.168.1.11
ping your-getway-ip
Permanent configuration
Your ethernet configuration is located in a file called /etc/network/interfaces. If you reboot system you will lost your
alias. To make it permanent you need to add it network configuration file:
gksudo gedit /etc/network/interfaces
OR
sudo vi /etc/network/interfaces
Append the following configuration:
auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
address 192.168.1.11
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
Save the file and restart system or restart the network:
sudo /etc/init.d/networking restart
Please note that you can also use graphical tools located at System > Administration > Networking menu. Or use
the following GUI tool to setup aliases, hostname, dns settings etc:
sudo network-admin
If you want more network aliases, use eth0:1, eth0:2, eth0:N (max upto 254).
Experiment no. 2c
Aim: Adding Static Route in Routing table
Theory:
Static routing is the term used to refer to the manual method used to set up routing. An administrator enters routes into
the router using configuration commands. This method has the advantage of being predictable, and simple to set up. It
is easy to manage in small networks but does not scale well.
Advantages of Static Routes
Easy to configure
Implementation Details:
Add a Static route using "route" command
route add [-net|-host] <IP/Net> netmask <Mask> gw <Gateway
Example
route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
route add -host 10.10.1.1 netmask 255.255.255.0 gw 192.168.1.1 dev eth0
This adds the route immediatly to the Kernel IP routing table. To confirm the route has been successfully, simply
type the "route" command with no arguments:
route
Kernel IP routing table
Destination
Gateway
Genmask
192.168.1.254
localnet
Metric Ref
Use
Iface
255.255.255.0 U
eth0
255.255.255.0 U
eth0
10.10.10.0
255.255.255.0 U
eth0
10.10.1.1
255.255.255.0 U
eth0
0.0.0.0
eth0
default
192.168.1.1
Flags
UG
Use
netstat -rn
to print the Kernel IP Routing table.
To keep the Static Route persistent or you want to add the route entries to the network script files (not using the
route command) then all you need to do is to edit the file
/etc/network/interfaces
and the static routes in the following format:
Observations:
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
And the file will like the following
sudo cat /etc/network/interfaces
The output should show something like this
sudo cat /etc/network/interfaces
The output should show something like this
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 eth1
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
iface eth1 inet static
address 172.20.10.1
netmask 255.255.255.0
broadcast 172.20.10.255
gateway 172.20.10.254
# static route
up route add -net 172.20.11.0/16 gw 172.20.10.254 dev eth1
The above has 2 Ethernet interfaces and the static route is added to the interface eth1.
Experiment no. 2d
Aim: Configure Linux Server as a Router and configure IP Forwarding
Theory:
ROUTER
The router that will be created is an Internet gateway for wired and/or wireless clients to share an internet connection
with one IP address.
The essential components are:
routing of packets from your local networks to the internet, with IP_masquerading
A firewall
port forwarding
IP FORWARDING
By default any modern Linux distributions will have IP Forwarding disabled. This is normally a good idea, as most
peoples will not need IP Forwarding, but if we are setting up a Linux router/gateway or maybe a VPN server (pptp or
ipsec) or just a plain dial-in server then we will need to enable forwarding.
Implementation:
Setting Up Your Network Interfaces
1. Device Naming Overview
Network
Device
Internal
Network
or
External
eth0
External
eth1
Internal
wlan0
Internal
br0
Internal
Network bridge between eth1 and wlan0 that will treat the two like one
device
Description
2. Taking a Backup
Issue the following command to take a backup of your current network configuration:
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
3. Configuring the External Network Interface
Observation:
Configuration of Ubuntu Router External Network Interface
PING ubuntu.com (82.211.81.166) 56(84) bytes of data.
64 bytes from signey.ubuntu.com (82.211.81.166): icmp_seq=1 ttl=43 time=99.9 ms
64 bytes from signey.ubuntu.com (82.211.81.166): icmp_seq=2 ttl=43 time=109 ms
64 bytes from signey.ubuntu.com (82.211.81.166): icmp_seq=3 ttl=43 time=100 ms
--- ubuntu.com ping statistics --3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 99.982/103.450/109.419/4.254 ms
Conclusion:
Experiment no. 3
Aim -: To study and Implement Configuration of Linux as FTP and Web server
Theory
The steps to configure FTP and Web server on Ubuntu linux server is as follows
A] Configuration of FTP server on Ubuntu
FTP is designed to transfer large file across a network from one system to another.Like most internet operation,
FTP works on a client/server model.FTP client program can enable users to transfer files to and from a remote
system running an FTP server program
To configure FTP server following configurations can be used as follows
Configuration file : /etc/vsftpd/vsftpd.conf
Daemon : /usr/sbin/vsftpd
Service : service vsftpd restart
Packages
-httpd
Configurations file - /etc/httpd/conf/httpd.conf
Daemons
- httpd
Implementation Details:
/etc/httpd/conf/httpd.conf Main server configuration file
/var/www/html web server document directory
Steps to install and configure HTTP server
1. Installing the Apache package:
sudo apt-get install apache2
2. Starting, Stopping and Restarting Apache:
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 restart
3. Modify the /etc/apache2/apache2.conf
Modify SererverName Directive
Change the default value for ServerName www. <kjsce.com>
ServerName domain name (IP of the server or DNS of the server)
DocumentRoot Directive
Put the website content in /var/www/
4. Test from the client:Open browser and type URL of server or the IP Address of the server if the DNS is not
configured.
Virtual Hosting
IP Based Virtual Hosting
1. Assigning multiple IP addresses to single Ethernet Interface
ifconfig eth0:0 10.10.10.1 netmask 255.0.0.0 up
2. Check the ipaddress:
ifconfig
3. Create two new folders in the /var/www directory named as site1 and site2
cd /var/www/html
# mkdir site1
# mkdir site2
4. Create some sample HTML files say index.html in each of the folders using the nano editor:
/var/www/site1># nano index.html
index.html
<html>
This is Site 1..
</html>
/var/www/site2># nano index.html
index.html
<html>
This is Site 2..
</html>
5. Add the VirtualHost Directive to the apache2.conf file
/etc/apache2> nano apache2.conf
Add the following commands:
<VirtualHost 172.17.14.22>
DocumentRoot /home/www/site1
</VirtualHost >
<VirtualHost 10.10.10.1>
DocumentRoot /home/www/site2
</VirtualHost >
6. Test from the client
Open browser and type URL of servers
http:// 172.17.14.22
You will get a page of first web site (index.html in site1)
This is Site1..
http:// 10.10.10.1
You will get a page of second web site (index.html in site2)
This is Site2..
Conclusion:
Experiment no. 4
Aim -: To study and Implement Configuration of Linux as DNS Server
Theory
DNS server locates and translates domain names into corresponding associated IP
addresses and vice versa. In linux DNS Server is called as BIND server. Its requirement
is as follows
Required Packages
-bind, bind-utils,caching-nameserver
Configuration files -etc/named/named.conf
-/var/named/named.local
service
-service named restart
A] Server side Configuration
1) Install following packages using rpm command
#rpm ivh bind
# rpm ivh Caching-nameserver
#rpm ivh bind-utils
2) Open named.conf configuration file
# vi /etc/named.conf
In that file copy/paste forword lookup zones and replace localhost with kjsce.edu as well as specify name of
file as kjsce.for
zone "kjsce.edu" IN {
type master;
file "kjsce.for";
allow-update { none; };
};
Simillarly copy/paste reverse lookup zones and replace 0.0.127 with your servers network address in reverse
order as well as specify name of file as kjsce.rev
zone "1.168.192.in-addr.arpa" IN {
type master;
file "kjsce.rev";
allow-update { none; };
};
Then save this file
3) now create kjsce.for and kjsce.rev files by copying and renaming named .local file as follows
#cp /var/named/named.local /var/named/kjsce.for
##cp /var/named/named.local /var/named/kjsce.rev
4)Now open kjsce.for file in vi editor and in that file replace all localhost with Server.kjsce.edu and at the end of
file add two lines & save that file
Server.kjsce.edu
IN
192.168.1.1
www
IN
CNAME Server.kjsce.edu
5)Simillarly open kjsce.rev file in vi editor and in that file also replace all localhost with Server.kjsce.edu and at
the end of file just change PTR value if needed.PTR value is last number of your network segment so here we
have 1 so dont change it & save that file
1
IN
PTR
Server.kjsce.edu
6) now
service
restart
*#service
restart
named
named
Experiment no. 5
Aim -: To study and Implement Configuration of Linux as a Firewall
Theory
A firewall is a set of related programs, located at a network gateway server that protects the resources of a
private network from users from other networks.In linux iptables is the user- space tool for configuring firewall
rules in the Linux kernel. ipset is an extension to iptables that allows you to create firewall rules that match entire
"sets" of addresses at once.
The third table is the nat queue which is responsible for network address translation. It has two built-in chains; these
are:
Pre-routing chain: NATs packets when the destination address of the packet needs to be changed.
Post-routing chain: NATs packets when the source address of the packet needs to be changed.
Desciption
-t <-table->
If you don't specify a table, then the filter table is assumed. As discussed before, the possible
built-in tables include: filter, nat, mangle
-j <target>
Jump to the specified target chain when the packet matches the current rule.
-A
-F
-p <protocol-type>
-s <ip-address>
-d <ip-address>
-i <interface-name>
-o <interface-name>
After configuring this file restart the server using following command to take effect
Shutdown r now
Conclusion
Experiment no. 6
Aim: IT Infrastructure monitoring using NAGIOS
Theory:
Nagios
Nagios is an open source computer system monitor, network monitoring and infrastructure onitoring software
application. Nagios offers monitoring and alerting for servers, switches, applications, and services. It
watches hosts and services. It alerts users when things go wrong and alerts them again when those wrong things get
better/resolved.
Nagios was originally designed to run under Linux, but also runs well on other Unix variants.
Nagios is Open Source Software licensed under the GNU GPL V2.
Nagios Agents
i.
1. NRPE
Nagios Remote Plugin Executor (NRPE) is a Nagios agent that allows remote systems monitoring using
scripts that are hosted on the remote systems. It allows for monitoring resources such as disk usage, system load or
number of users currently logged in. Nagios periodically polls the agent on the remote system using
the check_nrpe plugin.
ii.
2. NRDP
Nagios Remote Data Processor (NDRP) is a Nagios agent with a flexible data transport mechanism and
processor. It is designed with an architecture that allows it to be easily extended and customized. NRDP uses
standard ports and protocols (HTTP(S) and XML) and can be implemented as a replacement for NSCA.
iii.
3. NSClient++
This program is mainly used to monitor Windows machines. Being installed on a remote system NSClient++
listens to port TCP 1248. Nagios plugin that is used to collect information from this addon is called check_nt. As
NRPE, NSClient++ allows to monitor the so called "private services" (memory usage, CPU load, disk usage, running
processes, etc.)
Implementation Details:
Required Packages
Make sure you've installed the following packages on your Ubuntu installation before continuing.
Apache 2
PHP
GCC compiler and development libraries
GD development libraries
You can use apt-get to install these packages by running the following commands:
sudo apt-get install apache2
sudo apt-get install libapache2-mod-php5
sudo apt-get install build-essential
With Ubuntu 6.10, install the gd2 library with this command:
sudo apt-get install libgd2-dev
With Ubuntu 7.10, the gd2 library name has changed, so you'll need to use the following:
sudo apt-get install libgd2-xpm-dev
Run the Nagios configure script, passing the name of the group you created earlier like so:
./configure --with-command-group=nagcmd
Install binaries, init script, sample config files and set permissions on the external command directory.
make install
make install-init
make install-config
make install-commandmode
Don't start Nagios yet - there's still more that needs to be done...
4) Customize Configuration
Sample configuration files have now been installed in the /usr/local/nagios/etc directory. These sample files should
work fine for getting started with Nagios. You'll need to make just one change before you proceed...
Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address
associated with the nagiosadmin contact definition to the address you'd like to use for receiving alerts.
vi /usr/local/nagios/etc/objects/contacts.cfg
Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this
account - you'll need it later.
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Note: Consider implementing the ehanced CGI security measures described here to ensure that your web
authentication credentials are not compromised.
6) Compile and Install the Nagios Plugins
Extract the Nagios plugins source code tarball.
cd ~/downloads
tar xzf nagios-plugins-1.4.11.tar.gz
cd nagios-plugins-1.4.11
7) Start Nagios
Configure Nagios to automatically start when the system boots.
ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
Click on the "Service Detail" navbar link to see details of what's being monitored on your local machine. It will take a
few minutes for Nagios to check all the services associated with your machine, as the checks are spread out over
time.
9) Other Modifications
If you want to receive email notifications for Nagios alerts, you need to install the mailx (Postfix) package.
sudo apt-get install mailx
sudo apt-get install postfix
You'll have to edit the Nagios email notification commands found in /usr/local/nagios/etc/objects/commands.cfg and
change any '/bin/mail' references to '/usr/bin/mail'. Once you do that you'll need to restart Nagios to make the
configuration changes live.
sudo /etc/init.d/nagios restart
Configuring email notifications is outside the scope of this documentation. Refer to your system documentation,
search the web, or look to the Nagios Support Portal or Nagios Community Wiki for specific instructions on configuring
your Ubuntu system to send email messages to external addresses.
Always make sure you verify your configuration before you (re)start Nagios.
Starting Nagios
1. Init Script: The easiest way to start the Nagios daemon is by using the init script like so:
/etc/rc.d/init.d/nagios start
2. Manually: You can start the Nagios daemon manually with the -d command line option like so:
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Restarting Nagios
Restarting/reloading is nececessary when you modify your configuration files and want those changes to take effect.
1. Init Script: The easiest way to restart the Nagios daemon is by using the init script like
/etc/rc.d/init.d/nagios reload
2. Web Interface: You can restart the Nagios through the web interface by clicking the "Process Info" navigation
link and selecting "Restart the Nagios process":
3. Manually: You can restart the Nagios process by sending it a SIGHUP signal like so:
kill -HUP <nagios_pid>
Stopping Nagios
1. Init Script: The easiest way to stop the Nagios daemon is by using the init script like so:
/etc/rc.d/init.d/nagios stop
2. Web Interface: You can stop the Nagios through the web interface by clicking the
"Process Info" navigation link and selecting "Shutdown the Nagios process":
3. Manually: You can stop the Nagios process by sending it a SIGTERM signal like so:
kill <nagios_pid>
Observation:
Conclusion:
Experiment no. 7
Aim: Virtualization on Linux
Theory:
Virtualization
Virtualization allows an unmodified operating system with all of its installed software to run in a special environment,
on top of your existing operating system.
Host operating system (host OS) - This is the operating system of the physical computer on which VirtualBox was
installed.
Guest operating system (guest OS) - This is the operating system that is running inside the virtual machine.
Virtual machine (VM) - This is the special environment that VirtualBox creates for your guest operating system while it
is running. In other words, you run your guest operating system "in" a VM. Normally, a VM will be shown as a window
on your computer's desktop
Oracle virtualbox
Oracle virtualbox is a cross-platform virtualization software which means it can be installed on windows, Mac and
Linux. VirtualBox supports all major operating systems in its virtual machines. Guest OS can be of Windows family,
Linux family, Mac OS X, Unices, Solaris and Others.
Implementation Details:
First, install Virtual Box on Ubuntu.
Then, configure Windows XP as a Virtual Machine on Ubuntu using VirtualBox.
i. Steps to install Virtualbox on ubuntu 12.04
Installing virtualbox on ubuntu 12.04 is very simple, just with 4 commands. Lets start
1. Type the below command to add virtualbox repository.
krizna@leela:~$ sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
>> /etc/apt/sources.list'
2. Download and register oracle public key by issuing the below command
krizna@leela:~$ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add 3. Now update the repositories.
krizna@leela:~$ sudo apt-get update
4. After updating repositories, start installing Virtualbox 4.2.
krizna@leela:~$ sudo apt-get install virtualbox-4.2
Installation will take some time to download and install virtualbox and other dependencies.
2. Click New. Now type name of your virtual machine and choose the OS type as Microsoft Windows
and version as Windows XP (For installing Windows XP).
3. Recommended
Memory (RAM) size will be allocated automatically based on OS type. (You can increase/decrease Memory by
adjusting the slider, but keep within the green). Choose Create a virtual hard drive now option and click
Create.
choose Hard disk file type as VDI (VirtualBox Disk image) and Fixed size for Storage on physical hard
drive ( Fixed size will increase Virtual machine performance ). Now click Create.
6. Click Storage Tab and Click Empty under the IDE Controller. Now you can see the CD/DVD Drive under the
Attributes column. Now click the CD icon and choose the downloaded Windows XP iso file.
7. Another option is to
download pre installed
OS VirtualBox images
as
VDI
files
for
completely free. Each VirtualBox image saves your installation and configuration time. Its not required to get CD
or ISO and install on VirtualBox. Just Download these Free VDI (VB hard disk files) and start using them.
8. Select the virtual machine you want to use, and click the Start button. Click OK for all messages and warnings.
Observation:
You will notice XP is inside of a window. Within that window is a menu with three choices. One of those menus you will
use quite often is the Machine menu.
Conclusion:
Experiment no. 8
Aim: To Study Structure of LaTeX document.
Theory:
I. Introduction
LaTeX is a macro package that enables authors to typeset and print their work at the highest typographical
quality, using a predefined, professional layout. It uses the TeX formatter as its typesetting engine. The approach
of LaTeX is quite different from the WYSIWYG approach that most modern word processors, such as MS
Word take. When using LaTeX, it is not normally possible to see the final output while typing the text, but the
final output can be previewed on the screen after processing the file.
Advantages of LaTeX:
1. Ready-made styles or templates are available so that authors need to focus only on the content.
The LaTeX system takes charge of the formatting.
2.
Easy
to
type
mathematical
equations.
3. Generates references and table of contents
automatically
II. Installation
A free LaTeX distribution is available from MikTeX (www.miktex.org) and an IDE called TeXMaker can be used as
a graphical interface. The input is written in plain text and stored as a *.tex file and the output can be generated
as either *.ps or *.pdf file.
III Basic structure of a document
The basic structure of a LaTeX document is as follows:
\documentclass[options]{style}
% Comment line
\begin{document}
Content goes here.
\end{document}
There are 4 different default document classes:
Article, Report, Letter, Book
The documentclass supports various options such as font size, page layout (single or two column), paper size (eg.
A4 paper), and various styles such as article (for papers), reports, book, slides, etc. Numerous syntax
commands are supported by the LaTeX system for professional text editing. For example, a word in bold
can be written as
\textbf{some word} which will be displayed as some word. Different chapters or sections can be started with
the syntax \section{Section Name} and its sub-sections can be written with
\chapter{name}
%only with books and reports
\section{name}
\subsection {name}.
\paragraph{name}
Line Break
\\ or \newline does a carriage return.
\\ \\ leaves a blank line without starting a new
paragraph
Page break:
\newpage
Font Style:
bold face: \textbf{some text}
V. Tables
Tables can be written using the \begin{tabular} syntax. An example is illustrated below:
Conclusion: