nginx-1.6.0 移植
来源:互联网 发布:为什么淘宝找不到店铺 编辑:程序博客网 时间:2024/05/16 17:15
NGINX VERSION: nginx-1.6.0
ZLIB VERSION: zlib-1.2.8
PCRE VERSION: pcre-8.33
OPENSSL VERSION:openssl-1.0.1e
TARGET:arm-hisiv200-linux
编译参考如下:
http://www.cppblog.com/van201314/articles/165661.html
http://blog.csdn.net/zangcf/article/details/22057661
1.auto/cc/name
if [ "$NGX_PLATFORM" != win32 ]; then
ngx_feature="C compiler"
ngx_feature_name=
#ngx_feature_run=yes
ngx_feature_run=no ==>set to no to skip check
ngx_feature_incs=
ngx_feature_path=
2.auto/types/sizeof
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS
==> ngx_test="gcc $CC_TEST_FLAGS $CC_AUX_FLAGS
3.src/os/unix/ngx_errno.h
at line 15 add #define NGX_SYS_NERR 333
4.src/os/unix/ngx_errno.c // 在1.6.0里面是 src/os/unix/ngx_shmem.c
#if (NGX_HAVE_MAP_ANON) ==> #if (!NGX_HAVE_MAP_ANON)
5.prepare zlib and pcre
download zlib-1.2.8 and decompress to /home/mo/zlib-1.2.8
download pcre-8.20 and decompress to /home/mo/pcre-8.20
6.auto/lib/pcre/make
./configure --disable-shared $PCRE_CONF_OPT
==>./configure --disable-shared $PCRE_CONF_OPT --host=arm
记住把openssl一定要放到linux下面,要不有莫名的错误 --prefix这个需要设置在开发板放置的位置,要不会找不到配置文件等可能有其他方式解决这个问题,目前我不清楚。
./configure --add-module=/mnt/nfs/qt-test/Hi3531Enc/rtmp/nginx-rtmp-module-master/ --with-openssl=/nfsroot/rtmp/openssl-1.0.1e/ --prefix=/nand/nginx-1.6/ --with-cc=/opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm-hisiv200-linux-gcc --with-cpp=/opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm-hisiv200-linux-g++ --with-zlib=/mnt/nfs/arm/zlib-1.2.8/ --with-openssl-opt='AR=arm-hisiv200-linux-ar RANLIB=arm-hisiv200-linux-ranlib CC=arm-hisiv200-linux-gcc /usr/bin/perl no-asm' --with-pcre=/mnt/nfs/qt-test/Hi3531Enc/rtmp/pcre-8.33
make openssl的时候会有linux-elf问题 修改objs/Makefile:
/nfsroot/rtmp/openssl-1.0.1e//.openssl/include/openssl/ssl.h: objs/Makefile
cd /nfsroot/rtmp/openssl-1.0.1e/ \
&& if [ -f Makefile ]; then $(MAKE) clean; fi \
# && ./config --prefix=/nfsroot/rtmp/openssl-1.0.1e//.openssl AR=arm-#hisiv200-linux-ar RANLIB=arm-hisiv200-linux-ranlib CC=arm-hisiv200-linux-gcc /#usr/bin/perl no-asm no-shared no-threads \
&& AR=arm-hisiv200-linux-ar RANLIB=arm-hisiv200-linux-ranlib CC=arm-hisiv200-linux-gcc /usr/bin/perl ./config --prefix=/nfsroot/rtmp/openssl-1.0.1e//.openssl no-asm no-shared no-threads \
&& $(MAKE) \
&& $(MAKE) install LIBDIR=lib
make
make install
编译好后,在我的板子上发现会报错误,就是 getpwnam 和 getgrnam 的错误, 发现是这个函数在我的板子上是无效的,无论获取什么用户名都是失败的。 于是又去改源代码。src/core/nginx.c:1033 这里就是非win32平台的部分,修改掉两个函数调用过程,然后将用户名用户ID,用户组ID写死。 再次编译,然后就可以运行了。
关于配置文件的详细介绍,可以看以下大神的解释:
http://wenku.baidu.com/view/9356fb2c3169a4517723a314.html
http://blog.csdn.net/defonds/article/details/9274479
- nginx-1.6.0 移植
- 移植 nginx
- nginx移植手册
- nginx移植记录
- Nginx在zedboard中的移植
- nginx移植到mips平台
- Ubuntu nginx 1.6.0 服务器 nginx.conf等相关配置
- install source nginx 1.6.0
- 在OpenWrt上移植fcgiwrap为nginx提供cgi支持
- 移植nginx+php+sqlite到arm linux(一)
- 移植nginx+php+sqlite到arm linux(二)
- 移植 Nginx+PHP(FastCGI) 到 ARM Linux (一)
- 移植 Nginx+PHP(FastCGI) 到 ARM Linux (二)
- 移植 Nginx+PHP(FastCGI) 到 ARM Linux (三)
- 嵌入式hi3516-hi3518海思平台移植nginx-1.12.2
- iptables-1.6.0的ARM移植
- porting nginx to android with ssl module(移植nginx及其ssl模块到android设备)
- u-boot1.1.6移植
- 【转】http协议解析
- valgrind,arm-linux交叉编译
- qt 关于鼠标
- mp4v2 写mp4
- python的nltk中文使用和学习资料汇总帮你入门提高
- nginx-1.6.0 移植
- cortex_m3_stm32嵌入式学习笔记(十三):USMART调试组件移植(调试神器)
- ffmpeg框架结构解读
- Linux 下的图形库介绍
- mpeg 音频格式科普
- MinGW 编译boost-1.57.0
- OC、OD、线或线与逻辑
- 编解码学习笔记(一):基本概念
- 编解码学习笔记(二):codec类型