linux下手动安装apache详解
引自:http://blog.chinaunix.net/uid-28458801-id-4211258.html
error1:出现以下错误时候,需要下载安装apr
configure: error: APR not found. Please read the documentation.
apr下载地址:http://apr.apache.org/download.cgi
前言:
linux下,默认安装软件,在开发过程中会经常不知道到什么路径下找到所需的程序,因此手动安装程序对后续的使用会提供非常大的便利。在此,以安装apache为例。
一,准备
1,安装 apr
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-1.5.0.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# ./configure --prefix=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make
[root@@ubuntu:/work/soft/apache/apr-1.5.0]# make install
2,安装 apr-util
下载地址:http://apr.apache.org/download.cgi
[root@ubuntu:/work/soft/apache]# tar jxvf apr-util-1.5.3.tar.bz2
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# ./configure --prefix=/work/installed/apr-util --with-apr=/work/installed/apr
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make
[root@@ubuntu:/work/soft/apache/apr-util-1.5.3]# make install
3,安装 pcre
下载地址:http://pcre.org/
[root@ubuntu:/work/soft/apache]# tar jxvf pcre-8.35.tar.bz2
[root@@ubuntu:/work/soft/apache/pcre-8.35]# ./configure --prefix=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make
[root@@ubuntu:/work/soft/apache/pcre-8.35]# make install
注意:如果在安装 pcre 时,遇到问题:configure: error: You need a C++ compiler for C++ support.
解决方法:sudo apt-get install build-essential
二,安装apache
下载地址:http://httpd.apache.org/
[root@ubuntu:/work/soft/apache]# tar jxvf httpd-2.4.9.tar.bz2
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# ./configure --prefix=/work/installed/apache --with-apr=/work/installed/apr --with-apr-util=/work/installed/apr-util --with-pcre=/work/installed/pcre
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make
[root@@ubuntu:/work/soft/apache/httpd-2.4.9]# make install
三,配置
1,修改配置文件
否则会出现问题:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
解决方法:
[root@ubuntu:/work/installed/apache]# sudo gedit conf/httpd.conf
把:
# ServerName www.example.com:80
改为:
ServerName localhost:80
2,启动
[root@ubuntu:/work/installed/apache]# ./bin/apachectl start
3,开机启动
打开文件:/etc/rc.local
[root@ubuntu:/]# sudo gedit /etc/rc.local
添加:/work/installed/apache/bin/apachectl start
linux下手动安装apache详解的更多相关文章
- 在linux下手动安装 apache, php, mysql--终极版
在linux下手动安装 apache, php, mysql: 参考: http://www.cnblogs.com/lufangtao/archive/2012/12/30/2839679.html ...
- Linux下Mysql安装教程详解
Linux下软件安装一般有三种方式:RPM包方式(通过Redhat 第三方包管理系统).二进制包和源码包.本篇主要介绍二进制包安装mysql数据库的方式. 如何获取二进制源码包 当然是到mysql官网 ...
- Linux GRUB手动安装方法详解
需要手工安装 GRUB 主要有两种情况: Linux 系统原先不是使用 GRUB 作为引导程序而现在想要使用 GRUB 来作为引导程序: MBR 中的引导程序被覆盖,需要在 MBR 中重新安装 GRU ...
- Linux下OpenSSL 安装图文详解
安装环境: 操作系统:CentOs6.3 OpenSSL Version:openssl-1.0.0e.tar.gz 目前版本最新的SSL地址为http://www.openssl.or ...
- Linux下DNS服务器搭建详解
Linux下DNS服务器搭建详解 DNS 即Domain Name System(域名系统)的缩写,它是一种将ip地址转换成对应的主机名或将主机名转换成与之相对应ip地址的一种机制.其中通过域名解析 ...
- linux PHP 编译安装参数详解
linux PHP 编译安装参数详解 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...
- Linux下编译安装Apache Http Server
Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...
- windows下手动安装 Apache+php+mysql
PHP 为什么先说php,因为apache的配置要写入php的一些路径 http://php.net/downloads.php 选择windows donwload 选择Thread Safe的版 ...
- Linux下的文件目录结构详解
Linux下的文件目录结构详解 / Linux文件系统的上层根目录 /bin 存放用户可执行的程序 /boot 操作系统启动时所需要的文件 /dev 接口设备文件目录,例如:had表示硬盘 /etc ...
随机推荐
- 虚拟局域网VLAN
6.5.1配置路由器广域网端口的PPP封装 (1)配置路由器A: Router>enable Router#config Router_config#hostname Router-A Rout ...
- Game Tutorials
SDL: http://www.sdltutorials.com/tutorials http://lazyfoo.net/ http://panda3d.noie.name/ http ...
- 使用Sass优雅并高效的实现CSS中的垂直水平居中(附带Flex布局,CSS3+SASS完美版)
实现css水平垂直居中的方法有很多,在这里我简单的说下四种比较常用的方法: 1.使用CSS3中的Flex布局 对于flex,我们要了解的是它是一个display的属性,而且必须要给他的父元素设置fle ...
- iOS内存管理retain,assign,copy,strong,weak
转自:http://www.cnblogs.com/nonato/archive/2013/11/28/3447162.html iOS的对象都继承于NSObject, 该对象有一个方法:retain ...
- MySQL监控工具-orzdba
源代码地址:http://code.taobao.org/p/orzdba/src/trunk/ [root@hank-yoon servers]# chmod +x orzdba 在代码的1 ...
- iOS的SandBox的结构研究
在模拟器中运行iOS程序,都会为该程序创建一个沙盒(SandBox).首先声明,我用的系统是Max OS X 10.7.3,编译器是Xcode 4.3.2.想要找到沙盒目录,先运行Finder,然后在 ...
- ios开发之NavBar和TarBar使用技巧
1 改变NavBar颜色:选中Navigation Bar 的Tint属性.选中颜色. 2 隐藏“back”按钮: self.navigationItem.hidesBackButton = YE ...
- Leetcode-Read N Characters Given Read4 II
The API: int read4(char *buf) reads 4 characters at a time from a file. The return value is the actu ...
- Text Template Transformation Toolkit
Text Template Transformation Toolkit 1.且算简介 笔者以一个英文字母和一个数字取了一个简单的名字.名唤"T4"(名 ...
- c数组与指针
0.数组和指针并不是相同的 我们声明数组时,同时分配了一些内存空间,用于容纳数组元素,但是当我们声明一个指针时,只分配了用于容纳指针本身的内存空间. 从这个方面也可以理解sizeof后面跟数组名和指针 ...