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 下安装apache 快速教程的更多相关文章
- linux下安装apache详解
下载httpd-2.2.6.tar.bz2 把httpd-2.2.6.tar.bz2放到/soft 下[root@localhost ~]#cd /soft[root@localhost soft] ...
- Linux下安装Apache并以mod_wsgi方式部署django站点
源码编译方式安装Apache 首先下载Apache源码压缩包,地址为http://mirror.bit.edu.cn/apache/httpd/ 继续下载apr和apr-util压缩包,地址为http ...
- linux下安装apache环境
Centos6.5 64位下安装apache php mysql(安装包版本一定要正确,网上很多都不准,不要用32位的安装包装再64位上,后期有很多问题,下载安装后一定要检出版本,有的网友操蛋,把3 ...
- linux下安装apache与php;Apache+PHP+MySQL配置攻略
1.apache 在如下页面下载apache的for Linux 的源码包 http://www.apache.org/dist/httpd/; 存至/home/xx目录,xx是自建文件 ...
- Linux下安装APache
1:在图形界面下下载apache 安装包,我下的是 httpd-2.2.9.tar.gz 源码安装包,地址是http://httpd.apache.org/download.cgi 2:用:gzip ...
- linux下安装Apache(https) 服务器证书安装配置指南
一. 安装准备 1. 安装Openssl 要使Apache支持SSL,需要首先安装Openssl支持.推荐下载安装openssl-0.9.8k.tar.gz 下载Openssl:http: ...
- linux下安装apache(httpd-2.4.3版本)各种坑
博主的linux是ubuntu 14.04.3. 在安装apache最新版httpd-2.4.3的时候遇到各种坑. 先提供安装apache httpd-2.4.3所需要的包,博主已经整理好,下载地址: ...
- linux下安装apache与php
http://www.92csz.com/study/linux/16.htm 1.apache 在如下页面下载apache的for Linux 的源码包 http://www.apache.org/ ...
- linux下安装apache和php和mysql
我的系统环境时ubuntu 18.04.3,为了ROS: 首先:安装下面一堆软件包: sudo apt install nginx nginx-doc fcgiwrap sudo apt instal ...
随机推荐
- 通过org.springframework.web.filter.CharacterEncodingFilter定义Spring web请求的编码
通过类org.springframework.web.filter.CharacterEncodingFilter,定义request和response的编码.具体做法是,在web.xml中定义一个F ...
- Jqgrid入门-Jqgrid设置二级表头(六)
上一章已经说明了Jqgrid结合Struts2+json展示数据,这一章主要探讨Jqgrid如何设置二级表头,类似这样的效果.如: 要实现这个功能,其实也不难.通过Jqgrid的s ...
- UVa 536 Tree Recovery
题意:给出一颗二叉树的前序遍历和中序遍历,输出其后序遍历 用杭电1710的代码改一点,就可以了. #include<iostream> #include<cstdio> #in ...
- VS2005中乱码问题
VS2005打开某些文件(如.inc, js)的时候出现乱码: 解决方法: 工具 --> 选项 --> 文本编辑器 --> 将“自动检测不带签名的 UTF-8编码”选中保存即可. V ...
- 实现一个简单的FTP服务器(十四)
此为一个网络编程的一个系列,后续会把内容补上...
- chrome 远程调试(转)
http://www.tuicool.com/articles/ZJfeAzi 由于 appspot.com被墙,一般调试不成功. 随着智能手机的普及,移动设备的浏览器功能越来越强大,我们用手机上网时 ...
- 【DFS+记忆搜索】NYOJ-10-Skiing
[题目链接:NYOJ-10] skiing 时间限制:3000 ms | 内存限制:65535 KB 难度:5 描述 Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑 ...
- 调试WEB APP多设备浏览器(转)
方法:adobe shadow \ opera远程调试\ weinre adobe shadow: 我们经常使用Firefox的firebug或者Chrome的开发人员工具进行Web调试页面,J ...
- Eclipse “Invalid Project Description” when creating new project from existing source
1) File>Import>General>Existing Project into Workspace2) File>Import>Android>Exist ...
- redis学习笔记之pipeline
redis是一个cs模式的tcp server,使用和http类似的请求响应协议.一个client可以通过一个socket连接发起多个请求命令.每个请求命令发出后client通常 会阻塞并等待redi ...