LAMP : THE PROMINENT OPEN SOURCE WEB PLATFORM FOR QUERY EXECUTION AND RESOURCE OPTIMIZATION. R. Mohanty Mumbai, India



Similar documents
Cloud Homework instructions for AWS default instance (Red Hat based)

LAMP Quickstart for Red Hat Enterprise Linux 4

CPE111 COMPUTER EXPLORATION

Ulteo Open Virtual Desktop Installation

Installing Booked scheduler on CentOS 6.5

Install Cacti Network Monitoring Tool on CentOS 6.4 / RHEL 6.4 / Scientific Linux 6.4

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

Installation documentation for Ulteo Open Virtual Desktop

IBM DB2 for Linux, UNIX, and Windows. Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

SQL Injection. Blossom Hands-on exercises for computer forensics and security

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

Architecture and Mode of Operation

Backup and Restore MySQL Databases

CCM 4350 Week 11. Security Architecture and Engineering. Guest Lecturer: Mr Louis Slabbert School of Science and Technology.

LAMP Server A Brief Overview

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

Sequential Query Language Database Networking Using SQL

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Drupal 101. Introduction to Drupal. October 10, 2015 nedcamp.org

Cacti complete network graphing solution. Oz Melamed E&M Computing Jun 2009

CN=Monitor Installation and Configuration v2.0

How to Install and Setting Up Drupal

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Modelling with R and MySQL. - Manual - Gesine Bökenkamp, Frauke Wiese, Clemens Wingenbach

Fermilab Central Web Service Site Owner User Manual. DocDB: CS-doc-5372

OS Installation: CentOS 5.8

Installing an open source version of MateCat

Network Monitoring Tool with LAMP Architecture

Designing a Virtual Center for E-Commerce

Installation Instructions

Document Freedom Workshop DFW 2012: CMS, Moodle and Web Publishing

Server Installation/Upgrade Guide

CrownPeak Playbook CrownPeak Hosting with PHP

Rapid Access Cloud: Se1ng up a Proxy Host

Installation of PHP, MariaDB, and Apache

Introduction to CloudScript

Installing and Running MOVES on Linux

Information Technology Services Classification Level Range C Reports to. Manager ITS Infrastructure Effective Date June 29 th, 2015 Position Summary

Web Development: Dynamically Generated Content

OpenPro ERP Software Installation Guide REDHAT LINUX

SETTING UP A LAMP SERVER REMOTELY

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

Software Collections

Short notes on webpage programming languages

Trollhättan, Sweden

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

A review and analysis of technologies for developing web applications

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

CentOS. Apache. 1 de 8. Pricing Features Customers Help & Community. Sign Up Login Help & Community. Articles & Tutorials. Questions. Chat.

Web Technologies Week 4 Hosting, Servers and Databases. Context. Contents. MSc in Computing Computing - IBITE Liverpool Hope University College

Pemrograman Web. 1. Pengenalan Web Server. M. Udin Harun Al Rasyid, S.Kom, Ph.D

Parallels Plesk Automation

Ingram Micro Cloud Hosted Services

Chapter 21 Web Servers

The Whole OS X Web Development System

nitrobit update server

E-Commerce: Designing And Creating An Online Store

Oracle Solaris Remote Lab User Guide for Release 1.01

To use MySQL effectively, you need to learn the syntax of a new language and grow

Architecture and Mode of Operation

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Installation Instructions

Administrator s Guide: perfsonar MDM 3.0

DYNAMIC TECHNOLOGIES ON THE WEB: EDUCATION ADMINISTRATION APPLICATIONS. Doug Martin, Ph.D. University of Cincinnati

USING THE DATABASE MANAGEMENT SYSTEM OF THE FINANCIAL STATEMENTS SUBMISSION

Visual FoxPro Accessing MySQL. presented to The Atlanta FoxPro Users Group June 19 th, 2007

Tibbr Installation Addendum for Amazon Web Services

Using Ruby on Rails for Web Development. Introduction Guide to Ruby on Rails: An extensive roundup of 100 Ultimate Resources

Ruby on Rails (Ruby 1.9.2, Rails 3.1.1) Installation

High Level Design Distributed Network Traffic Controller

OpenPro ERP Software Installation Guide Talbert Ave Suite 200 Fountain Valley, CA USA Phone Fax

IT3503 Web Development Techniques (Optional)

Installation Guide. Help Desk Manager. Version v12.1.0

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

GestióIP IPAM v3.0 IP address management software Installation Guide v0.1

MOODLE Installation on Windows Platform

OpenCATS Documentation

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

