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 ...
随机推荐
- MyBatis 实践 -Mapper与DAO
MyBatis 实践 标签: Java与存储 MyBatis简介 MyBatis前身是iBatis,是一个基于Java的数据持久层/对象关系映射(ORM)框架. MyBatis是对JDBC的封装,使开 ...
- Java 解析 XML
Java 解析 XML 标签: Java基础 XML解析技术有两种 DOM SAX DOM方式 根据XML的层级结构在内存中分配一个树形结构,把XML的标签,属性和文本等元素都封装成树的节点对象 优点 ...
- LA 3135 (优先队列) Argus
将多个有序表合并成一个有序表就是多路归并问题,可用优先队列来解决. #include <cstdio> #include <queue> using namespace std ...
- bzoj3555: [Ctsc2014]企鹅QQ
将字符串hash.不难写.然而1.注意用longlong2.数组大小注意...3.似乎别人都用的unsigned long long ?. #include<cstdio> #includ ...
- codevs 3290 华容道
HAHAHA BFS+SPFA. #include<iostream> #include<cstdio> #include<cstring> #include< ...
- android调用JPush获取手机的注册码(Cordova环境)
JPushInterface.addLocalNotification(cordova.getActivity().getApplication().getApplicationContext(), ...
- shell脚本实例
备注:一些与传递给shell的参数相关的变量:$# 命令行参数的个数$? 调用命令的返回值$$ 当前进程的进程号$! 最后一个后台命令的进程号$0 命令行的第一个参数,也就是命令名$n 命令行的第n个 ...
- How to Calculate difference between two dates in C# z
Do you need to find the difference in number of days, hours or even minute between the two date rang ...
- HDU5758 Explorer Bo 树形dp
我是参考这一篇写的:http://blog.csdn.net/fsss_7/article/details/52049474 一点感想:dp[i][0]代表以这个点为根的且总叶子数为偶数个叶子的答案 ...
- SqlServer获取两个日期时间差
SELECT datediff(yy,'2010-06-1 10:10',GETDATE()) --计算多少年 SELECT datediff(q,'2011-01-1 10:10',GETDATE( ...