linux 下安装apache 快速教程
最近自学linux,看鸟哥的文章。提到了apache,所以在虚拟机redhat 5下安装了一把,
结合国内外文章写下快速可行的教程:
-------------------------------------------------------------------------------
系统版本: # cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
一 步骤概览:(摘自apache官网)
Download | $ http://httpd.apache.org/download.cgi |
Extract | $ gzip -d httpd-NN.tar.gz |
Configure | $ ./configure --prefix=PREFIX |
Compile | $ make |
Install | $ make install |
Customize | $ vi PREFIX/conf/httpd.conf |
Test | $ PREFIX/bin/apachectl -k start |
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 /usr/local/apache2
.
--NN 代表版本号,PREFIX指定安装路径,不指定的话默认:/usr/local/apache2
.
二、系统要求:(不满足后续安装会提示错误)
APR and APR-Util
Perl-Compatible Regular Expressions Library (PCRE)
三、安装步骤:(满足系统要求)
1.解决apr not found问题
[root@yahootest]# tar -zxf apr-1.4.5.tar.gz
[root@yahoo apr-1.4.5]#./configure --prefix=/usr/local/apr
[root@yahoo apr-1.4.5]#make
[root@yahoo apr-1.4.5]#make install
2.解决APR-util not found问题
[root@yahoo test]# tar -zxfapr-util-1.3.12.tar.gz
[root@yahooapr-util-1.3.12]# ./configure --prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config
[root@yahoo apr-util-1.3.12]# make
[root@yahoo apr-util-1.3.12]# make install
3 ../configure仍提示APR-util notfound,增加--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util后出现
configure: error: pcre-config for libpcre not found. PCRE isrequired and available from http://pcre.org/
#./configure –help | grep pcre
--with-pcre=PATH Use external PCRE library
下载:http://sourceforge.net/projects/pcre
#unzip -o pcre-8.10.zip
#cd pcre-8.10
#./configure --prefix=/usr/local/pcre
#make
#make install
4.编译Apache
[root@yahoo httpd-2.3.12-beta]# ./configure--prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
--with-pcre=/usr/local/pcre/
[root@yahoo httpd-2.3.12-beta]# make
[root@yahoo httpd-2.3.12-beta]# make install
[root@yahoo httpd-2.3.12-beta]# /usr/local/apache2/bin/apachectlstart
----------------------------
present by dylan.
相关文章
- Linux常用命令1
- Linux下Apache服务的部署和配置
- linux安装apache的纠结过程
- STM32MP157 Linux系统移植开发篇1:linux系统移植前说明及源码编译
- 在 Linux 中以交互方式实时查看Apache web访问统计
- 用 screenfetch 和 linux_logo 显示带有酷炫 Linux 标志的基本硬件信息
- linux shadow文件*,Linux /etc/shadow文件详解
- Linux下apache支持PHP配置
- linux下如何检查内核补丁是否符合社区代码规范?
- 【Linux】/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
- linux取IP的几个方法
- 《PHP、MySQL和Apache入门经典(第5版)》一一2.3 在Linux/UNIX上安装MySQL
- lilybbs-faq - linux入门以及百合 Linux 版精华区导读
- Linux sudo详解
- 【嵌入式Linux驱动开发】十四、了解Linux内核定时器使用流程,实现LED闪烁
- Linux学习笔记(14)linux在6.x和7.x系列的安装与基本使用区别
- Linux学习笔记(13)linux软件安装rpm与yum--理论篇
- Linux学习笔记(2)linux系统信息与进程相关命令
- Linux安装Apache
- 每天一个linux命令(19):Linux 目录结构
- linux下安装apache和php和mysql