Вы находитесь на странице: 1из 93

EXPERIMENT NO.

1`
1.0 Aim:

To Study and Installation Of Linux OS.

2.0Learning Objectives:
2.1 Intellectual Skills

1. Perceiving about Linux OS.


2. Discerning installation knowledge.

2.2 Motor Skills

1. Proficiency about working with Linux OS.


2. Dexterity of installation of Linux, Ubuntu, Fedora etc.

3.0Apparatus
3.1Hardware

1. PC With
CPU Type :- Pentium 4 or higher; 2 GHz or higher
RAM :- 1 GB minimum, up to the system limit
Hard Disk :- 4 GB minimum
2. DVD/PD with Linux Distribution

4.0 Diagram

Linux Installation

Download LINUX

To install Red Hat, you will need to download the ISO


images (CD Images) of the installation CD-ROMs
from http://fedora.redhat.com
Download the i386 images for 32 Intel Processors,
PPC images for for Apple Macintosh and x86_64 for
for 64 bit AMD Processors
Burn the iso CD images on CDs and use these CDs
as Installation CDs (typically 4)

1
6.0 Experimental Procedure
6.1 Installation Steps:

1. Insert the Red Hat Linux DVD into the DVD-drive of your computer. As soon as the following
screen pops up, press ‘Enter’ to install Red Hat Enterprise Linux (RHEL) through GUI mode.
2. RHEL installer would then prompt you conduct a check as to whether the CD media from
which you’re installing is functioning correctly or not. Choose ‘Skip’, press enter and the
installation would begin.
3. Next, we need to select the language- English or any other language as per your preference,
and then press ‘Next’.
4. In this step, the RHEL installer would ask you about the appropriate type of keyboard for the
system. We take the ‘US English’ keyboard, you can pick any other option depending on the
type of your keyboard. Then press ‘Next’ to move to the next step.
5. Next, the installer would ask for an ‘installation number’ if you wish to install full set of Red
Hat functionalities. Enter the installation number and press ‘OK’ if you have an officially

2
licensed installation number (for corporate clients that buy Red Hat’s backup support and full
features).
Others can select ‘Skip entering installation number’ and press ‘OK’ to proceed. RHEL would
show a warning message, press ‘Skip’ in it to continue.
6. The Red Hat installer would then require you to create partitions in your computer’s hard disk
for the installation. You can do it in four ways but the simplest way is to select ‘Use free space
on selected drives and create default layout’ as this option will not affect any other OS residing
in your system.
Check the ‘review and modify portioning layout’ to create partitions and click next.
7. In this step you must create the required system partitions and mount points such as ‘/boot’,
‘/home’, ‘swap’ etc which are required for the Linux’s proper functioning.
To create different partitions such as /home, /var etc, click on ‘New’ to create the partitions.
Then, select /home in the mount point and choose ‘ext3’ as the file system and give the desired
size for it and then click ‘OK’. Similarly also create /boot and /var.
Also, create a swap partition by clicking on ‘New’ and then choosing the filesystem as ‘swap’
and also give the size of Swap partition.(Usually size of swap partition SHOULD BE twice the
size of RAM available to the system but you can keep its size less than that too)
Once you have made all the desired partitions and given their mount points, click ‘Next’ to
continue installation.
8. This step pertains to the default OS that will be loaded by the GRUB loader.
(Note- If you have multiple Operating Systems installed, you would see multiple options here
and you have to check in front of the OS name that you want to be loaded by default when the
system is started.)
Click ‘Next’ to continue.
9. This step pertains to the network settings of the Linux system that you are going to install. You
can select the Ethernet devices through which the system would communicate with other
devices in the network.
You can also provide the hostname, Gateway address and DNS address to the system during
this step. (However it’s better to adjust these settings once the system has been fully installed).
10. The next step is to adjust the system clock to your particular time zone. Select your time zone
and then click ‘Next’.
11. This is a very important step that deals with the root(super-user) password for the system . Type
the password and confirm it and then click next.
12. The RHEL installer would then prompt you about if you wish to install some extra ‘Software
Development’ or ‘Web Server’ features. By default, keep it at ‘Customize later’ and press
‘Next’.
13. This next step will initiate the installation of Red Hat Linux, press ‘Next’ to begin the process.
14. Upon the completion of installation you should the following screen. Press Reboot and you’d be
ready to use your newly installed Red Hat Linux OS.

6.2 POST INSTALLATION CONFIGURATIONS

1. Accept the Red Hat License agreement and click ‘Forward.

3
2. The next step is regarding the configuration of the Firewall. You can Enable or Disable the
firewall according to your preferences and then click ‘Forward’.
3. Next step is about the configuration of another security tool- SE Linux. By default you should
keep it ‘Disabled’ unless you’re working with very secure information.
4. You can also choose to configure the Kdump, that stores information about system crashes if
your system fails but uses valuable disk space. By default don’t enable it.
5. Next, adjust the time and date settings, and then click ‘Forward’.
6. The next step is for software updates from Red Hat, at this point you should skip the registration
and register at a later time and then click ‘Forward’.
7. This step is to create a non-admin user for the system. Enter the details and click ‘Forward’.
8. This step is about configuration of your Sound Card, choose a sound device and then click
‘Forward’.
9. Click ‘Forward’ to complete the configurations and start using your Red Hat Linux OS.

(Note- On clicking ‘Finish’ the system would require a reboot if you have made changes to the
configurations of Firewall or SE Linux.)

7.0 Results
Your Red Hat Linux OS is now all installed and configured, ready to be used. Good luck
using and exploring various features of Red Hat Linux.

4
8.0 Conclusion:
Linux operating system is installed Properly.

9.0 Questions:
1. What is the purpose of installing Linux?
2. What are the steps required to install Linux?
3. What Hardware Configuration is required?
4. Explain about Linux OSS?

10.0 Student Activity:


(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
5
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

11.0 References/ Related Links:


http://tutmaster.com/how-to-install-red-hat-linux-complete-step-by-step-guide/

6
EXPERIMENT NO. 2`
2.0 Aim:
To Study and Execute Linux Command line: File System, Process Management & user Administration.

2.0Learning Objectives:
2.1 Intellectual Skills

3. Perceiving about Linux OS.


4. Discerning about File System, Process Management, User Administration.

2.2 Motor Skills

3. Proficiency about working with Linux OS.


4. Dexterity of working with Command Line.

3.0Apparatus
3.1Hardware

3. PC With installed Linux OS

4.0 Theory

When you execute a program on your UNIX system, the system creates a special environment for that
program. This environment contains everything needed for the system to run the program as if no other
program were running on the system.
Whenever you issue a command in UNIX, it creates, or starts, a new process. When you tried out
the ls command to list directory contents, you started a process. A process, in simple terms, is an instance
of a running program.
You can see this happen with the ls command. If I want to list all the files in my current directory, I can use
the following command −
$ls ch*.doc
This would display all the files whose name start with ch and ends with .doc −
ch01-1.doc ch010.doc ch02.doc ch03-2.doc
ch04-1.doc ch040.doc ch05.doc ch06-2.doc
ch01-2.doc ch02-1.doc

Listing Running Processes


It is easy to see your own processes by running the ps (process status) command as follows −

7
$ps
PID TTY TIME CMD
18358 ttyp3 00:00:00 sh
18361 ttyp3 00:01:31 abiword
18789 ttyp3 00:00:00 ps
One of the most commonly used flags for ps is the -f ( f for full) option, which provides more information
as shown in the following example −
$ps -f
UID PID PPID C STIME TTY TIME CMD
amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one
amrood 6739 3662 0 10:22:54 pts/6 0:00 second_one
amrood 3662 3657 0 08:10:53 pts/6 0:00 -ksh
amrood 6892 3662 4 10:51:50 pts/6 0:00 ps -f
Here is the description of all the fileds displayed by ps -f command −
There are other options which can be used along with ps command −
Stopping Processes
Ending a process can be done in several different ways. Often, from a console-based command, sending a
CTRL + C keystroke (the default interrupt character) will exit the command. This works when process is
running in foreground mode.
If a process is running in background mode then first you would need to get its Job ID usingps command
and after that you can use kill command to kill the process as follows −
$ps -f
UID PID PPID C STIME TTY TIME CMD
amrood 6738 3662 0 10:23:03 pts/6 0:00 first_one
amrood 6739 3662 0 10:22:54 pts/6 0:00 second_one
amrood 3662 3657 0 08:10:53 pts/6 0:00 -ksh
amrood 6892 3662 4 10:51:50 pts/6 0:00 ps -f
$kill 6738
Terminated
Here kill command would terminate first_one process. If a process ignores a regular kill command, you can
use kill -9 followed by the process ID as follows −
$kill -9 6738
Terminated
5.0 Experimental Procedure
5.1 Basic Linux Commands:

