This article was co-authored by wikiHow Staff. Our trained team of editors and researchers validate articles for accuracy and comprehensiveness. wikiHow's Content Management Team carefully monitors the work from our editorial staff to ensure that each article is backed by trusted research and meets our high quality standards.
This article has been viewed 26,574 times.
Learn more...
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
-
1Open 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.
-
2Type 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 -
3Press ↵ Enter or ⏎ Return on your keyboard. This will run the command, and prompt you to enter your user/root password.
-
4Enter your user/root password. This will confirm your action, and start downloading Apache on your computer.
- Press ↵ Enter or ⏎ Return to confirm your password.
-
5Press 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.
-
6Open your internet browser. You can use any internet browser to check if your Apache server is successfully installed.
-
7Type localhost in your browser's address bar. Your Apache server should automatically start running on your localhost when it's finished installing.
-
8Press ↵ 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."
About This Article
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.