Atlantic.Net Blog

How to Install Linux, Apache, MySQL and PHP (LAMP) on a Fedora 20 Cloud Server

Jose Velazquez
by Atlantic.Net (71posts) under VPS Hosting
Verified and Tested 02/27/15


In this How-To, we will walk you through the install LAMP on your Fedora 20 Cloud Server. LAMP is simply a software bundle that consists of 4 components. L (Linux) the core of the platform which will sustain the other components.A(Apache)will be used for the web service. M(MySQL)will be used for database management, and P(PHP) will be as the programming language. Making the platform a LAMP.


A cloud server with Fedora 20 already installed (which will take care of the L(Linux) aspect of the LAMP install). If you do not have one, you can get a reliable VPS from Atlantic.Net and be up and running in under 30 seconds.

Install Lamp on Fedora 20

To install lamp, the first thing we need to do is install Apache with the following command:

yum install httpd

Start Apache with the following command:

systemctl start httpd.service

You will want the Apache service to start on start-up/reboot with the following command:

systemctl enable httpd.service

Add the following commands in Apache to override in Firewall-cmd as follows:

firewall-cmd --set-default-zone=public
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

You can now verify that Apache is installed correctly by typing http:// and your IP on your browser.


You should see the following screenshot in your browser:

Default apache test page

Default apache test page

You can edit the main configuration file to your preference for one or many websites with the following commands:

vi /etc/httpd/conf/httpd.conf


nano /etc/httpd/conf/httpd.conf

Un-comment the line containing the text NameVirtualHost *:80 and edit accordingly

Save the file

Restart the Apache HTTP

systemctl restart httpd.service

Install MySQL with the following command to begin the install:

yum install mysql mysql-server

Start the service with the following command:

systemctl start mysqld.service

Enable MySQL to start upon a reboot with the following command:

systemctl enable mysqld.service

Secure MySQL with the following command:


Note: When prompted with “Enter current password for root”, hit enter for none then Y(Yes) to set MYSQL password. You will be prompted with a series of questions. Simply type Y for yes on all of them, see the screen shot below:

Follow the on screen prompts and respond accordingly.

Mysql secure Installation

Install PHP with the following command to begin the install:

yum install php

Restart apache to take all the changes:

systemctl restart httpd.service

Create a test PHP file in the following directory with the following command:

sudo vi /var/www/html/info.php

Insert the following code in the empty space then save and exit:


Restart Apache so all the changes take effect:

sudo service httpd restart
Sample info.php output.


Test your page in your browser with the following hyperlink changed with yourIP address:

Congratulations! You have just installed LAMP on your Fedora 20 Cloud Server. Thank you for following along in this How-To and check back with us for any new updates.

Get A Free To Use Cloud VPS

Free Tier Includes:
G2.1GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G2.1GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom