国考计算机三级嵌入式,ARM平台的Nginx移植.pdf

ARM平台的Nginx移植

ARM 平台的Nginx 移植

Nginx 是一个不错的Http Server,附带很多实用的功能,特别是HTML5 的视频播放,

所以,打算把Nginx 移植到ARM 平台下。

一、准备工作

下载 pcre-8.32.tar.bz2

解压缩:tar xjvf pcre-8.32.tar.bz2

进入目录:cd pcre-8.32

配置编译工具:./configure –host=arm-none-linux

Vi Makefile 检查一下里面的CC、CPP、CXX、CXXCPP、RANLIB、STRIP

修改对应的命令定义arm-none-linux-cc ….

编译:make

下载nginx-1.4.0.tar.gz:

解压缩:tar xzvf nginx-1.4.0.tar.gz

进入目录:cd nginx-1.4.0

配置编译工具:./configure --with-pcre=/home/…./pcre-8.32

注:nginx 不支持直接 configure 的时候带—host 参数,只能先用./configure 产

生Makefile。

二、编译Nginx

1.修改Makefile

Vi objs/Makefile

Line 2: CC = cc => CC = arm-none-linux-gcc

Line 4: CPP = cc –E => arm-none-linux-gcc –E

Make 发现错误:

src/core/ngx_open_file_cache.c:507: warning: implicit declaration of function `openat'

src/core/ngx_open_file_cache.c:513: warning: implicit declaration of function `fstatat'

src/core/ngx_open_file_cache.c:513: error: `AT_SYMLINK_NOFOLLOW' undeclared (first use

in this function)

src/core/ngx_open_file_cache.c:513: error: (Each undeclared identifier is reported only once

src/core/ngx_open_file_cache.c:513: error: for each function it appears in.)

src/core/ngx_open_file_cache.c: In function `ngx_open_file_wrapper':

src/core/ngx_open_file_cache.c:624: error: `AT_FDCWD' undeclared (first use in this

function)

2. 修改objs/ngx_auto_config.h

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值