Setting up a LAMP server in Fedora/CentOS:

LAMP is an acronym derived from the first letters of the combination of operating system and open-source software stack. Linux, Apache HTTP server, MySQL/MairiaDB, and PHP/Perl/Python.

LAMP is comparable with WIMP (Windows, IIS, MySQL, PHP) but as the acronym suggests... it just doesn't compare. :) ...and WIMP isn't free!

Read more here:
http://en.wikipedia.org/wiki/LAMP_(software_bundle)

Make sure you've become root for all installations and configurations:

su



Apache:
Apache is an open-source multi-platform web server. Apache httpd has been the most popular web server on the Internet since April 1996. It provides a full range of web server features.

Read more here:
http://en.wikipedia.org/wiki/Apache_HTTP_Server
http://httpd.apache.org

Install the Apache web server:

yum -y install httpd

 

Enable the Apache web server to run automatically on reboot:

systemctl enable httpd.service

 

Start the Apache web server:

systemctl start httpd.service

 

Add firewall rules:

firewall-cmd --add-service=http --permanent

 

Test to see if the Apache web server is running:

systemctl status httpd.service

 

Test Apache:

Open a web browser and test to see if it works by typing 127.0.0.1 in the address bar:



MariaDB:
MariaDB was forked/created from the MySQL Database by the original creators of MySQL. After the controversial purchase of Sun Microsystems by Oracle, concerns and conspiracies theories about the motives and managemement of Oracle's commitment to open source and the future of MySQL came into play. Apparently disagreements from Oracle's management and the MySQL creators/commumity caused the maintainers to resign and create the MariaDB Foundation. MariaDB is a full dropin replacement for MySQL, is fully open source and owned soley by the MariaDB Foundation. MariaDB is fast becoming the default standard for all distrobutions of Linux and migrations of large well-known server databases are happening all the time.

Some of the other purchases Oracle gained in the purchase were Open Office, Java, Solaris, and others, of which Open Office was also forked to become LibreOffice now overseen by the Open Document Foundation.


Read more here:
http://en.wikipedia.org/wiki/Sun_acquisition_by_Oracle
https://mariadb.org/foundation
http://www.documentfoundation.org

 

Install MariaDB SQL database server:

yum -y install mariadb mariadb-server

 

Enable the MariaDB service to run automatically on reboot:

systemctl enable mariadb.service

 

Start the MariaDB service:

systemctl start mariadb.service

 

Set the SQL Database root password:

mysql_secure_installation

 

Login to the SQL database:

mysql -u root -p



PHP:
PHP is a popular powerful general-purpose scripting language that is especially suited to web development. PHP is a recusive acronym that now stands for PHP: Hypertext Preprocessor.


Read more here:
http://php.net
http://en.wikipedia.org/wiki/PHP

Install PHP:

yum -y install php php-mysql

 

Create your first PHP file:

vi /var/www/html/index.php

 

Add the lines into index.php and :wq to write quit

<?php

    phpinfo();

?>

 

Restart the httpd service:

systemctl restart httpd.service

 

Test PHP:
Open a web browser and type 127.0.0.1 in the address bar. (or refresh if you still have it open)





Copyright ©  Geekface Computers & Service

The Fedora logo is a trademark of Red Hat inc.