Add

Friday 25 October 2013

Apache v/s IIS

APACHE v/s IIS

Every website needs Web server software in order to process requests and deliver data and choice software either Apache or IIS.

Apache HTTP Server

The Apache HTTP server is an open source Web server application developed by the Apache Software Foundation. The server software is freely distributed, Most suited operating system would be Linux (which is also Open Source Operating system) even it comes with windows version.

Most PHP based web applications prefer apache over IIS and if you want ASP.NET web application in Linux us hard task (You have to go Mono instead .NET Framework)
Multi-processing modules (MPMs) provide the support for accepting and processing requests through traditional “forked” model or threaded model in UNIX. For Windows, this also uses a threaded model, almost similar IIS 6.0.

Microsoft Internet Information Service

Microsoft’s IIS is the next most popular Web server after Apache. It enables services like File Transfer Protocol (FTP), Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP) and others that enable a Windows machine to manage Web sites. The latest version also includes various modules for security, filtering, caching, ASP.net integration, compression, redirects, logging and diagnostics.

Because IIS is provided for Windows systems only, the choice to use IIS necessitates the choice of a Windows Server, and therefore increases running costs. Windows is also prone to more malware attacks, and has a reputation as a less secure server option. IIS offers in-depth diagnostic tools such as failed request tracing, request monitoring and runtime data.
All requests from clients and processes handled through two components. 

Kernel mode listener and HTTP.sys listens and accepts requests from clients, placing the requests into one or more request queues. IIS then processes the requests in these queues using at least one worker process to control the execution of the individual requests and applications thus Admin can recycle requests instead of reboot.


Executing Environment
IIS
Apache
Independent Request Handler
Yes
Yes (limited)
Multiple Process Request Handlers
Yes
Yes
Thread Support
Yes
Yes (on a suitable OS)


Language Components
IIS
Apache
ASP
Yes
Apache:::ASP or mod mono
CGI
Yes
Yes
Perl
Yes
Yes
Python
Yes
Yes
PHP
Yes
Yes
JSP
Yes
Yes
.NET Integrated
Yes
No


Systems support encryption technology in SSL, and can be used with IPSec implementations and IPv6.

Security Authentication
IIS
Apache
Secure Login
Yes
Yes
SSL
Yes
Yes
Basic Authentication
Yes
Yes
Digest Authentication
Yes
Yes
LDAP Authentication
Yes
Yes
Active Directory Authentication
Yes
Only with third-party modules
Passport Authentication
Yes
No

Performance measurements is a difficult job though running IIS and apache, as it all depends on configurations and design you doing with the system


Performance Features
IIS
Apache
In-Memory Cache
Yes
Yes
On Disk Cache
Yes
Yes with mod_file_cache
Built-In Execution support
Yes, with a suitable ISAPI filter
Yes with suitable modules
Cached Execution support
Yes, with ASP/ASP.NET
Yes  with mod_perl and others


Support Model
IIS
Apache
Text File Configuration
Yes, through XML Metabase
Yes
Command Line Management
Yes
Limited
Remote CLI
Yes
Yes
Web-Based Management
Yes
Yes, through Webmin and others
GUI-Based Management
Yes
Yes, through Comanche and others

to conclude.......

 Apache
IIS
More than 60% of Information websites
20% of information websites
Supported in Unix, Linux, Windows, OS/2
Supported with Windows
Apache is modular in structure, permitting Apache users to pick and choose modules to fit their requirements
ability to customize IIS functionality is limited
LAMP – Linux + Apache + MySQL + PHP ( Free and Open Source s/w )
WIMA - Windows + IIS + MS SQL +ASP.NET (Not Free and Closed s/w )

LAMP combination is lot cheaper as there are no licensing costs.
IIS and Windows are licensing will be an added cost, potential lock in to Microsoft products


Please feel free to correct me, you comments are most welcome. 

Sunday 20 October 2013

BOOTING with GNU GRUB / GRUB2 Part I


BOOTING - GNU GRUB / GRUB2
(PART - I)

A
Hhh!! Word BOOTING!! Since from 5th standard I listening this and tried to understand but still I don’t think I finished 20% complete yet, before starting GRUB2/GNU GRUB bootloader. Let us recall few very basic concepts of booting (process of computer booting up) very first set of instructions performed when you pressed power button of your CPU. BIOS function can take few seconds and typically involves performing power-on self-test, locating and initializing peripheral devices, and then finding, loading, initializing and starting an operating system. 