Alias
A way to run a command or a series of Unix commands using a shorter name you get associated with such
commands.
8
apt-get
Apt-get is a tool to automatically update a Debian machine and get and install Debian packages/programs.
How to manage software on Ubuntu Server with "aptitude" and "apt-get".
Understanding the Debian archives and apt-get.
Aspell
GNU Aspell is a free and open source spell checker designed to replace Ispell. It can either be used as a
library or as an independent spell checker.
AWK, Gawk
A programming-language tool used to manipulate text. The language of the AWK utility resembles the
shell-programming language in many areas, although AWK's syntax is very much its own. Gawk is the
GNU Project's version of the AWK programming language.
bzip2
A portable, fast open source program used to compress and decompress files at high rates.
cat
A Unix/Linux command that can read, modify or concatenate text files, most commonly used for displaying
contents of files. See how to use cat to display contents of a file in Linux. An article on what you can do
with the cat command.
cd
The cd command changes the current directory in Linux, and can toggle between directories conveniently. It
is similar to the CD and CHDIR commands in MS-DOS.
See more on how to use the cd command to change directories.
chmod
Chmod changes the access mode (permissions) of one or more files. Only the owner of a file or a privileged
user may change the mode.
chown
Chown changes file or group ownership, and has options to change ownership of all objects within a
directory tree, and view information on objects processed.
cmp
The cmp utility compares two files of any type and writes the results to the standard output. By default, cmp
is silent if the files are the same; if they differ, the byte and line number at which the first difference
occurred is reported.
comm
Comm compares lines common to the sorted files file1 and file2. Output is in three columns, from left to
right: lines unique to file1, lines unique to file2, and lines common to both files.
cp
The cp command copies files and directories, and copies can be made simultaneously to another directory if
the copy is under a different name. Find out how to copy Linux files and directories with the cp command.
cpio
Cpio copies files into or out of a cpio or tar archive, which is a file that contains other files plus information
about them, such as their file name, owner, timestamps, and access permissions. The archive can be another
file on the disk, a magnetic tape, or a pipe. Cpio has three operating modes, and is a more efficient
alternative to tar.
9
Learn how to use cpio when moving files in a Unix-to-Linux port.
CRON
CRON is a Linux system process that will execute a program at a preset time. To use CRON, a user must
prepare a text file that describes the program to be executed and the times that CRON should execute them.
Then, the crontab program is used to load the text file that describes the CRON jobs into CRON.
Using CRON to execute programs at specific times.
date
Date sets a system's date and time. Also a useful way to output/print current information when working in a
script file. A few more examples from IBM on setting date and time with date.
declare
Declare declares variables, gives them attributes, or modifies properties of variables.
Examples of declaring variables with declare.
df
Df displays the amount of disk space available on the file system containing each file name argument. With
no file name, available space on all currently mounted file systems is shown. More on using df to display
the amount of disk space available.
echo
Echo allows a user to repeat, or "echo," a string variable to standard output.
enable
Enable will stop or start printers or classes.
env
Env runs a program in a modified environment, or displays the current environment and its variables.
eval
Eval evaluates several arguments and concatenates them into a single command, and then reports on that
argument's status.
exec
Exec replaces the parent process by whatever command is typed. This command treats its arguments as the
specification of one or more sub processes to execute.
More examples of replacing parent processes with exec.
exit
The exit command terminates a script, and can return a value to the parent script.
More on terminating scripts with exit.
expect
Expect talks to other interactive programs according to a script, and waits for a response, often from any
string that matches a given pattern.
Using expect for responses.
export
Export converts files into another format than the one it is currently in. Once a file is exported, it can be
accessed by any application that uses the format.
Examples of exporting data from a database with export.

10
find
Find searches the directory tree to find particular groups of files that meet specified conditions, including --
name and --type, -exec and --size, and --mtime and --user.
Efficiently locating files with find.
for, while
For and while are used to execute or loop items repeatedly as long as conditions are met.
free
Free displays the total amount of free and used physical memory and swap space in the system, as well as
the buffers and cache used by the kernel.
Learn how to use the free command to optimize a computer's memory.
grep
Grep searches file(s) for a given character string or pattern, and can replace the string with another one. One
method of searching for files within Linux.
gzip
Gzip is the GNU project's open source program used for file compression, compressing web pages on the
server end for decompression in the browser. Popular for streaming media compression, and can
concatenate and compress several streams simultaneously.
ifconfig
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up
interfaces. After that, it is usually only needed when debugging or when system tuning is needed.
ifup
Ifup configures a network interface/enables a network connection.
More on the ifup command in configuring network interfaces.
ifdown
Ifdown shuts down a network interface/disables a network connection.
More on shutting down networks with ifdown.
less, more
The less command lets an admin scroll through configuration and error log files, displaying text files one
screen at a time, with backward or forward moving available in files. More mobility within files than in
more. View several different file types with less.
Similar to less, more pages through text one screen at a time, but is more limited in moving in files.
locate, slocate
Locate reads one or more databases and writes file names matching patterns to output.
Finding files/directories efficiently with locate. Like locate, slocate, or secure locate, provides a way to
index and quickly search for files, but also securely stores file permissions and ownership so unauthorized
users will be unable to view such files.
See an example of using slocate as a quick secure way to index files.
lft
Lft is similar to traceroute in determining connection routes, but gives a lot more information for debugging
connections or finding where a box/system is. It displays route packets and file types.

