PDF download Download Article PDF download Download Article

This wikiHow teaches you how to download and install an Apache web server on any computer running a Linux-based system. You can use your Linux machine's Terminal (Command Prompt) to easily download and install Apache on your computer.

  1. You can use the Terminal window to easily download and install the Apache server on your computer. Depending on your Linux version:
    • Click the icon on the top-left to open the Dash, type "Terminal," and hit Return or Enter .
    • Press the Ctrl + Alt + T keyboard shortcut.
    • Click the Applications tab on the menu bar, select Accessories , and click Terminal .
  2. This command will download and install the Apache server on your Linux machine.
    • This command will work in Ubuntu and other Debian Linux versions.
    • For Fedora / RHEL / Cent OS and Red Hat Enterprise Linux, type yum install httpd .
    Advertisement
  3. This will run the command, and prompt you to enter your user/root password.
  4. This will confirm your action, and start downloading Apache on your computer.
    • Press Enter or Return to confirm your password.
  5. When you're prompted to install the required extra packages, type "Y" and press Enter or Return to proceed.
    • This will install all the required packages, and start your Apache server on your computer.
    • You will see a message saying "Starting web server apache2" in Terminal when your installation is finished.
  6. You can use any internet browser to check if your Apache server is successfully installed.
  7. Your Apache server should automatically start running on your localhost when it's finished installing.
  8. The localhost page should open up to the Apache2 Default Page.
    • If you see the Apache2 Default Page, your Apache server is up and running on this computer.
    • If your Apache server isn't running, you'll see a message saying "Unable to connect."
  9. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    Are there any other ways to install Apache easily?
    Michael Thompson-Brown
    Cybersecurity Expert
    Michael Thompson-Brown is a Cybersecurity Expert based in Portland, Maine. He is the owner and founder of PCRescue!, a company that provides cybersecurity and data management solutions to small businesses and individuals. Michael has over 25 years of experience in the IT industry and is a certified ethical hacker. He is passionate about helping clients protect their data and systems from malicious attacks and helping them optimize their online presence and reach. He received a Master’s degree in Cybersecurity and Information Assurance from Western Governors University, and a Bachelor’s degree in Business Administration from the University of Phoenix.
    Cybersecurity Expert
    Expert Answer
    One of the simplest methods to install Apache on Linux is typically through the package manager provided by your distribution. Each major Linux distribution has its own package manager. You can access it, search for Apache, and initiate the installation process. The package manager will handle any dependencies and automatically install anything necessary for Apache to run smoothly. This approach is effective across all major distributions, each of which has its own package manager, many of which are user-friendly and straightforward.
Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about operating systems, check out our in-depth interview with Michael Thompson-Brown .


      About This Article

      Article Summary X

      1. Open the Terminal.
      2. Type " sudo apt-get install apache2 " in Terminal.
      3. Press Enter or Return on your keyboard.
      4. Enter your user/root password.
      5. Enter " Y " when you're prompted.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 33,801 times.

      Is this article up to date?

      Advertisement