How to install Apache HTTPD web server, PHP, MySQL on Linux

Linux OS Topics
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

How to install Apache HTTPD web server, PHP, MySQL on Linux

Post by Neo » Wed Mar 10, 2010 5:05 pm

Apache httpd
Commonly referred to as Apache, Apache Free Software Foundation's httpd is free open-source Hypertext Transport Protocol Daemon aka web server. It is software that is used to serve both dynamic and static web pages. Apache comes with good set of features, supports common programming interfaces(PHP, Perl etc) and can be extended at any time with new modules.
In june 2008, Apache is the world's most popular web server with market share of 49.12%.

PHP & MySQL
PHP (Hyper Text Preprocessor - THE Web scripting language) is open-source, commonly used for web programming, general scripting language that can be embedded into HTML files. It's the most widely used web programming language with lots of features. Together with MySQL (Free open-source database management software) you can create amazing websites. In fact this site is powered by content management system - Drupal built on PHP & MySQL.

Installation:
-Installing Apache's httpd, PHP, MySQL on Ubuntu, Kubuntu-
run this commands in your shell (Terminal):
# sudo apt-get install apache2
# sudo apt-get install mysql-client mysql-server php5 php5-mysql
# sudo /etc/init.d/apache2 restart

-Installing Apache's httpd, PHP, MySQL on Fedora-
# yum -y install httpd php mysql mysql-server php-mysql

Your web files will now be found in "/var/www/" - the document root.
To create a database issue this command in terminal:
mysqladmin create "databasename"
Post Reply

Return to “Linux”