11
ln
The ln command creates new names for a file by hard linking, letting multiple users share one file.
ls
The ls command lists files and directories within the current working directory, and admins can determine
when configuration files were last edited.
The ls command is also discussed in this tip.
man
Short for "manual," man allows a user to format and display the user manual built into Linux distributions,
which documents commands and other aspects of the system.
The man command is also discussed in this tip.
A visual shell, text-based file manager for Unix systems.
An extensive guide to managing files with mc.
neat
Neat is a GNOME GUI admin tool which allows admins to specify information needed to set up a network
card, among other features. Setting up an NTL Cable Modem using neat. Where neat falls in when building
a network between Unix and Linux systems.
netconfig,netcfg
Netconfig configures a network, enables network products and displays a series of screens that ask for
configuration information. Configuring networks using Red Hat netcfg.
netstat
Netstat provides information and statistics about protocols in use and current TCP/IP network connections.
A helpful forensic tool in figuring out which processes and programs are active on a computer and involved
in networked communications.
More on checking network statuses with the netstat command.
nslookup
Nslookup allows a user to enter a host name and find the corresponding IP address. A reverse of the process
to find the host name is also possible.
od
Od is used to dump binary files in octal (or hex, binary) format to standard output.
passwd
Passwd updates a user's authentication tokens (changes the current password).
ping
Ping allows a user to verify that a particular IP address exists and can accept requests. Can be used to test
connectivity and determine response time, and ensure that a host computer the user is trying to reach is
actually operating.
ps
Ps reports statuses of current processes in a system.
pwd
The pwd (print working directory) command displays the name of the current working directory.A basic
Linux command. Learn the differences between $ PATH and pwd.
Using pwd to print the current working directory.
12
read
Read is used to read lines of text from standard input and assign values of each field in the input line to shell
variables for further processing.
RPM
Red Hat Package Manager (RPM) is a command-line driven program capable of installing, uninstalling and
managing software packages in Linux.
A white paper on using RPM. The Differences of yum and RPM.
rsync
Rsync synchs data from one disk or file to another across a network connection. Similar to rcp, but has more
options. A tip on backing up data with rsync.
screen
The GNU screen utility is a terminal multiplexor in which a user can use a single terminal window to run
multiple terminal applications or windows.
A tutorial on running multiple windows and other uses of screen.
A tip on the uses of screen.
sdiff
Sdiff finds differences between two files by producing a side-by-side listing indicating lines that are
different. It then merges the files and outputs results to outfile.
sed
Sed is a stream editor that is used to filter text in a pipeline, distinguishing it from other editors. Sed takes
text input and performs operation(s) on it and outputs the modified text. Typically used for extracting part
of a file using pattern matching or substituting multiple occurrences of a string within a file. More
on extracting and replacing parts of a file with sed.
shutdown
Shutdown is a command that turns off the computer and can be combined with variables such as -h for halt
after shutdown or -r for reboot after shutdown.
Shut down or halt a computer with shutdown.
slocate
See locate.
Snort
Snort is an open source network intrusion detection system and packet sniffer that monitors network traffic,
looking at each packet to detect dangerous payloads or suspicious anomalies. Based on libpcap. Stopping
hackers with Snort.
sort
Used to sort lines of text alphabetically or numerically according to fields; supports multiple sort keys.
sudo
Sudo allows a system admin to give certain users the ability to run some (or all) commands at the root level,
and logs all commands and arguments.
A tutorial on giving permissions to users with the sudo command.
SSH
SSH is a command interface used for securely gaining access to a remote computer, and is used by network
13
admins to control servers remotely.
A comprehensive tutorial on secure access to remote computers with SSH.
tar
The tar program provides the ability to create archives from a number of specified files, or extract files from
such an archive.
TOP
TOP is a set of protocols for networks that perform distributed information processing in offices, and it
displays the tasks on the system that take up the most memory. TOP can sort tasks by CPU usage, memory
usage and runtime.
Monitoring system processes with TOP.
tr
Used to translate or delete characters from a text stream, writing to standard output, but does not accept file
names as arguments -- only inputs from standard input.
traceroute
Traceroute determines and records a route through the Internet between two computers and is useful for
troubleshooting network/router issues. If the domain does not work or is not available, an IP can be
tracerouted.
uname
Uname displays the name current operating system, and can print information about the mentioned system.
uniq
Uniq compares adjacent lines in a file, and removes/reports any duplicated lines. Removing duplicate
lines with the uniq command.
vi
Vi is a text editor that allows a user to control the system by solely using the keyboard instead of a
combination of mouse selections and keystrokes.
An entire guide to using vi to easily control a system with the keyboard.
vmstat
Vmstat is used to get a snapshot of everything in a system, reporting information on such items as
processes, memory, paging, and cpu activity. A good method for admins in determining where
issues/slowdown in a system may be occurring.
How to keep an eye on Linux performance with vmstat and others.
wc
wc counts the number of words, lines and characters of text files, and produces a count for multiple files if
several files are selected.
wget
Wget is a network utility that retrieves files from the Web supporting http, https and ftp protocols. It works
non-interactively, in the background, while a user is logged off. Can create local versions of remote
websites, re-creating directories of original sites.
whoami
Whoami prints or writes the user/login name associated with the current user ID to the standard output.

14
xargs
Xargs reads, builds and executes arguments from standard input. Blank lines in the input are ignored.

5.2 Command Line tools for Linux user / group management


Following are the Linux command line tools for managing users and groups :

 useradd
 usermod
 userdel

Lets understand these tools one by one with the help of some examples.

1. useradd command line tool is used for creating a new Linux user.
The syntax for this command line tool is :

$ useradd [options] LOGIN

Here is an examples of this tool :

$ sudo useradd --create-home -d /home/nixUser nixUser


The command above will create a user nixUser with its home directory as /home/nixUser. The flag --create-
home makes sure that the home directory is created if it does not exist. The creation of this user can be
confirmed by examining the /ect/passwd file which should now have an entry for this user.

$ cat /etc/passwd | grep nixUser


nixUser:x:1002:1004::/home/nixUser:/bin/sh
So we see that indeed there is an entry for this user in /etc/passwd file.
NOTE: To know more about this file, read our article here.
Now lets set a password for this user. The 'passwd' command would be helpful in this case :

$ sudo passwd nixUser


Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
So this way the password for the newly created user can be set.

2. usermod command line tool is used for modifying an existing user account.
The syntax for this tool is:

usermod [options] LOGIN


Here is an example of this tool :

$ sudo usermod -m -d /home/nixUser1 nixUser


The above command sets the new home directory of the user nixUser as /home/nixUser1.
Lets confirm it :
15
$ ls /home/
admin nixUser1 users
So we see that the new directory was created which replaced the old /home/nixUser home directory.

Here is another example :

$ sudo usermod -c "GuestUser" nixUser


The command above will add the full name for the user 'nixuser' as 'GuestUser'.
This can be confirmed through the following command :

$ cat /etc/passwd | grep nixUser


nixUser:x:1002:1004:GuestUser:/home/nixUser1:/bin/sh
So we see that the full name was added for the user.

3. userdel command line tool is used to delete a user.


The syntax for this tool is :

userdel [options] LOGIN


Here is an example of this tool :

$userdel nixUser
The above command would delete the user 'nixUser'.
But if the home directory along with its contents needs to be deleted then use the following command:

$ sudo userdel -r nixUser


Lets check the home directory :

$ ls /home/
admin users
So we see that the home directory /home/nixUser1 was also deleted.

6.0 Conclusion:

Hence we have studied and successfully execute all the Linux commands.

7.0 Questions:
1. What is the purpose of learn CLI?
2. What are the role of sudo command?
3. What are the networking commands?
4. Explain about Linux OSS?