PHP ON A FAST TRACK INTRODUCTION: ROADMAP BY JAROSLAW FRANCIK. Companion web site: php.francik.name

DBMS Infrastructures and IT Career Recommendations. Jeff Fineberg November 21, 2011

Red Hat JBoss Core Services Apache HTTP Server 2.4 Apache HTTP Server Installation Guide

Application note: Connecting the to a Database

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

112 Linton House Union Street London SE1 0LH T: F:

THE CHALLENGE OF ADMINISTERING WEBSITES OR APPLICATIONS THAT REQUIRE 24/7 ACCESSIBILITY

Configuring Sun StorageTek SL500 tape library for Amanda Enterprise backup software

User Manual of the Pre-built Ubuntu Virutal Machine

Our Technology.NET Development services by Portweb Inc.

Embedded Based Web Server for CMS and Automation System

Migrating LAMP stack from x86 to Power using the Server Consolidation Tool

MySQL Quick Start Guide

LAMP [Linux. Apache. MySQL. PHP] Industrial Implementations Module Description

Setup a Virtual Host/Website

Setting Up Specify to use a Shared Workstation as a Database Server

Advantech AE Technical Share Document

Building Library Website using Drupal

Providing an Effective Intranet Knowledge Base Using Linux and Open Source Software

Transcription:

LAMP : THE PROMINENT OPEN SOURCE WEB PLATFORM FOR QUERY EXECUTION AND RESOURCE OPTIMIZATION R. Mohanty Mumbai, India INTRODUCTION TO MAJOR WEB DEVELOPMENT PLATFORMS The concurrent online business transactions by millions of users have increased the scope of research on dynamic and database driven web applications. Many organizations are working in this area to explore new platforms as well as scripting languages to get the results with minimum query execution and response time. Different technologies are used for developing dynamic web applications including PHP, MySQL, Apache, ASP, ASP.NET, SQL Server, PostgreSQL, Python and many more. These technologies are implemented on MS Windows, Linux, Sun Solaris and other operating systems. Most of the organizations use LAMP (Linux, Apache, MySQL, PHP) or WAMP (Windows, Apache, MySQL, PHP) Stacks to develop low cost and high performance web applications using PHP and MySQL as efficient web programming tools. This paper highlights the excellent performance of LAMP Platform

over WAMP Platform. In this paper, I have taken results of query execution of both platforms and found that LAMP is giving results in lesser time span than WAMP. A dynamic web application has four major components: Operating System, Web Server (HTTP Server), Back-End Database and Server Side Scripting Language. A number of prominent combinations are available to develop the dynamic web applications including LAMP (Linux Apache, MySQL, PHP), WAMP (Windows, Apache, MySQL, PHP), WISA (Windows, IIS, SQL Server, ASP.NET), MAMP (Mac, Apache, MySQL, PHP), SAMP (Solaris, Apache, MySQL, PHP) and this list is also increasing day by day. The operating system is known as the platform on which all other programs and tools executes. Generally Windows is considered as friendly and easier to use operating system. Still there are many problems with Windows including security vulnerability and administrative tasks to handle different operations. In case of small web applications, Windows is adopted and all web pages are hosted on this operating system. Web server or HTTP Server is an important program which takes request for pages from HTTP Client (Web Browser), interprets the request, and returns the results. Apache Web Server is an open-source program which is available on both the Linux and Windows platforms. Apache Web Server is considered more secure than IIS (Internet Information Services) Server. Database is used to store information to be retrieved, stored, and manipulated by the server side scripting language. MySQL is an open source and free database

management system that supports most of the standard SQL (Structured Query Language) syntax and runs on all operating systems. Microsoft SQL Server or MSSQL or just SQL Server is a licensed product which is considered an enterprise-level database. SYSTEM REQUIREMENTS IN PROMINENT WEB DEVELOPMENT PLATFORMS As far as system requirements are concerned, each web development framework needs its own library to run its source code. In case of ASP.NET, there is requirement of.net Framework on the server and Visual Studio is required to develop the web applications. Same is the case of Coldfusion, whereby specific system requirements must be fulfilled before working on actual project. Coldfusion is required to be installed on the systems with particular system requirements. When we discuss about LAMP Stack, there is no need of such library. LAMP can be installed and used easily without any special requirements. Moreover, PHP files can be created and edited using any suitable source code editor or simply Notepad. LAMP STACK GETTING FAME IN INDUSTRIES LAMP, MAMP, SAMP, WAMP and WISA are excellent platforms for developing

