安装apache httpd2.4
2016-01-01 20:40
761 查看
(1)从http://httpd.apache.org/download.cgi下载httpd-2.4.18.tar.gz包
(2)从http://apr.apache.org/download.cgi下载apr-1.5.2.tar.gz、apr-util-1.5.4.tar.gz包,关于Apache APR,全称Apache
Portable Runtime,Apache可移植运行库,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。在早期 的Apache版本中,应用程序本身必须能够处理各种具体操作系统平台的细节,并针对不同的平台调用不同的处理函数。随着Apache的进一步开 发,Apache组织决定将这些通用的函数独立出来并发展成为一个新的项目。官方如下描述:The mission of the Apache Portable Runtime
(APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable
if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.
(3)从ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/下载pcre-8.37.tar.gz包,关于pcre,Perl官方如下描述:The
PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The
PCRE library is free, even for building proprietary software.
(4)先解压缩各包,安装pcre,再安装httpd
[plain] view
plaincopy
$ gzip -d httpd-2.4.18.tar.gz
$ tar xvf httpd-2.4.18.tar
$ gzip -d apr-1.5.2.tar.gz
$ tar xvf apr-1.5.2.tar
$ gzip -d apr-util-1.5.4.tar.gz
$ tar xvf apr-util-1.5.4.tar
$ mv apr-1.5.2 httpd-2.4.18/srclib/apr
$ mv apr-util-1.5.4 httpd-2.4.18/srclib/apr-util
$ gzip -d pcre-8.37.tar.gz
$ tar xvf pcre-8.37.tar
$ cd ~/pcre-8.37
$ ./configure
$ make && make install
$ cd ~/httpd-2.4.18
$ ./configure --prefix=/usr/local/apache2
$ make && make install
httpd相关命令在/usr/local/apache2/bin下
配置文件等在/usr/local/apache2/conf下
安装成功后,
执行命令/usr/local/apache2/bin/apachectl start,默认启动端口为80,浏览器访问
提示
It Works!
官方安装文档
http://httpd.apache.org/docs/2.4/install.html
NN must be replaced with the current version number, and PREFIX must be replaced with the filesystem path under which the server should be installed. If PREFIX is not specified, it defaults to
Each section of the compilation and installation process is described in more detail below, beginning with the requirements for compiling and installing Apache httpd.
The following requirements exist for building Apache httpd:
APR and APR-UtilMake sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache
APR, unpack them into
sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use
On some platforms, you may have to install the corresponding
or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the
you may have to install the corresponding
configuration options, any third-party modules, and, of course, the size of the web site or sites that you have on the server.ANSI-C Compiler and Build SystemMake sure you have an ANSI-C compiler installed. The GNU C compiler (GCC) from the Free
Software Foundation (FSF) is recommended. If you don't have GCC then at least make sure your vendor's compiler is ANSI compliant. In addition, your
build tools such as
are used for this purpose which are based on the Network Time Protocol (NTP). See the NTP homepage for more details
about NTP software and public time servers.Perl 5 [OPTIONAL]For some of the support scripts like
are written in Perl) the Perl 5 interpreter is required (versions 5.003 or newer are sufficient). If no Perl 5 interpreter is found by the
you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.
(2)从http://apr.apache.org/download.cgi下载apr-1.5.2.tar.gz、apr-util-1.5.4.tar.gz包,关于Apache APR,全称Apache
Portable Runtime,Apache可移植运行库,主要为上层的应用程序提供一个可以跨越多操作系统平台使用的底层支持接口库。在早期 的Apache版本中,应用程序本身必须能够处理各种具体操作系统平台的细节,并针对不同的平台调用不同的处理函数。随着Apache的进一步开 发,Apache组织决定将这些通用的函数独立出来并发展成为一个新的项目。官方如下描述:The mission of the Apache Portable Runtime
(APR) project is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementations. The primary goal is to provide an API to which software developers may code and be assured of predictable
if not identical behaviour regardless of the platform on which their software is built, relieving them of the need to code special-case conditions to work around or take advantage of platform-specific deficiencies or features.
(3)从ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/下载pcre-8.37.tar.gz包,关于pcre,Perl官方如下描述:The
PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The
PCRE library is free, even for building proprietary software.
(4)先解压缩各包,安装pcre,再安装httpd
[plain] view
plaincopy
$ gzip -d httpd-2.4.18.tar.gz
$ tar xvf httpd-2.4.18.tar
$ gzip -d apr-1.5.2.tar.gz
$ tar xvf apr-1.5.2.tar
$ gzip -d apr-util-1.5.4.tar.gz
$ tar xvf apr-util-1.5.4.tar
$ mv apr-1.5.2 httpd-2.4.18/srclib/apr
$ mv apr-util-1.5.4 httpd-2.4.18/srclib/apr-util
$ gzip -d pcre-8.37.tar.gz
$ tar xvf pcre-8.37.tar
$ cd ~/pcre-8.37
$ ./configure
$ make && make install
$ cd ~/httpd-2.4.18
$ ./configure --prefix=/usr/local/apache2
$ make && make install
httpd相关命令在/usr/local/apache2/bin下
配置文件等在/usr/local/apache2/conf下
安装成功后,
执行命令/usr/local/apache2/bin/apachectl start,默认启动端口为80,浏览器访问
提示
It Works!
官方安装文档
http://httpd.apache.org/docs/2.4/install.html
Overview for the impatient
Download | $ lynx http://httpd.apache.org/download.cgi[/code] |
Extract | $ gzip -d httpd-NN.tar.gz $ tar xvf httpd-NN.tar $ cd httpd-NN |
Configure | $ ./configure --prefix=PREFIX |
Compile | $ make |
Install | $ make install |
Customize | $ vi PREFIX/conf/httpd.conf |
Test | $ PREFIX/bin/apachectl -k start |
/usr/local/apache2.
Each section of the compilation and installation process is described in more detail below, beginning with the requirements for compiling and installing Apache httpd.
Requirements
The following requirements exist for building Apache httpd:APR and APR-UtilMake sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache
APR, unpack them into
/httpd_source_tree_root/srclib/aprand
/httpd_source_tree_root/srclib/apr-util(be
sure the directory names do not have version numbers; for example, the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use
./configure's
--with-included-aproption.
On some platforms, you may have to install the corresponding
-devpackages to allow httpd to build against your installed copy of APR and APR-Util.Perl-Compatible Regular Expressions Library (PCRE)This library is required but not longer bundled with httpd. Download the source code from http://www.pcre.org,
or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the
--with-pcreparameter. On some platforms,
you may have to install the corresponding
-devpackage to allow httpd to build against your installed copy of PCRE.Disk SpaceMake sure you have at least 50 MB of temporary free disk space available. After installation the server occupies approximately 10 MB of disk space. The actual disk space requirements will vary considerably based on your chosen
configuration options, any third-party modules, and, of course, the size of the web site or sites that you have on the server.ANSI-C Compiler and Build SystemMake sure you have an ANSI-C compiler installed. The GNU C compiler (GCC) from the Free
Software Foundation (FSF) is recommended. If you don't have GCC then at least make sure your vendor's compiler is ANSI compliant. In addition, your
PATHmust contain basic
build tools such as
make.Accurate time keepingElements of the HTTP protocol are expressed as the time of day. So, it's time to investigate setting some time synchronization facility on your system. Usually the
ntpdateor
xntpdprograms
are used for this purpose which are based on the Network Time Protocol (NTP). See the NTP homepage for more details
about NTP software and public time servers.Perl 5 [OPTIONAL]For some of the support scripts like
apxsor
dbmmanage(which
are written in Perl) the Perl 5 interpreter is required (versions 5.003 or newer are sufficient). If no Perl 5 interpreter is found by the
configurescript,
you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.
相关文章推荐
- Java TCP Swing聊天程序
- UNIX网络编程:套接字
- 常见网络传输协议
- Android 网络通信框架Volley完全解析(一)
- HTTP协议详解
- HttpServletResponse说明
- ubuntu12.04--change socks5 to http by proxy
- 网络基本知识
- HttpUrlConnection 自动上传文件
- HTTP协议入门——1.1版本
- 神经网络浅讲:从神经元到深度学习
- 如何一步步拿到伐册 book申请http://www.bosshr.com/shownews_47767.html
- 全站 HTTPS 来了
- Linux网络相关命令小结
- Android开发之使用URL訪问网络资源
- win7系统关闭“window安全网络身份验证”窗口的设置方法
- 错误消息: 为了配置 TCP/IP,必须安装并启用的网络适配器
- [CSAPP] 第三部分 第11章 网络 IP地址
- Linux内核工程导论——网络:Filter(LSF、BPF)
- 转帖不会乱码的,powershell网络蜘蛛