---
title: "Ubuntu安装Apache"
author: "xianbin"
date: "2014-03-30T13:01:05Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu-apache"
draft: false
lastmod: "2014-03-30T13:09:45Z"
id: 2038481
url: "https://xianbin.iteye.com/blog/2038481"
---

1、下载Apache的源码包httpd-2.2.27.tar.gz；
2、Ubuntu Server没有带gcc和make，需要自己安装：
root@ubuntu:#sudo apt-get install make
root@ubuntu:#sudo apt-get install gcc

提示：请确保可以上网

3、root@ubuntu:#./configure；
4、root@ubuntu:#make；
5、root@ubuntu:#make install。
6、启动
//将当前目录改为Apache的默认安装路径  
#cd /usr/local/apache/bin   
//启动Apache  
#./apachectl start.