dynamic and business web applications. LAMP is free, open-source, and communitysupported while WAMP is expensive and corporate suite. Generally LAMP is recommended for most dynamic web applications because of its cost, customization, simplicity in web integration, and Apache s security features. Any web platform which is Linux based or simply open source is considered as better option than other web stacks. With the popularity of Linux Operating System, a new generation of secured web applications has emerged. Now LAMP suite is considered as more efficient and secured for hosting any high traffic website. Cost is not only the factor in choosing the LAMP technology, but many enterprises are being attracted to the infrastructure required for both development and deployment. Moreover, there are many reasons for choosing LAMP for organization as summarized below. Flexibility Customization Ease of Development Ease of Deployment Security Community and Support Each of the components in the LAMP stack is an example of Free or Open Source Software (FOSS).

INSTALLATION AND CONFIGURATION OF LAMP STACK INSTALLING LAMP ON FEDORA Apache 1. Apache is the web server to handle the requests of client. In Fedora installation, depending on the choices made during the installation process, we may or may not have Apache already installed. Just use the following command to check: # rpm -q httpd 2. If it tells a version number, then it's already installed and we can progress to the next step. Otherwise, we have to install it: # yum install httpd 3. After installation, the service needs to be configured to start automatically. # /sbin/chkconfig httpd on 4. To start the server process: # /sbin/service httpd start

MySQL 1. The database component of the LAMP stack is MySQL. The following command will install the database and the server process. # yum install mysql mysql-server 2. The server process must likewise be running and accessible. # /sbin/chkconfig mysqld on # echo '-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT' >> /etc/sysconfig/iptables # /sbin/service iptables restart # /sbin/service mysqld start 3. To check whether everything is working okay so far, run this command to print out some information and check its status: # mysqladmin version status PHP (or Perl or Python) 1. To install PHP along with the needed stuff to glue it together with the web server and the mysql database. # yum install php php-mysql

2. We have to restart the web server to make sure it loads the PHP module. # /sbin/service httpd restart 3. To run Python, run the following. (Python is already installed on all Fedora Core installations, so it's not needed to install that as well.) # yum install mod_python MySQL-python 4. For Perl, the following will get you started: # yum install perl mod_perl perl-dbd-mysql INSTALLING LAMP ON UBUNTU Install Apache To start off we will install Apache. 1. Open the Terminal (Applications > Accessories > Terminal). 2. Copy/Paste the following line of code into Terminal and then press enter: $ sudo apt-get install apache2 3. The Terminal will then ask for password, type it and then press enter.

To make sure everything installed correctly we will now test Apache to ensure it is working properly. 1. Open any web browser and then enter the following into the web address: http://localhost/ There should be a message "It works!", congrats to you! Install PHP In this part we will install PHP 5. Step 1. Again open the Terminal (Applications > Accessories > Terminal). Step 2. Copy/Paste the following line into Terminal and press enter: $ sudo apt-get install php5 libapache2-mod-php5 Step 3. Now, we have to restart Apache Web Server. Type the following code in Terminal to do this: $ sudo /etc/init.d/apache2 restart To check whether everything is find let's give it a quick test run.

Step 1. In the terminal copy/paste the following line: sudo gedit /var/www/testphp.php This will open up a file called phptest.php. Step 2. Copy/Paste this line into the phptest file: <?php phpinfo();?> Step 3. Save and close the file. Step 4. Now open you're web browser and type the following into the web address: http://localhost/testphp.php Install MySQL Step 1. Open the Terminal and then copy/paste this line: $ sudo apt-get install mysql-server Step 2 (optional). To enable other computers work on our network and to view the server, we must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnf file. $ gksudo gedit /etc/mysql/my.cnf

Change the line bind-address = 127.0.0.1 And change the 127.0.0.1 to your IP address. Step 3. Start by typing the following into Terminal: $ mysql -u root Use the following code - mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword'); Step 4. Now, we will install a program called phpmyadmin, an easy tool to edit your databases. Copy/paste the following line into Terminal: $ sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin After installation, our next task is to get PHP to work with MySQL. Now, we have to open a file entitled php.ini. To open it type the following: $ gksudo gedit /etc/php5/apache2/php.ini Uncomment the following line by taking out the semicolon (;). Change this line: ;extension=mysql.so

