InfoWorld how-to's

How to install Apache on Linux

FREE

Become An Insider

Sign up now and get free access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content from the best tech brands on the Internet: CIO, CITEworld, CSO, Computerworld, InfoWorld, ITworld and Network World. Learn more.

An easy step-by-step guide to setting up an Apache Web server on Fedora, CentOS, or Ubuntu

The installation, care, and feeding of an Apache Web server is not terribly difficult, but can seem so if you haven't ventured into those particular waters before. This quick-start guide will help you get your feet wet with Apache on a Linux server. You'll find it's relatively simple to get the Web server set up and running on your Linux of choice. We'll also install PHP and MySQL, though we won't be digging into MySQL configurations, as that deserves a quick start all its own.

The method of installing the Apache packages on a Linux server varies from distribution to distribution. We'll cover how to do this on Fedora and CentOS, as well as on Ubuntu. This is a server-centric walkthrough, so we'll use the command line exclusively. Naturally, you'll need root-level privileges. Open the terminal window and type:

su -

Then enter the root password. Now we can get started.

First we'll install the packages themselves. For Fedora and CentOS, this is a simple step involving Yum, the package installer and updater. To install the basic Apache and PHP packages, run the following command:

yum install httpd php mysql mysql-server

To continue reading, please begin the free registration process or sign in to your Insider account by entering your email address:
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies