Download Article
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.
Steps
-
Open the Terminal (Command Prompt) window on your Linux machine. 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 .
-
Type sudo apt-get install apache2 in Terminal. 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 -
Press ↵ Enter or ⏎ Return on your keyboard. This will run the command, and prompt you to enter your user/root password.
-
Enter your user/root password. This will confirm your action, and start downloading Apache on your computer.
- Press ↵ Enter or ⏎ Return to confirm your password.
-
Press Y to continue. 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.
-
Open your internet browser. You can use any internet browser to check if your Apache server is successfully installed.
-
Type localhost in your browser's address bar. Your Apache server should automatically start running on your localhost when it's finished installing.
-
Press ↵ Enter or ⏎ Return on your keyboard. 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."
Advertisement
Expert Q&A
Search
-
QuestionAre there any other ways to install Apache easily?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.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
200 characters left
Include your email address to get a message when this question is answered.
Submit
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.
Advertisement