2019独角兽企业重金招聘Python工程师标准>>>

1. OS architecture

# uname -a

Linux test 2.6.18-194.el5xen #1 SMP Tue Mar 16 22:01:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

2. Apache architecture

# ./apachectl -V

Server version: Apache/2.2.19 (Unix)
Server built:   Aug  7 2012 16:47:58
Server's Module Magic Number: 20051115:28
Server loaded:  APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
...

同样方式,可以查看MySQL版本

# mysql -V

mysql  Ver 14.14 Distrib 5.5.28, for Linux (x86_64) using readline 5.1

3. Compile module

# /opt/apache/bin/apxs -c mod_rewrite.c
# /opt/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
# ./apachectl start

httpd: Syntax error on line 23 of /opt/apache/conf/httpd.conf: Cannot load /opt/apache/modules/mod_rewrite.so into server: /opt/apache/modules/mod_rewrite.so: wrong ELF class: ELFCLASS64

# file mod_rewrite.so

mod_rewrite.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

4. Compile module in 32-bit (merge command)

# /opt/apache/bin/apxs -Wc,-m32 -i -a -c -n mod_rewrite mod_rewrite.c

/opt/apache/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/opt/apache/include  -

I/opt/apache/include   -I/opt/apache/include  -m32  -c -o mod_rewrite.lo mod_rewrite.c && touch mod_rewrite.slo
In file included from /usr/include/features.h:352,
                 from /usr/include/sys/types.h:27,
                 from /opt/apache/include/apr.h:164,
                 from mod_rewrite.c:49:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
apxs:Error: Command failed with rc=65536

5. install gnu/stubs-32.h

# yum install glibc-devel.i686

Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package glibc-devel.i686 available.
Nothing to do

6. “This system is not registered with RHN”简单解决办法:
更改yum的源(假定你已安装yum,且网络畅通),即更换/etc/yum.repos.d /rhel-debuginfo.repo 这个文件。
进入/etc/yum.repos.d/目录,终端中输入wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo即可在此目录下得到CentOS- Base.repo文件,这是centos的源文件,只需将其重命名为rhel-
debuginfo.repo即可,以前的文件做个备份。

7. yum

# yum clean all
# yum makecache

8. 一个命令:确认当前程序是否正确调用动态链接库

# ldd mode_rewrite.so

转载于:https://my.oschina.net/insidesource/blog/423836

Build Apache Module相关推荐

  1. 用Apache Ivy实现项目里的依赖管理

    Apache Ivy是一个管理项目依赖的工具. 它与Maven  Apache Maven 构建管理和项目管理工具已经吸引了 Java 开发人员的注意.Maven 引入了 JAR 文件公共存储库的概念 ...

  2. Unity WebGL发布及Ubuntu Apache服务器部署

    Unity WebGL发布及Ubuntu Apache服务器部署 Unity 中WebGL的设置 Ubuntu Apache web服务器搭建 网页修改 附一:Ubuntu 文件操作常用命令 附二:A ...

  3. AndroidStudio权威教程 AS添加第三方库的6种方式(Jar module so等)

    点击项目设置按钮 依次选择 App > Dependencies 1. 直接搜索法 依次选择 + > Library dependency 这里的搜索一定要是全名的,不然搜不到哦 下图所表 ...

  4. 10 个强大的 Apache 模块

    Apache 是世界上使用最为广泛的 Web 服务器,没有之一! 因为其具有高效.功能强大.超强可扩展性等特点.本文向你推荐 10 个非常强大的 Apache 扩展模块,可以帮助你的 Web 应用更加 ...

  5. 基于Apache(without ssl)的svn环境搭建

    搭建的过程是按照tortersSVN的教程,特别注意的是要额外下载一个sspi的so文件. 提示:XP sp2已经还有了sp1 ps 遇到的问题,还是遇到了一些问题,网搜了下,列在这儿: 1.出现&q ...

  6. Apache 'mod_accounting'模块SQL注入漏洞(CVE-2013-5697)

    漏洞版本: mod_accounting 0.5 漏洞描述: BUGTRAQ ID: 62677 CVE ID: CVE-2013-5697mod_accounting是Apache 1.3.x上的流 ...

  7. Linux下Apache并发连接数和带宽控制

    Linux+Apache的稳定性.安全性和性能以及低廉的价格正在赢得越来越多的市场份额,使 用Linux+Apache作网站服务器的朋友也越来越多,而Apache作为一种http服务,相比FTP总是不 ...

  8. selinux php errors,apache php selinux --Syntax error 无法加载模块

    centos 5.0selinux 为开启状态apache 2.2.8php 5.0安装完成之后,apache无法加载php模块.错误如下: httpd: Syntax error on line 2 ...

  9. Mastering Android NDK Build System - Part 1: Techniques with ndk-build

    This article is not a "Hello world!"-type tutorial for NDK. Although I will still provide ...

  10. 学习《apache源代码全景分析》之摘录

    一.大纲 1.Web服务器概述 2.Apache体系结构 3.配置文件管理 4.Apache模块化体系结构 5.多任务并发处理 6.网络连接 7.过滤器 8.存储段和存储段组 9.常用过滤器 二.摘录 ...

最新文章

  1. putchar函数的基本格式
  2. js点击获取连接的内容
  3. Mac安装MySQL数据库
  4. 【枭·音频】声随意动——浅谈《暗影火炬城》声音设计
  5. oracle symonym_Oracle的同义词(synonyms)
  6. 图谱实战 | 医学知识图谱的价值与应用场景
  7. 初见akka-02:rpc框架
  8. centos7 docker端口_docker相关知识
  9. 程序化广告 - 小抄
  10. 上,下拉电阻的作用与计算
  11. Zemax学习笔记——Zemax序列坐标系理解及坐标断点
  12. 云台球型摄像机行业现状调研及趋势分析报告
  13. 你一定要看的安装及卸载测试用例的步骤及方法总结
  14. 美食源码php,美食类门户网站仿豆果网php源码
  15. Shell脚本中:#!/bin/bash和#!/bin/sh是什么意思以及区别?
  16. go语言的iota是什么意思_golang 使用 iota
  17. 读书笔记《能力陷阱》第四章:试着朝更多不同的方向发展自己
  18. 五一假期吃胖了?别怕, 一周减肥食谱等你来翻牌
  19. MOS管的各项参数解释
  20. JavaScript基础题目(附答案)

热门文章

  1. JS调试设置断点却无法中断的解决
  2. 一篇好奇心文,带你看懂基金的运营全貌
  3. 阿里云蒋江伟:什么是真正的云原生?
  4. 可信开发技术专家---阿里云诚聘
  5. 2019上海开源峰会炉边会谈纪要
  6. 五个在线,推进企业数字化转型升级
  7. php7 imagick扩展,php7如何安装imagick扩展
  8. 【单目标优化求解】基于matlab改进的遗传算法求解单目标优化问题【含Matlab源码 1834期】
  9. 毕设题目:Matlab疾病识别与分类
  10. 【优化算法】哈里斯鹰算法(HHO)【含Matlab源码 1309期】