Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome or Safari browser.

Dive into FOSS and LAMP

June 2012  • Karthikeyan NG

Agenda for the day
  1. FOSS
  2. Linux
  3. Apache
  4. MySQL
  5. PHP
  6. Demo
Free and Open Source Software
  • Any computer software that permits the user to access the program’s source code, modify it and distribute any derivative work under a license.

  • It is designed to encourage the free use and improvement of software by ensuring that anyone can access the source code and modify it freely.

Four types of freedom:
  1. The freedom to run the program, for any purpose.

  2. The freedom to study how the program works and modify it to suit the user’s needs. This also means access to the source code, since making changes in a program without having the source code is exceedingly difficult.

Four types of freedom:
  1. The freedom to redistribute copies of the program, either gratis or for a fee.

  2. The freedom to improve the program and release the modified version to the public.

Benefits of FOSS
  1. Affordability
  2. Stability and Security
  3. Open Standards
  4. Cooperation/Collaboration for quality
  5. Its your wish

Understanding
L-A-M-P Architecture

Linux
  • Unix developed by AT&T in 1969

  • MINIX kernel developed by Andrew S. Tanenbaum

  • Linus Torvalds developed Linux from MINIX in 1991

  • GNU Project started by Richard M Stallman in 1983

Top 500 Operating Systems
Apache
  1. An Open Source HTTP Web Server

  2. WebServer which powers more than 65% of the sites

  3. Top 500 Operating Systems
How Web server & DNS works?
Top 500 Operating Systems

MySQL

MySQL Logo
Introduction to MySQL
  • Open Source, Speedy, Scalable, Reliable database technology

  • It is a RDBMS

  • Who is using MySQL?

RDBMS means?
  • They have a collection of Tables

  • Columns define attributes of the data. All the data in a column belongs to same datatype

  • A record is stored in a row

  • Do you have large set? Do you have redundant data? Do you give preference to security? Do you need strict enforcements on datatype?

  • Alternative for RDBMS?

PHP Logo
Usage of server-side programming languages
PHP Logo
What is PHP?
  1. PHP stands for PHP: Hypertext Preprocessor
  2. PHP is a server-side scripting language
  3. PHP supports many databases(MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  4. PHP runs on different platforms (Windows, Linux, Mac, etc.)
  5. PHP is compatible with almost all servers used today (Apache, IIS, etc.)
Syntax

<html>
<body>
<?php
//This is hello chennai example      
/*This is also a comment */
            echo "Vanakkam Chennai!";
?>
</body>
</html>

PHP is a Loosely typed language
  1. Variables in PHP starts with a $ sign, followed by the name of the variable
  2. The variable name must begin with a letter or the underscore character
  3. A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  4. A variable name should not contain spaces
  5. Variable names are case sensitive (y and Y are two different variables)
PHP - MySQL connection

<?php
//This is PHP - MySQL connection example      
$con = mysql_connect("localhost","user","password");
if (!$con)
{
        die('Could not connect: ' . mysql_error());
}
mysql_close($con);
?>

Questions?

Thank You!