16
8.0 Student Activity:
(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

9.0 References/ Related Links:


http://tutmaster.com/how-to-install-red-hat-linux-complete-step-by-step-guide/

17
EXPERIMENT NO. 3
Setup Web server, DNS Server & FTP server

1.0AIM: To Study and Setup Web server, DNS Server & FTP server.

2.0Learning Objectives:
2.1 Intellectual Skills

5. Perceiving about Linux Networking.


6. Discerning about Protocols and servers.

2.2 Motor Skills

8.0 Proficiency about working with Linux Networking.


9.0 Dexterity of working with shell environment.

3.0Apparatus
3.1Hardware

1. PC With installed Linux OS

4.0 THEORY:
Setup Static DNS Servers in Ubuntu 12.04 (Precise Pangolin)

Sometimes you may want to use alternative DNS servers instead of the one provided by your ISP. This
can be either public, private or secured DNS servers. For example, you may want to use Google Public
DNS Servers or the one from OpenDNS to replace the one currently assigned to your system. Well, this
brief tutorial is going to show you how to do that in Ubuntu 12.04 (Precise Pangolin). With the right
DNS servers, you can browse faster, securely and protect your online data.

3.0 Learning Objective:


3.1 Add custom DNS servers in Ubuntu 12.04

run the commands below to open dhclient.conf file.

sudo gedit /etc/dhcp/dhclient.conf

Then change the line highlighted to:


prepend domain-name-servers x.x.x.x, y.y.y.y;
18
Replace xx and yy with the primary and secondary DNS server addresses. Separate each address with a
comma. Save the file and you’re done.

To Install FTP server

• Enter the following command: “sudo apt-get install vsftpd” (without quotation marks). This
will install the FTP server on your system. Remember you must be run this command on the
root user.

19
Open the FTP server configuration file. To do so, go to Places and click on Computer

20
In the file browser, click the “File System” icon.

Click on the “etc” folder.

Double-click the “vsftpd.conf” icon.

21
Alter anonymous access. Enter "anonymous_enable=YES" (without quotation marks) to allow
anonymous FTP access. While you're at it, you can remove the hash (#) from the start of each
command by entering "write_enable=YES" (without quotation marks). Also remove hash mark from
“local_enable=YES”

Click on Save and close the file.

22
To check ftp:
Go to browse and type- ftp://localhost
3.2 WEB SERVER

When working on web development, I prefer to work within the privacy of my own development
environment located on my computer. I'd rather make the majority of my mistakes where no one else
can see them rather than out in the wild of the Internet. In order to have that private development
environment, I install a LAMP configuration. If you're not familiar with LAMP, it stands for Linux,
Apache, MySQL, php (and/or Perl). LAMP is one of the most common web hosting platforms on the
Internet, so it's a great environment to build and test your website.
Follow these step by step instructions to install and configure LAMP on Ubuntu 12.04. This process
has been tested and also works on Linux Mint 13. If you have a reasonably fast broadband connection,
you should be done in less than half an hour.

Install LAMP on Ubuntu


The developers at Ubuntu have made it really easy to install and configure the packages for LAMP
with a single terminal command. So open up a terminal window and let's get started.
sudo apt-get install lamp-server
sudo apt-get install lamp-server
The apt package manager will now show the packages to be installed and ask for confirmation. Hit
<Enter> to confirm and continue with the install.

Install LAMP packages


After some time downloading packages, you will be prompted to set a password for the root user for
MySQL.

Set MySQL root password


Enter the password you want to use for MySQL. Do not leave it blank. You'll be prompted a second
time to confirm your password.

Confirm MySQL root password


After confirming your password, apt will continue installing the remaining packages.

Remaining LAMP package installation


Your LAMP installation is now complete. Wow, that was easy! Now there's just a few more steps to get
things configured to make it easy to work with your system.

Test Apache
Open a web browser window and enter the address http://localhost/. You should see a web page that
says "It Works!"

23
24
25
5.0 CONCLUSION:
Hence we have studied and installed successfully web server, FTP server,DNS server

6.0 Questions:
1.What is differnce between web server,FTP server,DNS ?
2. What is anonymous access?
3. What is LAMP?How to install it?
4. Explain Domain Name Server in brief.

26
7.0 Student Activity:
(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

9.0 References/ Related Links:

27
EXPERIMENT NO: 04

Working with IPTABLES, OpenVAS

1.0 AIM: To study & Working with IPTABLES, OpenVAS.

2.0Learning Objectives:
2.1 Intellectual Skills

1 Perceiving about Linux IPtables.


2 Discerning about OpenVAS Framework.

2.2 Motor Skills


1 Proficiency about working with Linux IPtables.

2 Dexterity of working with shell environment.

3.0Apparatus
3.1Hardware

1. PC With installed Linux OS

4.0 THEORY:

IPTABLES is a command-line firewall utility that uses policy chains to allow or block traffic.
When a connection tries to establish itself on your system, iptables looks for a rule in its list to match it
to. If it doesn’t find one, it resorts to the default action.

iptables almost always comes pre-installed on any Linux distribution. To update/install it, just retrieve
the iptables package:

sudo apt-get install iptables

There are GUI alternatives to iptables like Firestarter, but iptables isn’t really that hard once you have a
few commands down. You want to be extremely careful when configuring iptables rules, particularly if
you’re SSH’d into a server, because one wrong command can permanently lock you out until it’s
manually fixed at the physical machine.

28
5.0 Procedure and Diagrams:
Types of Chains

iptables uses three different chains: input, forward, and output.

Input – This chain is used to control the behavior for incoming connections. For example, if a user
attempts to SSH into your PC/server, iptables will attempt to match the IP address and port to a rule in
the input chain.

Forward – This chain is used for incoming connections that aren’t actually being delivered locally.
Think of a router – data is always being sent to it but rarely actually destined for the router itself; the
data is just forwarded to its target. Unless you’re doing some kind of routing, NATing, or something
else on your system that requires forwarding, you won’t even use this chain.

There’s one sure-fire way to check whether or not your system uses/needs the forward chain.

iptables -L -v

The screenshot above is of a server that’s been running for a few weeks and has no restrictions on
incoming or outgoing connections. As you can see, the input chain has processed 11GB of packets and
the output chain has processed 17GB. The forward chain, on the other hand, has not needed to process
a single packet. This is because the server isn’t doing any kind of forwarding or being used as a pass-
through device.

Output – This chain is used for outgoing connections. For example, if you try to ping howtogeek.com,
iptables will check its output chain to see what the rules are

regarding ping and howtogeek.com before making a decision to allow or deny the connection attempt.

29
The caveat

Even though pinging an external host seems like something that would only need to traverse the output
chain, keep in mind that to return the data, the input chain will be used as well. When using iptables to
lock down your system, remember that a lot of protocols will require two-way communication, so both
the input and output chains will need to be configured properly. SSH is a common protocol that people
forget to allow on both chains.

Policy Chain Default Behavior

Before going in and configuring specific rules, you’ll want to decide what you want the default
behavior of the three chains to be. In other words, what do you want iptables to do if the connection
doesn’t match any existing rules?

To see what your policy chains are currently configured to do with unmatched traffic, run theiptables -
L command.

As you can see, we also used the grep command to give us cleaner output. In that screenshot, our
chains are currently figured to accept traffic.

More times than not, you’ll want your system to accept connections by default. Unless you’ve changed
the policy chain rules previously, this setting should already be configured. Either way, here’s the
command to accept connections by default:

iptables --policy INPUT ACCEPT


iptables --policy OUTPUT ACCEPT
iptables --policy FORWARD ACCEPT

By defaulting to the accept rule, you can then use iptables to deny specific IP addresses or port
numbers, while continuing to accept all other connections. We’ll get to those commands in a minute.

If you would rather deny all connections and manually specify which ones you want to allow to
connect, you should change the default policy of your chains to drop. Doing this would probably only
be useful for servers that contain sensitive information and only ever have the same IP addresses
connect to them.

30
iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP

Connection-specific Responses

With your default chain policies configured, you can start adding rules to iptables so it knows what to
do when it encounters a connection from or to a particular IP address or port. In this guide, we’re going
to go over the three most basic and commonly used “responses”.

Accept – Allow the connection.

Drop – Drop the connection, act like it never happened. This is best if you don’t want the source to
realize your system exists.

Reject – Don’t allow the connection, but send back an error. This is best if you don’t want a particular
source to connect to your system, but you want them to know that your firewall blocked them.

The best way to show the difference between these three rules is to show what it looks like when a PC
tries to ping a Linux machine with iptables configured for each one of these settings.

Allowing the connection:

Dropping the connection:

31
Rejecting the connection:

Allowing or Blocking Specific Connections


With your policy chains configured, you can now configure iptables to allow or block specific
addresses, address ranges, and ports. In these examples, we’ll set the connections to DROP, but you
can switch them to ACCEPT or REJECT, depending on your needs and how you configured your
policy chains.
Note: In these examples, we’re going to use iptables -A to append rules to the existing chain. iptables
starts at the top of its list and goes through each rule until it finds one that it matches. If you need to
insert a rule above another, you can use iptables -I [chain] [number] to specify the number it should be
in the list.

Connections from a single IP address

This example shows how to block all connections from the IP address 10.10.10.10.

iptables -A INPUT -s 10.10.10.10 -j DROP

Connections from a range of IP addresses

This example shows how to block all of the IP addresses in the 10.10.10.0/24 network range. You can
use a netmask or standard slash notation to specify the range of IP addresses.

iptables -A INPUT -s 10.10.10.0/24 -j DROP

or

iptables -A INPUT -s 10.10.10.0/255.255.255.0 -j DROP

Connections to a specific port

This example shows how to block SSH connections from 10.10.10.10.

iptables -A INPUT -p tcp --dport ssh -s 10.10.10.10 -j DROP

32
You can replace “ssh” with any protocol or port number. The -p tcp part of the code tells iptables what
kind of connection the protocol uses. If you were blocking a protocol that uses UDP rather than TCP,
then -p udp would be necessary instead.

This example shows how to block SSH connections from any IP address.

iptables -A INPUT -p tcp --dport ssh -j DROP

Connection States

As we mentioned earlier, a lot of protocols are going to require two-way communication. For example,
if you want to allow SSH connections to your system, the input and output chains are going to need a
rule added to them. But, what if you only want SSH coming into your system to be allowed? Won’t
adding a rule to the output chain also allow outgoing SSH attempts?

That’s where connection states come in, which give you the capability you’d need to allow two way
communication but only allow one way connections to be established. Take a look at this example,
where SSH connections FROM 10.10.10.10 are permitted, but SSH connections TO 10.10.10.10 are
not. However, the system is permitted to send back information over SSH as long as the session has
already been established, which makes SSH communication possible between these two hosts.

iptables -A INPUT -p tcp --dport ssh -s 10.10.10.10 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -d 10.10.10.10 -m state --state ESTABLISHED -j ACCEPT

Saving Changes

The changes that you make to your iptables rules will be scrapped the next time that the iptables service
gets restarted unless you execute a command to save the changes. This command can differ depending
on your distribution:

Ubuntu:

sudo /sbin/iptables-save

Red Hat / CentOS:

/sbin/service iptables save

Or

/etc/init.d/iptables save

33
Other Commands

List the currently configured iptables rules:


iptables -L
Adding the -v option will give you packet and byte information, and adding -n will list everything
numerically. In other words – hostnames, protocols, and networks are listed as numbers.

To clear all the currently configured rules, you can issue the flush command.

iptables -F

OPENVAS:-

OpenVAS (Open Vulnerability Assessment System,[1] the name of the fork originally known
as GNessUs) is a framework of several services and tools offering a vulnerability scanning and
vulnerability management solution.
All OpenVAS products are Free Software. Most components are licensed under the GPL.
OpenVas begun, under the name of GNessUs, as a fork of the previously open source Nessus scanning
tool after Tenable Network Security changed it to a proprietary (closed source) license in October
2005. OpenVAS was originally proposed by pentesters at Portcullis Computer Security and then
announced by Tim Brown on Slashdot.
OpenVAS is a member project of Software in the Public Interest.

6.0CONCLUSION:Hence we have studied and sucessfully installed OPENVAS.


34
7.0 Question:
7.1.1 What is openVAS?
7.1.2 Explain in Brief installation process in openVAS.
7.1.3 Explain chains of IPTABLE.

8.0 Student Activity:


(Students need to answer any assigned questions from above questions 6-8 blank lines)

------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------

9.0References/ Related Links:

35
EXPERIMENT NO 5
Version Control
1.0 AIM: To study version control.

2.0Learning Objectives:
2.1 Intellectual Skills

7. Perceiving about control structure in Linux.


8. Discerning about Version Control.

2.2 Motor Skills

2 Proficiency about working with Linux Controls.


3 Dexterity of working with tool environment.

3.0Apparatus
3.1Hardware

2. PC With installed Linux OS

4.0 Theory: Version control tools help multiple users to make simultaneous changes to a collection of
documents/files, without clobbering each others' work or resulting in version confusion. Version
control is essential for software development, and is often used for managing web sites, documentation,
engineering drawings, corporate legal and business documents, and other documentation which must be
archived and controlled. Version control also blends into specialties of related interest:

Document Control & Image Retrieval

Document control systems tend to focus more on the management of a large collection of
documents and/or images, rather than on maintaining differing versions of a smaller number of
documents. Document control systems are slowly replacing micro-fiche for archiving, and are
used to store images of bank drafts (checks), land-survey data, engineering drawings, and the
like.

Configuration Management & Software Distribution

Version-control tools are often used to store and control the configuration files (e.g.
"AUTOEXEC.BAT" or "/etc/resolv.conf") for an operating system or software package.
Administrators of large corporate networks turn to configuration management tools to guard

36
against the accidental mangling of a config file, and to guarantee a uniform system
configuration for a collection of workstations and servers. Configuration management tools are
often integrated with software distribution tools, which automate the deployment and update of
software packages across a large number of desktops.

Software Metrics

When engineering or programming staff are making many changes during product
development, management is often interested in statistics about the rate of change. Files which
change a lot, repeatedly, over long periods of time, often indicate trouble spots. Software
metrics are tools that can help locate trouble spots by generating statistics about code and
changes in that code.

Bug Tracking and Problem Reports

Because software change is often driven by problem reports, it is natural to integrate bug
tracking systems with version control systems: this allows for a framework where changes
resulting from a bug report can be easily located, and where some measure of certainty is
provided that *all* changes have been integrated into a product release. This may not be an
issue for small projects, but for anything much larger, say a half-dozen or more developers, few
dozen released patches, and more than a few actively supported releases, such integration is
mandatory.

General References

 A generic reference can be found at Andre's Config-Mgmt Yellow Pages.


 Dave Eaton's Configuration Management Tools Summary provides a thorough listing of
products for all operating systems, some of which support Linux.
 The Project Management & Bug Tracking for Linux reviews bug tracking, call management,
customer relationship management and project management tools for Linux.

Caveat Emptor

The lists below were compiled between 1996 and 1998, and have not been kept up to date. You will
want to supplement the below with your own crawl through the search engines!

Open Source Version Control Tools


The list below was generated between 1996-1998, and is out-of-date. There are many of these now,
including BZR, git and SVN. In fact, these last three are among the most popular and widely acclaimed
version control systems at this time (2008).

CVS

37
CVS provides multiple user checkout & merge, and a client-server model. Available on most Linux
distributions. Very popular, the industry standard. A number of web pages, including: CVS
Bubblesprovide additional info. There are a variety of graphical front-ends to CVS; most all will run on
Win95/NT.

 gCVS is a graphical front end to CVS. Supports Linux, HP/UX, Win95/NT, Macintosh,
and SunOS. Specifically designed to be easy to use; aimed at non-technical users, such
as writers & the marketing department.
 RAD/CVS includes TCL/TK & Java interfaces to CVS. See the RADSoft page. The
screen-shot looks rather impressive.
 TkCVS is another CVS GUI. See also the Tcl ftp site, and look for tkcvs.
 jCVS is a Java based graphical CVS client. The client runs on NT/W95 as well as Unix,
as the screenshot illustrates.

Aegis

Aegis is a "transaction-based software configuration management system", or, more simply, a


source-code control system. GPL'ed, active project. (See also here.)

PRCS

PRCS the Project Revision Control System, is the front end to a set of tools that (like CVS)
provide a way to deal with sets of files and directories as an entity, preserving coherent versions
of the entire set. Claimed to be easier to use than CVS, and higher performance too. Currently
lacks network features, although these are being developed.

RCS

RCS is an industry standard collection of tools providing basic file locking and version control
mechanisms. Its strength and durability are indicated by the fact that almost all other version
control tools use RCS as their low-level interface -- RCS is the work-horse engine. RCS is low-
level. Its not client-server. Its available on all Linux distributions.

SCCS

An oldie but a goodie, SCCS is considered by many to be obsolete, but still has many active
fans, and is in active development, in the form of GNU CSSC. Standards fans take note: the
SCCS command line is standardized in the Single Unix Specification, Version 2

Commercial Version Control Products


The list below was compiled between 1996 and 1998, and is now mostly out-of-date. AccuRev is
currently in business; the status of the others is uncertain. There may well be new entrants into this
field as well.

38
AccuRev (New listing)

AccuRev is a modern, up-to-date version control system -- it avoids many of the issues
associated with the (older) branch-and-tag model of version control. Runs on Linux and other
operating systems. Includes integrated bug tracking. Free trial versions may be downloaded.

ClioSoft SOS

ClioSoft SOS is a revision control tool based on RCS. It is built around a client-server model,
and works across the internet or on intranets. It has both a command line interface and a tcl/tk
GUI interface. It supports all the basic operations and operates on directories as well. It has a
bug tracking system incorporated into it. Popular in the ASIC and FPGA code development
user community. Runs across Sun, Linux and Windows. It is simple and very straight forward
with many pre-written scripts (e-mailing, snapshots, tags). Free for projects having 200 objects
or less.

MKS Source Integrity

The popular MKS Source Integrity version control system is now available from Mortice Kern
Systems.

INTERSOLV PVCS

PVCS provides software configuration management and version control. Runs under most all
Unix's, OpenVMS, Windows/NT, Windows 95, and OS/2.

SCM

UniPress Software provide SCM (Source Code Manager). The offer a free single-user version.
The client is X11 based.

Perforce

Perforce generously allows you to try out their software before you buy. They allow non-
commercial users of FreeBSD and Linux an unlimited free license. The design is client-server,
and does not rely on a shared file system for distributed operation. The tool is an ASCII
command-line tool, and although it include perl cgi scripts for invocation from a web browser,
it does not have an X11 interface. Perforce provides RCS/CVS-to-Perforce conversion scripts.

CMZ

CMZ Software Version Control and Configuration Management tool.

Razor Razor from Visible Systems Corp. Integrates with thier issue-tracking/workflow management
system.

39
Configuration Management & Software Distribution
cfengine

cfengine is a tool for managing the config files of a large network of computers, and for
automating the distribution of software & updates to this network.

BEAM

A tool for the automated distribution of software onto clusters of workstations. (ftp site).

rdist

rdist is a low-level command for the automated distribution of files to remote computers. Most
Linux distributions come with an rdist client. Check for "man rdist".

Host Factory

Creating multiple, identical copies of a system can be hard work; it becomes even harder if
patches and diffs need to be maintained. Multiply this by hundreds of computers ... and Unix
sysadmins go crazy. The Working Version company has created a system version control and
distribution mechanism to manage entire installed system versions. In particular, their version-
controlled file system(yes, literally, a file system ...) caught my technical eye. Pretty amazing!

Software Metrics
Software Metrics

Software Metrics are useful for understanding how versions are changing, how "complex" a
piece of software is, and other statistics useful for project managers.

Document Management & Image Management


Textware GmbH

Document Management System product (in German ...)

InterDMS

InterDMS Internet Document Management System (in Italian ...)

Casbah

The Casbah project hopes to create an integrated content mangement / content creation / web
development system for Linux.

I saw a freeware document & image management tool for Linux, but misplaced the reference.
Can you help?

40
docfs - Unified Documentation Storage and Retrieval for Linux Systems appears to be a project to
develop a document management system.

5.0 CONCLUSION:- Hence we have studied Version control

6.0 Question:
Explain the open source version control tools?
What is CVS?
Expalin HOST factory.
What is bug tracking?
7.0 Student Activity:
(Students need to answer any assigned questions from above questions 6-8 blank lines)
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------

8.0 References/ Related Links:

41
EXPERIMENT NO 6

Drupal On Linux

1.0 AIM:- To Study & Install Drupal On Linux .

2.0Learning Objectives:
2.1 Intellectual Skills

1. Perceiving about Linux Framework like Drupal.


2. Discerning about installing of Drupal.

2.2 Motor Skills

3 Proficiency about working with Drupal.


4 Dexterity of study of Drupal.

3.0Apparatus
3.1Hardware

1. PC With installed Linux OS


2. Drupal Software pack
4.0 THEORY:-
1) Download a Drupal tar.gz or zip file to your local computer
fromhttps://www.drupal.org/project/drupal by clicking on the link for the version you want to
install.
2) When you download the file, your browser will ask you what to do with it. Choose "Extract"
and extract it to your local computer. Or, save the file and extract it using your computer's
software (7-zip for example) that deals with archive files. The exact steps to do this differ by
software, but you should end up with a folder/directory called something like "drupal-7.32" on
your local computer.
3) Most web hosting accounts provide a Web-based control panel to help you administer your site.
These tools include easy-to-use features for creating a new database, and for creating a "user"
with rights to the database. To create a database using a browser-based control panel consult the
documentation or ask your web host service provider.
4) When you create the user for your database, you may see a page where you can specify the
privileges that user will have for various operations on the database. In most web control panels'
"database wizard", if you simply check "All" privileges for the user you create (and then
uncheck "Grant" if it is listed as a privilege) your user will be set up correctly.