·     Hard Boot/Cold Boot involves turning on the power with the on/off switch.

·   Soft Boot/Warm Boot involves using the operating system to reboot, i.e without cycling power so some of the initial operations might be skipped on a soft reboot.



Before invention of ROM (Read only memory) there were of ad-hoc methods to get a small program into memory load initial software onto the computer. Growth in the capacity of ROM evolved so much and now Hardware are providing BIOS setup ready. Some embedded systems do not require a noticeable boot sequence to begin functioning and when turned on may simply run operational programs that are stored in ROM.


GNU GRUB


Coming back to GNU GRUB/GRUB2 evolved boot loader from GRUB Legacy first software program that runs when a computer kicks off, from loading and transferring control over operating system/kernel which intern initializes the rest of the operating system (e.g. FreeBSD, NetBSD, OpenBSD, GNU/Linux and many Proprietary OS's Windows, Mac OS X. Important features in GRUB is flexibility, understands filesystems and kernel executable formats, so you can load an arbitrary operating system the way you like, without recording the physical position of your kernel on the disk.


Advantages / Features
(Promptly I couldn't understand everything however I tried to put FYR)

·     Recognize multiple executable formats: Support many of the a.out variants plus ELF. Symbol tables are also loaded.

·     Supporting non-Multiboot kernels

·     Load multiples modules:  support the Multiboot feature of loading multiple modules.

·     Load a configuration file: human-readable text configuration file with preset boot commands.

·     Provide a menu interface: listing preset boot commands, with a programmable timeout, is available

·     Have a flexible command-line interface: fairly flexible command-line interface, accessible from the menu, is available to edit any preset commands, or write a new boot command set from scratch.

·     Support automatic decompression: Can decompress files which were compressed by gzip or xz

·     Access data on any installed device: Supporting data reading from any or all floppies or hard disk(s) recognized by the BIOS

·     Be independent of drive geometry translations

·     Detect all installed ram: find all the installed ram uses advanced BIOS query technique for finding all memory

·     Support Logical Block Address mode:

·     Support network booting: Support network loading of OS images using TFTP protocol

·     Support remote terminals: support computers with no console, GRUB provides remote terminal support

G
RUB2 files structure has changed lot since GRub Legacy places its files are under three core locations:

/boot/grub2


/boot/grub2/grub.cfg - This main configuration file contains all information about the Supporting non-Multiboot kernels and is built by the grub2-mkconfig command, and it should not be edited manually by hand.


Scripts under /etc/grub.d/

It’s about shell scripts you can read and fully understand them though if you have some strong scripting experience.

device.map configuration file keeps drive device names from BIOS. The map between BIOS drives and Linux devices cannot always be guessed correctly when change the boot sequence between IDE and SCSI in your BIOS.

GRUB2 avoids this problem of device ID strings (UUIDs) or file system labels when generating grub.cfg Important that GRUB2 partition number start at 1 and not at 0 as in GRUB Legacy.

/.etc/grub.d

/.etc/grub.d these scripts are building blocks for execution of the grub2-mkconfig command from which the grub.cfg file will be built, the order of menu items in grub.cfg depends on naming convention of files, which is very much important to note which files are read in first sequence order.

00_header sets environmental variables for GRUB settings from /etc/default/grub, including timeout, default boot entry, video settings, file locations and others.

10_linux Identify Linux kernels on the root device and create menu entries for the installed distribution.

30_os-prober Search entire hard disks for other operating systems and adding it to boot menu like Windows, MacOS X.

40_custom is a template that you can use to create additional entries into grub.cfg i.e the boot menu.

These numbering defines precedence 10_linux will be executed before 30_os-prober and therefore placed higher in the boot menu order.
/etc/default/grub - This file contains the GRUB menu settings that are read by the GRUB scripts and written into grub.cfg in GRUB2 and usually includes additional environmental settings such as backgrounds and themes.


 



GURB2 working process

/etc/default/grub contains customization; 
/etc/grub.d/ scripts contain GRUB menu information and operating system boot scripts. When the update-grub command is run, it reads the contents of the grub file and the grub.d scripts and creates the grub.cfg file.

To change the grub.cfg file, you need to edit the grub file or the scripts under grub.d.


Scripts have to be executed, You can place files of our wish in grub.d directory, once update-grub executed it execute shell scripts. If you don’t want TURNOFF executable bit EX:  20_linux_xen and 41_custom


Thanks for reading, C & C are wc

                                                                                                       to be continued....................