Foss / Lamp Session - I
Foss / Lamp Session - I
Session - I
Revathi J
Bharathidasan University Technology Park (BUTP)
Bharathidasan University
Web
• The WWW may seem like magic, until we
understand how it works
N
Disk
Internet/ Network
Data
base
Client Server
•Render HTML Images, etc. •Serve up content
•Execute JavaScript • HTML
•Execute Java applets •Images
•Send data to server •Documents, etc.
using CGI protocol •Process data received
from client
Serving Up Static Data
Server
www.example.com Disk
Request
from Client <html>
/var/www/html/
index.html
</html>
Content sent
to client No processing
of text file
Serving Up Dynamic Data
Server
www.example.com Disk
Request
from Client
#1 /usr/bin/perl
/var/www/cgi-bin/
a.cgi
Content sent
to client
Outputs
HTML Executes
Perl a.cgi
Serving Up Embedded data
Server
www.example.com Disk
Request
from Client <html>
/var/www/html/
a.html
</html>
Content sent
to client
Processes
embedded
HTML
Processor
•mod_perl
•PHP
Open Source Definition
• Technical definition:
Source code is available to users
• Functional definition:
Usually free or cheap to acquire and use
Primarily developed by volunteers
Anyone can modify and customize
Users have direct input into development
FLOSS
(Free/Libre & Open Source Software)
Note: Not all open source software is cost-free, and not all
cost-free software is open source
Free/Open Source Software (FOSS)
"How can anything be Licenses –
good if it is free Contract/ Agreement
(i.e. has no monetary between users and
value attached to developers of the
it)?!!!“ software
Patent -
Cost free protection to owners
or but allow others to
License Free? learn from it
Copy right -
Power to exclude
Proprietary Software Vs Open Source Software
• Text
▫ Use Ctrl+Alt+F1 to switch to a text console — logging in
works as it does in X.
▫ Use Ctrl+Alt+F2, Ctrl+Alt+F3, etc., to switch between
virtual terminals — usually about 6 are provided.
▫ Use Ctrl+Alt+F7, or whatever is after the virtual
terminals, to switch back to X.
Login & Logout
• Login
• Logout
▫ Pressing Ctrl+d at the shell prompt will also quit the shell.
• Two types
– Complete or Absolute path: specifies all of the steps
(directories) you need to traverse to get to the file or
directory you want starting from the root
– Relative path: specifies how to get from where you are now
to the file or directory you want
Paths (cont.)
/ home jack
exports data
Syntax:
$ cp [option] <source file> <destination>
$ cp [option] <multiple source file> <destination>
Type of – option,
i - interactive mode, ask before overwriting
r - recursive mode, recursively copy an entire things
f - force mode, force to copy a directory or file.
Moving files and Directories
• The mv (move) command is used to move files
and directories from source to destination.
• The mv and cp functions are same, the only
different is that cp results in matching identical
files; with mv, the source disappears, leaving only
the destination file(s).
Syntax:
$ mv <source> <destination>
Renaming Files and directories
• rename command is used to rename the file and
directorie.
Syntax:
$ rename <oldfile> <newfile> <oldfile>
$ rename <olddirectory> <newdirectory>
<olddirectory>
Creating files and directories
• To create a empty file use the touch command.
(Note, we can create multiple files in a single
command)
$ touch filename
$ touch filename1 filename2 filename3
Syntax:
$ rm [option] file
$ rmdir dir
Type of – option,
i - interactive mode, ask before overwriting
r - recursive mode, recursively copy an entire things
f - force mode, force to copy a directory or file.
History
• The history command is used to list the entered
commands with numbers.
Syntax:
$ history
$ history –c //used to clear the history
Example
$his<tab>
$history
$ls -l tex<tab>
$ls -l text.txt
Thank you