42
5) Change the permissions during the installation
Change the permissions of settings.php (and in Drupal 8 of services.yml) to allow the install
script to edit the file:
chmod a+w sites/default/settings.php
or
chmod 666 sites/default/settings.php.
Note: In case you are in the same group as the web user, then changing the permissions to
with g+w or 664 will be sufficient.

5.0 Installation process


After you run install.php, you'll be guided through several pages:
1. Choose which profile to use for the installation (standard or minimal or your chosen distribution).
Most people should select the "standard" option. The standard option comes with default content types
already enabled, such as Article and Page, and with appropriate publishing options already set. (Of
course you can later edit these default content types and their settings, or add additional ones.) The
standard profile also has a useful collection of modules pre-enabled for you.
The "minimal" option is targeted toward more experienced Drupal site creators who wish to set up their
own content types with associated publishing options. The minimal profile has only three modules
enabled: Block, Database logging, and Update status.
Choose the 'name of your distribution', if you have downloaded a distribution and not a normal drupal
at step one.

If you want to install using a language other than the default English, click the Learn how to install
Drupal in other languages link.

43
If your installation directory is not yet configured properly, you'll be informed on this page. You can
correct the settings individually and either refresh the browser screen or click 'Try again' to see whether
there are any errors left.

Missing directories and/or incorrect permissions


