Kernel Configuration: To Install and Configure The Kernel in Linuxplatform
Kernel Configuration: To Install and Configure The Kernel in Linuxplatform
No
:1
KERNEL CONFIGURATION
Date:
AIM:
To install and configure the kernel in linuxplatform.
STEPS TO INSTALL KERNAL:
STPE 1:First check current working kernel version.
[fosslab@fosslab]$uname r
2.6.35.6-45.fc14.i686
STEP 2:Download latest kernel from www.kernel.org.
STEP 3:login to root user.
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 4:Extract the kernel source code.
[root@fosslab]#tar zxvf linux-2.6.39.2.tar.gz
STEP 5: change the directory to kernel source.
[root@fosslab]#cd linux-2.6.39.2
STEP 6: open the make file.
[root@fosslab linux-2.6.39.2]#vi makefile
Look fourth line it will be in following format.
EXTRAVERSION= .2
1
Now you can add mykernel at end of this line like this
EXTRAVERSION= .2-mykernel
Save and exit the file.
STEP 7: now make menu configuration.
[root@fosslab linux-2.6.39.2]#make menuconfig
Now following window is display to you.
support.
RESULT:
Thus the kernel was successfully installed and configured.
Ex.No:
2
VIRTUALIZATION
Date:
AIM
:
Virtualisation environment (e.g., xen, kqemu or lguest) to
test an
applications,new kernels and isolate applications.
STEPS FOR VIRTUALIZATION USING QEMU AND
FREEDOS:
STEP 1:Download the fdbasecd.iso from
www.freedos.org (or) from fosslab server.
The following steps should be followed from the
directory where fdbasecd.iso is stored.
STEP 2:create virtualdisk.
[fosslab@fosslab]$qemu-img create virtualdisk.img
100M
STEP 3: boot the disk.
[fosslab@fosslab]$qemu
-hdavirtualdisk.img -cdrom
fdbasecd.iso -boot d
RESULT:
The virtual hard disk primary DOS partition is successfully
created.
Ex.No:
3
Date:
AIM
:
To Installing webattery for compiling from source.
STEPS FOR INSTALLING WEBATTERY:
STEP 1:download webbattery from following link.
http://pkgs.org/contos-5-rhel-5/epeli386/webattery-1.26.e15.src.rpm/download/
STEP 2: Move downloaded file to /home/fosslab folder.
[fosslab@fosslab]$mv Downloads/webattery-1.26.e15.src.rpm /home/fosslab
STEP 3:change directory to /home/fosslab.
[fosslab@fosslab]$cd /home/fosslab
[fosslab@fosslab]$rpm ivh webatter-1.26.e15.src.rpm
The above command creates a directory
rbmbuildunder the home folder /home/fosslab/
Example:/home/fosslab/rpmbuild
STEP 4:change directory.
[fosslab@fosslab]$cd
/home/fosslab/rpmbuild/SOURCES/
STEP 5:Extract the source file using the command.
[fosslab@fosslab SOURCES]$tar zxvf webattery1.2.tar.gz
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 7: change the directory.
[root@fosslab]#cd
/home/fosslab/rpmbuild/SOURCES/
[root@fosslab SOURCES]#cd webattery-1.2/
STEP 8:check for the necessary tools/libraries for the
build environment and creates the makefile.
[root@fosslab webattery-1.2]#./configure
STEP 9:compile all the source files and create
the executable binaries using following
command.
[root@fosslab webattery-1.2]#make
STEP 10: now install webattery.
[root@fosslab webattery-1.2]#make install
STEP 11: now verify webattery is installed or not.
[root@fosslab]#which webattery
/usr/local/bin/webattery
RESU
LT:
The webattery is successfully installed in linux.
Ex.No:
4
Date:
AIM
:
To install the zip packages (JOOMLA) in linux platform.
STEPS FOR INSTALLING JOOMLA ZIP PACKAGE:
STEP 1:First of all we need to make sure that php and
mysql is install on our system included our
webserver.
[fosslab@fosslab]$which phpmysqlhttpd
/usr/local/bin/php
/usr/bin/mysql
/usr/sbin/httpd
If php or mysql or apache server is not installed
you can install with following commands
[fosslab@fosslab]$sudo yum -y install
httpdphpmysqlmysql- server php-mysql
STEP 2: Now phpmysql and apache(httpd) server is
installed next we need to download Joomla from
its site.
[fosslab@fosslab]$wget
http://joomlacode.org/gf/download/frsrelease/
10785/42655/ Joomla_1.5.14-StableFull_Package.zip
Now Next steps are to be performed by root user
STEP 3:login to root user
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
Click next again its telling you your stats about your
configuration.
Click next
RESULT:
The zip packages (JOOMLA) was successfully
installed in linux operating system (fedora).
Ex.No:
5
Date:
AIM
:
# compatibility.
#
security = user
passdb backend = tdbsam
[...]
This enables Linux system users to log in to the Samba
server.
STEP 3:create the system startup links for Samba and start it.
[root@fosslab]#chkconfig --levels 235 smb
on /etc/init.d/smb start
STEP 4:Create the directory for sharing the files and
change the group to the users group.
[root@fosslab]#mkdir -p /home/shares/allusers
[root@fosslab]#chown -R root:users
/home/shares/allusers/ [root@fosslab]#chmod
-R ug+rwx,o+rx-w /home/shares/allusers/
At the end of the file /etc/samba/smb.conf add the
following
lines.
[root@fosslab]#vi /etc/samba/smb.conf
[...]
[alluse
rs]
comment = All Users
path = /home/shares/allusers
valid users =
@users force
group = users
create mask =
0660 directory
mask = 0771
writable = yes
If you want all users to be able to read and write
to their home directories via Samba, add the
following lines to
/etc/samba/smb.conf (make sure you comment out or
remove the other [homes] section in thesmb.conf
file!).
[...]
[home
s]
comment = Home Directories
browseable =
no valid users
= %S writable
= yes create
mask = 0700
directory mask = 0700
nowrestart Samba.
[root@fosslab]#/etc/init.d/smb restart
STEP 5:Adding and managing users.
Add new user sarath into samba.
[root@fosslab]#user add sarath -m -G users
Set a password for sarath in the Linux system user
database. [root@fosslab]#passwd sarath
-> Enter the password for user sarath.
Now add the user sarath to the Samba user database.
[root@fosslab]#smb passwd a sarath
-> Enter the samba password for user sarath.
Now you should be able to log in from your Windows
workstation with the file explorer (address is
\\192.168.0.100 or
\\192.168.0.100\sarath for sarath's home directory) using
the
username sarath and the chosen password and store
files on the Linux server either in tom's home
directory or in the public shared directory.
RESULT:
Thus the SAMBA and CUPS was successfully installed.
Ex.No:
6
Date:
AIM
:
fuse
STEP
3:Now
$fusemount u mountdir
[fosslab@fosslab example]$ls l
mountdir/ [fosslab@fosslab example]
$mount
[fosslab@fosslab example]$ls l rootdir/
Total 12 files.
[fosslab@fosslab example]$ls l
mountdir/ [fosslab@fosslab
example]$tail f bbfs.log
RESULT:
Thus the userspace driver using FUSE was successfully
executed.
Ex.No:
7
GUI PROGRAMMING
Date:
AIM
:
Click Next.
Click next.
DRAW A LINE.
STEP 6:create a simple form for draw a line. Select
button from tool box and draw it in form. select
drawing area from toolbox and draw
it in form like this.
MOUSE TRACKING:
STEP 6:create a simple form for mouse tracking. Select
two textboxes from tool box and draw it in form.
select drawing area from toolbox and draw it in
form.
STEP 7:Double click the drawing area and type the following
codes.
PUBLIC SUB
Form1_MouseMove()
Textbox1.text = Mouse.X
Textbox2.text = Mouse.Y
END
STEP 8:now click mouse pointer in out of drawing
area the output is displayed like this.
RESULT:
Ex.No
:8
Date:
AIM
:
ALL
[fosslab@fosslab]$export JAVA_HOME=/usr/
Test the variable.
[fosslab@fosslab]$$JAVA_HOME/bin java
version
STEP 9: change the directory to subversion edge source
file.
[fosslab@fosslab]$cd csvn
STEP 10: now install the subversion edge.
[fosslab@fosslab]$sudo E bin/csvn install
STEP 11: start the csvn.
[fosslab@fosslab]$bin/csvn start
STEP 12: start the csvnconsule.
[fosslab@fosslab]$bin/csvn console
Then the csvn console url is show to you copy this
url and past it into your web browser. Then the
following page is display to you.
RESULT:
Thus the version control system was successfully installed.
Ex.N
o:
Date
:
AIM
:
RESULT:
The college database is successfully created in MySQL
database.
Ex.No:
9
Date:
AIM:
To fetch the data from MySQL database using perl
language in
Linux platform.
Databaseconnec
tion.pl use DBI;
my
$dbh=DBI>connect('DBI:mysql:database=college;host=localhost','root','admin123');
OUTPUT:
[root@fosslab]#Perl Databaseconnection.pl
ID=1 Name=sarath
Dept=CSE ID=2
Name=kumar
Dept=CSE ID=3
Name=selva Dept=CSE
ID=4 Name=karthik
Dept=CSE
[root@fosslab]#
RESULT:
Thus the above program for MySQL database
connection was successfully executed.
Ex.No:
10
Date:
AIM:
To write a simple program for generating random
numbers in web page using PHP.
input.html
<form method="post" action="forms.php">
<p>Range starting
<input type="text" name="begin"/>
</p>
<p>Range end
<input type="text name="end"/>
</p>
<p><input type="submit" value="generate">
</p>
</form>
Forms.php
<?phpimport_request_variable("pg","form-");?>
<html>
<boby>
<p>From Range
<?php
echo $ form_begin;
?>
To<?
php
echo $ form_end;
?>
<P>
I have selected Random number
<?php
echo rand($ form_begin,$form_end);
?>
</p>
</body>
</html>
OUTPUT:
RESULT:
Thus the above program for generating random number
using PHP
was successfully executed.
Ex.No:
11
Date:
AIM:
To fetch the data from MySQL database using python
language in
Linux platform.
Algorithm for Python Coding:
STEP 1:Include the python package.
STEP 2:import the MySQL database.
STEP 3:login to the database using
MySQLdb.connect() function . STEP 4:Select the
data from database table using select query. STEP
5:Print the rows andColumn data.
STEP 6:close the connection.
OUTPUT:
[root@fosslab]#python pythondbconnection.py
Row:
Column
:1
Column:sar
ath
Column:CSE
Row:
Column:2
Column:Ku
mar
Column:CSE
Row:
Column:3
Column:sel
va
Column:CS
E Row:
Column:4
Column:karthik
Column:C
SE End of
row.
RESULT:
Thus the above program for MySQL database connection
using
Python language was successfully executed.
Ex.No:
12
Date:
AIM:
To set up the complete network interface using ifconfig
command.
STEPS FOR SETTING UP NETWORK INTERFACE:
STEP 1:To see how your network is configured on your
computer, use the ifconfigcommand.
NOTE:This command is in the /sbindirectory and
this directory is not in normal users's path and only
in root's path. So, as normal user, you will have to
use "/sbin/ifconfig" command on the command
prompt. As root just using "ifconfig" will do.
[fosslab@fosslab]$/sbin/ifconfig
eth0
Link encap:EthernetHWaddr 00:1D:92:AD:93:2B
inet addr:192.168.1.111 Bcast:192.168.1.255
Mask:255.255.255.0
inet6addr: fe80::21d:92f:fead:932b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:9271 errors:0 dropped:0 overruns:0
frame:0
TX packets:1238 errors:0 dropped:0 overruns:0
carrier:0
collisions:0 txqueuelen:1000
RX bytes:1476737 (1.4 MiB) TX bytes:146421
(142.9 KiB)
Interrupt:42 Base
address:0xa000 lo
Link
encap:Local Loopback
inet addr:127.0.0.1
Mask:255.0.0.0
inet6addr: ::1/128
Scope:Host
RESULT:
5
7