To look like this: extension=mysql.so Restart Apache and it is done $ sudo /etc/init.d/apache2 restart EXPERIMENTAL ANALYSIS OF QUERY EXECUTION IN LAMP AND WAMP I have developed a Server Side Program in PHP and XML is used to store database records. The PHP Script was executed on both platforms LAMP (Ubuntu Desktop Edition Linux, Apache Web Server, MySQL, PHP) and WAMP (WAMP Server 2.0h) to check the performance in terms of response time and query execution time. On execution of the script on both platforms, I found that LAMP is giving results in less time as compared to WAMP suite. Table-1 shows the query execution results on both platforms. XML Database Structure <?xml version="1.0" encoding="iso-8859-1"?> <employees> <ID>1</ID>

<NAME>Bob Dylan</NAME> <SALARY>9000</SALARY> <DEPARTMENT>Research</DEPARTMENT> <ID>2</ID> <NAME>Bonnie Tyler</NAME> <SALARY>10000</SALARY> <DEPARTMENT>Testing</DEPARTMENT> <ID>3</ID> <NAME>Dr. Smith</NAME> <SALARY>19000</SALARY> <DEPARTMENT>Testing</DEPARTMENT> <ID>4</ID> <NAME>Gary Moore</NAME> <SALARY>23000</SALARY> <DEPARTMENT>Development</DEPARTMENT> <ID>5</ID>

<NAME>Eros Ramazzotti</NAME> <SALARY>30000</SALARY> <DEPARTMENT>Development</DEPARTMENT> <ID>6</ID> <NAME>Bee Gees</NAME> <SALARY>13000</SALARY> <DEPARTMENT>Research</DEPARTMENT> <ID>7</ID> <NAME>Dr.Hook</NAME> <SALARY>UK</SALARY> <DEPARTMENT>Testing</DEPARTMENT> <ID>8</ID> <NAME>Rod Stewart</NAME> <SALARY>12000</SALARY> <DEPARTMENT>Development</DEPARTMENT> <ID>9</ID>

<NAME>Andrea Bocelli</NAME> <SALARY>17000</SALARY> <DEPARTMENT>Development</DEPARTMENT> <ID>10</ID> <NAME>Percy Sledge</NAME> <SALARY>80000</SALARY> <DEPARTMENT>Research</DEPARTMENT> </employees> Output Format For Getting Query Execution Time Select the Department: Testing ID: 7 NAME: Dr.Hook SALARY: UK DEPARTMENT: Testing Query took 0.0006 sec Select the Department: Development ID: 9 NAME: Andrea Bocelli

SALARY: 17000 DEPARTMENT: Development Query took 0.0008 sec QUERY EXECUTION TIME ( IN SECONDS) LAMP Platform WAMP Platform 0.0006 0.0011 0.0011 0.0138 0.0007 0.0011 0.0004 0.0008 0.0007 0.0009 0.0004 0.0008 0.0007 0.0009 Table-1 Figure-2 depicts the query execution time in LAMP and WAMP platforms. It is clear from Figure-2 that LAMP is excellent in performance.

Query Execution Time in LAMP and WAMP Time in Seconds 0.016 0.014 0.012 0.01 0.008 0.006 0.004 0.002 0 1 2 3 4 5 6 7 Attempt LAMP WAMP Figure-1 CONCLUSION In this paper, the performance of two major web platforms has been evaluated. After running the script in both LAMP and WAMP stacks, I found that LAMP is better option for hosting dynamic websites than WAMP. Moreover, LAMP is more secured than WAMP because of in-built security mechanism in Linux Distribution. In my experiments, a significant performance is obtained using Linux (Ubuntu), Apache Web Server, MySQL and PHP.

REFERENCES 1. Musa Jafar, Anderson, Amjad Abdullat : Comparison of Dynamic Web Content Processing Language Performance Under a LAMP Architecture, (2008) 2. Dale Dougherty, LAMP: The Open Source Web Platform, (2001) 3. LAMP Application Development Services, [Online]. Available: http://www.semaphoresoftware.com/technology_offering/software_application_linux.htm [Accessed : June 30, 2009] 4. Tony Steidler-Dennison, LAMP lights the web, Red Hat Magazine Issue #3 January, (2005) 5. Installing any PHP based software over LAMP/WAMP, [Online]. Available: http://www.lugmanipal.org/2007/12/16/installing-any-php-based-software-overlampwamp [Accessed: June 04, 2009] 6. Chris DiBona, LAMP to WAMP to XAMP to SOFT, (2005) 7. PHP LAMP/WAMP Architecture, http://www.freewebs.com/php-resources/phplamp-wamp-architecture.html [Accessed: May 04, 2009] 8. http://www.webopedia.com/didyouknow/computer_science/2007/lamp.asp Last Accessed: Dec. 12, 2009 9. http://fedorasolved.org/server-solutions/lamp-stack