The installer will attempt to automatically set up a number of directories, but this may fail due to
permission settings. In this case you will find the missing directories listed.
44
 sites/default/files
 sites/default/private
 sites/default/private/files
These directories should be set to the following permissions:

chmod o+w sites/default/files


OR

chmod 777 sites/default/files

 Missing settings.php or incorrect permissions


If settings.php is missing or not accessible, follow the instructions in Step 3: Create the settings.php
file. Note that you will need both the default.settings.phpand settings.php files.
Enter the database name, the username, and the password for the database that you created in Step 2:
Create the database. This username and password information allows Drupal to access your database so
the install script can create tables. Note that this is not the username and password for administering
Drupal; these will be created in the next step.

1. A progress bar will appear and display notes from the installer regarding the progress of the
installation. If no errors are encountered, the next page will automatically load in your browser.

45
After the installer completes, input the information for the first user account (which will be
automatically assigned full administration permissions) and provide basic web site settings.

In the Update notifications field, leave both check boxes selected if you want your Drupal server to
alert you when updates are required. Often updates relate to security issues and are important to

46
perform. However, if you have restricted Internet connectivity (for example, if you are behind a
corporate firewall) you may want to leave these settings unselected and then test them later.

Click "Save and continue". On success you will see the Drupal installation completescreen. If there are
any error messages, review and correct them now.

Currently, the Drupal 8 Install steps are mostly identical to Drupal 7 above, with a couple of
exceptions:

47
The order of the steps:
1. Choose Language
2. Choose Profile
3. Verify Requirements
4. Setup Database
5. Install Site
6. Configure Site

The base URL is defined in your Web server configuration file and is specific to the document root
where you placed your Drupal files. If you have installed Drupal on a Web server this will likely be a
domain name, such as http://example.com. If you have installed Drupal on your local computer, this
URL might be http://localhost.

add the first user account and provide basic web site settings.

48
6.0 CONCLUSION:- Hence we have studied and Successfully installed Drupal

49
7.0 Question:
1. What is drupal?
2. Explain installation process of drupal in brief.
3. Explain use of CHMOD command.
4. Differnce between drupal and wordpress.

8.0 Student Activity:


(Students need to answer any assigned questions from above questions 6-8 blank lines)
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
----------------------------
8.0 References/ Related Links:

50
EXPERIMENT NO 7

Shell scripting

1.0 Aim: Write a script to print digits of given number and find their sum.

2.0Learning Objectives:
2.1 Intellectual Skills

9. Perceiving about Shell scripting.


10. Discerning about shell programming.

2.2 Motor Skills

4 Proficiency about working with Linux shell programming.


5 Dexterity of working with shell environment.

3.0Apparatus
3.1Hardware

3. PC With installed Linux OS

4.0 Theory:

What is Linux Shell?

Computer understands the language of 0's and 1's called binary language.

In early days of computing, instruction are provided using binary language, which is difficult for all of
us, to read and write. So in Os there is special program called Shell. Shell accepts your instruction or
commands in English (mostly) and if its a valid command, it is pass to kernel.

Shell is a user program or it's environment provided for user interaction. Shell is an command language
interpreter that executes commands read from the standard input device (keyboard) or from a file.

Shell is not part of system kernel, but uses the system kernel to execute programs, create files etc.

S/w required: Vi editor

51
What is Shell Script?

Normally shells are interactive. It means shell accept command from you (via keyboard) and execute
them. But if you use command one by one (sequence of 'n' number of commands) , the you can store
this sequence of command to text file and tell the shell to execute this text file instead of entering the
commands. This is know as shell script.

Shell script defined as:"Shell Script is series of command written in plain text file. Shell script is just
like batch file is MS-DOS but have more power than the MS-DOS batch file."

Why to Write Shell Script?

 Shell script can take input from user, file and output them on screen.
 Useful to create our own commands.
 Save lots of time.
 To automate some task of day today life.
 System Administration part can be also automated.

How to write shell script

Following steps are required to write shell script:

(1) Use any editor like vi or mcedit to write shell script.

(2) After writing shell script set execute permission for your script as follows
syntax:
chmod permission your-script-name

Variables in Shell

To process our data/information, data must be kept in computers RAM memory. RAM memory is
divided into small locations, and each location had unique number called memory location/address,
which is used to hold our data. Programmer can give a unique name to this memory location/address
called memory variable or variable (Its a named storage location that may take different values, but
only one at a time).

In Linux (Shell), there are two types of variable:

(1) System variables - Created and maintained by Linux itself. This type of variable defined in
CAPITAL LETTERS.

52
(2) User defined variables (UDV) - Created and maintained by user. This type of variable defined in
lower letters.

5.0 Algorithm:

1. Start
2. Input number n
3. Set sum=0, sd=0
4. Find single digit in sd as n % 10 it will give (left most digit)
5. Construct sum no as sum=sum+sd
6. Decrement n by 1
7. Is n is greater than zero, if yes goto step 3, otherwise next step
8. Print sum
9. Stop

6.0 Program Code:

echo”enter number”
read n
sum=0
sd=0
while [ $n -gt 0 ]
do
sd=`expr $n % 10`
sum=`expr $sum + $sd`
n=`expr $n / 10`
done
echo "Sum of digit for number is $sum"

7.0 Output:
enter number

345

Sum of digit for number is 12

8.0 Conclusion: Thus we have successfully calculated the sum of digits of given number.

53
Litle: Logic Development

Aim: Write a script to print reverses of given number

S/w required: Vi editor

Variables in Shell

To process our data/information, data must be kept in computers RAM memory. RAM memory is
divided into small locations, and each location had unique number called memory location/address,
which is used to hold our data. Programmer can give a unique name to this memory location/address
called memory variable or variable (Its a named storage location that may take different values, but
only one at a time).

In Linux (Shell), there are two types of variable:


(1) System variables - Created and maintained by Linux itself. This type of variable defined in
CAPITAL LETTERS.
(2) User defined variables (UDV) - Created and maintained by user. This type of variable defined in
lower letters.

Algorithm:

1. Start
2. Input number n
3. Set rev=0, sd=0
4. Find single digit in sd as n % 10 it will give (left most digit)
5. Construct reverse no as rev * 10 + sd
6. Decrment n by 1
7. Is n is greater than zero, if yes goto step 3, otherwise next step
8. Print rev
9. Stop

Program code:

echo”enter number”
read n
rev=0
sd=0

while [ $n -gt 0 ]
do
sd=`expr $n % 10`
rev=`expr $rev \* 10 + $sd`
n=`expr $n / 10`
54
done
echo "Reverse number is $rev"

Output:
Enter number
5678
Reverse number is

Conclusion: Thus we have successfully calculated the sum of digits of given number

9.0 Question:
1.What is shell scripting?
2. Write shell scripting program to change desktop background.

10.0 Student Activity:


(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------
55
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

References/ Related Links:

56
EXPERIMENT NO 8

Android development environment.

1.0 AIM: To Install Android.

2.0 Learning Objectives:


2.1 Intellectual Skills

1. Familiar with linux terminal..


2. Familiar with object oriented language..

2.2 Motor Skills

6 Proficiency about working with Linux IPtables.


7 Dexterity of working with shell environment.

3.0Apparatus
Required Hardware:

Ram:500MB

OS: linux more than 2.7 library.

Memory: 3GB free space.

Required Software:

1.JDK 7

2.Eclipse with ADT plugins.

3.Android SDK

4.0 THEORY & PROCEDURE:

1. Installing Java Runtime (JDK) and Eclipse IDE

 Search Software on Ubuntu and launch Ubuntu Software Center

57
 Search Java on Ubuntu Software Center and then install the OpenJDK Java Runtime.

Search Eclipse on Ubuntu Software Center and then install it.

If you have successfully installed eclipse and JDK, it will appear in the search
result on your computer.

58
For the JDK, you can also press CTRL + ALT + T to open a terminal and type
command java -version to check again.

Tips : Lock the eclipse icon on launcher.

59
2. Downloading SDK

 Go to http://developer.android.com/sdk/index.html to download the latest version of SDK.

 Scroll down and click DOWNLOAD FROM OTHER PLATFORMS

 Click android-sdk_r22.6.2-linux.tgz under Linux 32 & 64-bit of SDK Tools Only.

60
 Tick I have read and agree with the above terms and conditions and click
Download android-sdk_r22.6.2-linux.tgz.

Wait for the download process.

61
3. Preparing for Installation

 Go to the location where you set to download the file.


 Rigth click the file[.tgz] and select Extract Here.

 Now you can see that a file called android-sdk-linux appears as if the following.

62
 Enter the folder android-sdk-linux.

 Enter the folder tools and then copy the folder location.

 Press the keys CTRL + ALT + T to open a terminal and then use the following
command. Where /home/casper/Downloads/android-sdk-linux/tools is the
location I copied previously. You can just type cd and right click to past the
location to the terminal.
 cd /home/casper/Downloads/android-sdk-linux/tools
 ./android

 Now the Android SDK Manager will be run.

63
4. Installing Packages

 Click Install [Number] packages....

 Click Accept License and then click Install.

 Wait for the installation process.

64
 Finally, this message will be shown.

65
5. Editing ".bashrc"

 Press CTRL + ALT + T to open a new terminal and type : gedit ~/.bashrc

 Now the following text will appear.

 Add the following to the top of the entire text and then save it. (Do not close the
file)
 export PATH=${PATH}:~/android-sdk-linux/tools
 export PATH=${PATH}:~/android-sdk-linux/platform-tools
 Example :

66
 [Recommended] Move the whole file android-sdk-linux to your eclipse's
workspace and under a folder that you create named Android. Moreover, you
have to copy the location.

 Now back to the ".bashrc" file and the replace the '~' with the location you copied
previously and then save it and close it.

67
 Logout and relogin your Ubuntu system.

6. Setting Up an Android Virtual Device

 Press CTRL + ALT + T and type android avd to open the Android Virtual Device
Manager.

 Click New.... Set up like the following and click OK.

68
 Click your virtual device and then click Start....

69
 Click Launch.

70
 Launching your virtual device

7. Installing ADT Plugin on Eclipse

 Start Eclipse and go to Help -> Install New Software...

71
 Click Add....

 Type the following and then click OK.


 Name : ADT Plugin
 Location : https://dl-ssl.google.com/android/eclipse/

 Tick the checkbox of Developer Tools and then click Next>.


72
 Click Next>.

 Click "I accept the..." and click Finish.


73
 Wait for the installation process.

74
 Restart eclipse.

 Click Open Preferences.

 Copy your own SDK location (The location of the file android-sdk-linux).

75
 Paste to the SDK Location: textbox and then click Apply and OK.

 Enjoy to create any android application with your Ubuntu.

6.0 CONCLUSION:- Hence we have successfully Installed Android on Linux.

76
7.0 Question:

1.What is differnce between Android SDK and NDK?


2. Explain process of installation of Android sdk.
3. Explain revolution of android.
4. explain some libraries of ADK.
8.0 Student Activity:
(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------

9.0 References/ Related Links:

77
EXPERIMENT NO 9

FIRST ANDROID APP

1.0 AIM: To Study and implement Programming in Android to create first Android App.

2.0 Learning Objectives:


2.2 Intellectual Skills

1 Familiar with linux terminal..


2 Familiar with object oriented language..
2.3 Motor Skills
1 Proficiency about working with Linux IPtables.
2 Dexterity of working with shell environment.

3.0Apparatus

Required Hardware:

Ram:500MB

OS: linux more than 2.7 library.


Memory: 3GB free space.

Required Software:

1.JDK 7

2.Eclipse with ADT plugins.

3.Android SDK

4.0 THEORY & PROCEDURE :- Create Android Application


The first step is to create a simple Android Application using Eclipse IDE. Follow the optionFile ->
New -> Project and finally select Android New Application wizard from the wizard list. Now name
your application as HelloWorld using the wizard window as follows:

78
Next, follow the instructions provided and keep all other entries as default till the final
step. Once your project is created successfully, you will have following project screen −

79
Anatomy of Android Application
Before you run your app, you should be aware of a few directories and files in the
Android project −

S.N. Folder, File & Description

1 Src

This contains the .java source files for your project. By default, it includes
anMainActivity.java source file having an activity class that runs when your app is

80
launched using the app icon.

2 Gen

This contains the .R file, a compiler-generated file that references all the resources
found in your project. You should not modify this file.

3 Bin

This folder contains the Android package files .apk built by the ADT during the
build process and everything else needed to run an Android application.

4 res/drawable-hdpi

This is a directory for drawable objects that are designed for high-density screens.

5 res/layout

This is a directory for files that define your app's user interface.

6 res/values

This is a directory for other various XML files that contain a collection of
resources, such as strings and colours definitions.

7 AndroidManifest.xml

This is the manifest file which describes the fundamental characteristics of the app
and defines each of its components.

Following section will give a brief overview few of the important application files.

The Main Activity File


The main activity code is a Java file MainActivity.java. This is the actual application file which
ultimately gets converted to a Dalvik executable and runs your application. Following is the default
code generated by the application wizard for Hello World! application –

81
5.0 PROGRAM :

package com.example.helloworld;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;

public class MainActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}

Here, R.layout.activity_main refers to the activity_main.xml file located in the res/layoutfolder.


The onCreate() method is one of many methods that are figured when an activity is loaded.

The Manifest File


Whatever component you develop as a part of your application, you must declare all its components in
a manifest.xml which resides at the root of the application project directory. This file works as an
interface between Android OS and your application, so if you do not declare your component in this
file, then it will not be considered by the OS. For example, a default manifest file will look like as
following file −
82
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>

Here <application>...</application> tags enclosed the components related to the application.


Attribute android:icon will point to the application icon available underres/drawable-hdpi. The
application uses the image named ic_launcher.png located in the drawable folders

The <activity> tag is used to specify an activity and android:name attribute specifies the fully
qualified class name of the Activity subclass and the android:label attributes specifies a string to use
as the label for the activity. You can specify multiple activities using <activity> tags.

The action for the intent filter is named android.intent.action.MAIN to indicate that this activity serves
as the entry point for the application. The category for the intent-filter is

83
named android.intent.category.LAUNCHER to indicate that the application can be launched from the
device's launcher icon.

The @string refers to the strings.xml file explained below. Hence, @string/app_name refers to
the app_name string defined in the strings.xml file, which is "HelloWorld". Similar way, other strings
get populated in the application.

Following is the list of tags which you will use in your manifest file to specify different Android
application components:

 <activity>elements for activities

 <service> elements for services

 <receiver> elements for broadcast receivers

 <provider> elements for content providers

The Strings File


The strings.xml file is located in the res/values folder and it contains all the text that your application
uses. For example, the names of buttons, labels, default text, and similar types of strings go into this
file. This file is responsible for their textual content. For example, a default strings file will look like
as following file −

<resources>
<string name="app_name">HelloWorld</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
</resources>

The R File
The gen/com.example.helloworld/R.java file is the glue between the activity Java files
likeMainActivity.java and the resources like strings.xml. It is an automatically generated file and you
should not modify the content of the R.java file. Following is a sample of R.java file −

/* AUTO-GENERATED FILE. DO NOT MODIFY.


*
84
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.helloworld;

public final class R {


public static final class attr {
}
public static final class dimen {
public static final int padding_large=0x7f040002;
public static final int padding_medium=0x7f040001;
public static final int padding_small=0x7f040000;
}
public static final class drawable {
public static final int ic_action_search=0x7f020000;
public static final int ic_launcher=0x7f020001;
}
public static final class id {
public static final int menu_settings=0x7f080000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
}
public static final class menu {
public static final int activity_main=0x7f070000;
}
public static final class string {
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050001;

85
public static final int menu_settings=0x7f050002;
public static final int title_activity_main=0x7f050003;
}
public static final class style {
public static final int AppTheme=0x7f060000;
}
}

The Layout File


The activity_main.xml is a layout file available in res/layout directory, that is referenced by your
application when building its interface. You will modify this file very frequently to change the layout
of your application. For your "Hello World!" application, this file will have following content related
to default layout −

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
tools:context=".MainActivity" />

</RelativeLayout>

This is an example of simple RelativeLayout which we will study in a separate chapter.


TheTextView is an Android control used to build the GUI and it have various attributes
likeandroid:layout_width, android:layout_height etc which are being used to set its width and height
86
etc.. The @string refers to the strings.xml file located in the res/values folder. Hence,
@string/hello_world refers to the hello string defined in the strings.xml file, which is "Hello World!".

Running the Application


Let's try to run our Hello World! application we just created. I assume you had created
yourAVD while doing environment set-up. To run the app from Eclipse, open one of your project's
activity files and click Run icon from the tool bar. Eclipse installs the app on your AVD and starts
it and if everything is fine with your set-up and application, it will display following Emulator window

6.0 RESULT :

Congratulations!!! you have developed your first Android Application

7.0 CONCLUSION:- Hence we hve studied and developed first app on Android.
9.0 Question:
9.1 What is main activity file?
87
9.2 How app take permission from user?
9.3 Make app to calculate addition,substraction.
9.4 Explain bin folder in brief.

10.0 Student Activity:

(Students need to answer any assigned questions from above questions 6-8 blank lines)

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

10.0 References/ Related Links:

EXPERIMENT NO 10
To study android app Inventor
1.0 AIM:
88
To Study and implement Programming in Android to install App Inventor and then use it to make an
app that uses GPS, Opens Dialog Boxes, Opens other apps, vibrates devices, plays sounds, converts
text to speech.

2.0 Learning Objectives:


a. Intellectual Skills

1 Familiar with linux terminal..


2 Familiar with object oriented language..
2.2 Motor Skills
1 Proficiency about working with Linux.
2 Dexterity of working with ANDROID environment.

3.0Apparatus
Required Hardware:

Ram:500MB

OS: linux more than 2.7 library.

Memory: 3GB free space.

Required Software:

1.JDK 7

2.Eclipse with ADT plugins.

3.Android SDK

4.0 THEORY:
App Inventor for Android is an open-source web application originally provided by Google, and now
maintained by the Massachusetts Institute of Technology (MIT).
It allows newcomers to computer programming to create software applications for
the Android operating system (OS). It uses a graphical interface, very similar to Scratch and
the StarLogo TNG user interface, which allows users to drag-and-drop visual objects to create an
application that can run on Android devices. In creating App Inventor, Google drew upon significant
prior research in educational computing, as well as work done within Google on online development
environments.

89
App Inventor and the projects on which it is based are informed by constructionist learning theories,
which emphasizes that programming can be a vehicle for engaging powerful ideas through active
learning. As such, it is part of an ongoing movement in computers and education that began with the
work of Seymour Papert and the MIT Logo Group in the 1960s and has also manifested itself
with Mitchel Resnick's work on Lego Mindstorms and StarLogo.

5.0 DIAGRAM & PROCEDURE :


The application was made available through request on July 12, 2010, and released publicly on
December 15, 2010. The App Inventor team was led by Hal Abelson[1] and Mark Friedman. In
the second half of 2011, Google released the source code, terminated its server, and provided
funding for the creation of The MIT Center for Mobile Learning, led by App Inventor creator
Hal Abelson and fellow MIT professors Eric Klopfer and Mitchel Resnick. The MIT version was
launched in March 2012.

On December 6, 2013 (the start of the Hour of Code), MIT released App Inventor 2, renaming the
original version "App Inventor Classic" Major differences are:

 The blocks editor in the original version ran in a separate Java process, using the Open Blocks Java
library for creating visual blocks programming languages and programming

App Inventor Classic Blocks Editor

Open Blocks is distributed by the Massachusetts Institute of Technology's Scheller Teacher Education
Program (STEP) and is derived from master's thesis research by Ricarose Roque. Professor Eric
Klopfer and Daniel Wendel of the Scheller Program supported the distribution of Open Blocks under
an MIT License. Open Blocks visual programming is closely related toStarLogo TNG, a project of

90
STEP, and Scratch, a project of MIT Media Laboratory's Lifelong Kindergarten Group. App Inventor
2 replaced Open Blocks with Blockly, a blocks editor that runs within the browser.

 The MIT AI2 Companion app enables real-time debugging on connected devices via Wi-Fi, not
just USB.

As of May 2014, there were 87 thousand weekly active users of the service and 1.9 million registered
users in 195 countries for a total of 4.7 million apps built.

6.0 CONCLUSION:- Hence We have studied App Inventor In android Successfully.

7.0 Question:
Explain history of android.

Which libraries are use for GPS?

How to install block editor?

Make app to convert text into speech.

8.0 Student Activity:


(Students need to answer any assigned questions from above questions 6-8 blank lines)
91
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------

9.0 References/ Related Links:

92
93

Вам также может понравиться