Pages

15 June 2010

Configure LAMP For Newbies

What is LAMP ?

LAMP is an acronym for a solution stack of free, open source software, originally coined from the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, principal components to build a viable general purpose web server

Linux

Linux is a Unix-like computer operating system kernel. A major emphasis of Linux development is security, which makes it an appealing choice for a web-server application. Like the other LAMP components, Linux is free open-source software which means the source code is provided with operating system, which can be edited according to specific needs. Also, because Linux-based operating systems are Unix-like, a Linux server is more natively-compatible with other server-oriented platforms, such as Solaris and BSD, than non-Unix-like systems like Microsoft Windows.


Apache

Apache is a free software/open source web server, the most popular in use

MySQL

MySQL is a multithreaded, multi-user, SQL database management system (DBMS) with more than eleven million installations. Since 16 January 2008, owned by Sun Microsystems, as of 20 April 2009, Oracle Corporation has agreed to purchase Sun Microsystems.

Perl, PHP, or Python

PHP is a reflective programming language originally designed for producing dynamic web pages. PHP is used mainly in server-side application software. Perl and Python can be used similarly.


Installation of LAMP

Here I am assuming you have already installed Linux on your PC/server.

First of all we are installing Apache, Mysql-server & php

# yum install httpd mysql-server php php-mysql

# chkconfig httpd on
# chkconfig mysqld on
# service httpd restart
# service mysqld restart


Made mysql running to add user & password

# mysqladmin -u root password [your_password]

Login on to mysql-server

# mysql -uroot -p[your_password]

Now time to Publish a website with LAMP

for apache /var/www/html is default directory where you can place your own webdata
here we are creating a simple HTML file for testing.

# echo "This is my first web site" > /var/www/html/index.html

# service httpd restart

Open a web browser and type on address bar

http://localhost

Here you can see page with messege "This is me first web site"

Congrats, Now you are ready to work on LAMP