嵌入式Web服务器软件构成与工作原理(二)

boa服务的部署

 

1、解压

# tar xzf boa-0.94.14rc21.tar.gz

 

2、 编译
# cd boa-0.94.14rc21
# ./configure
生成了boa-0.94.14rc21/src目录下makefile文件,

修改makefile文件,
把其中的
CC  CPP
-E
改为:
CC = arm-linux-gcc
CPP = arm-linux-g++

然后make
# make

删除调试信息(可以不做,目的是减小文件大小,处理前后文件大小对比201503字节、70532字节):
# arm-linux-strip boa

3、修改配置
boa根目录找到boa.conf文件,
修改如下项目:
User nobody
(可以不修改)
Group nogroup
改为:Group 0
ErrorLog /var/log/boa/error_log
(错误日志文件)
AccessLog /var/log/boa/access_log
(访问日志文件,可以用#注释掉这行,表示不要这个日志)
ServerName www.my.com (
服务器地址)
DocumentRoot /var/www
html文件主路径)
MimeTypes /etc/mime.types
mime.types文件)
更多配置,可以参见:

http://blog.chinaunix.net/u1/34076/showart_268366.html

4、  配置开发板
1
,复制boa的可执行文件到开发板,(如:/usr/local/bin/ 目录)
2
,在开发板上建文件夹
# mkdir /var/www/ ,
并放一个简单的 index.html 测试文件进去
# mkdir /var/log/boa ,
用来存放 access_log error_log
3
,复制之前修改好的boa.conf文件到  /etc/boa/boa.conf
4
,复制自己pcFedora9)上的mime.types文件,到/etc/mime.types

5、            运行boa
# boa

 

注意:

arm-linux-gcc版本为3.4.1

boa下载地址:http://download.csdn.net/source/3131162

 

 

boa service deployment

1, extract
# tar xzf boa-0.94.14rc21.tar.gz

2, compile
# cd boa-0.94.14rc21
#. /configure
generate makefile file on boa-0.94.14rc21/src directory

modify the makefile file
from:
CC CPP-E
to:
CC = arm-linux-gcc
CPP = arm-linux-g + +

then make
# Make

Remove debugging information (you can not do it, the purpose is to reduce the file size, file size before and after contrast 201503 bytes, 70532 bytes):
# arm-linux-strip boa

3, modify the configuration
From the root directory to find boa.conf boa file
Modify the following items:
User nobody (modify or not)
from:Group nogroup to: Group 0
ErrorLog /var/log/boa/error_log (error log file)
AccessLog /var/log/boa/access_log (access log files, you can use the # comment out this line that should not use log)
ServerName www.my.com (server address)
DocumentRoot /var/www (html file the main path)
MimeTypes /etc/mime.types (mime.types file)
More configuration, you can see:
http://blog.chinaunix.net/u1/34076/showart_268366.html

4, configuration, development board
1, copy the executable file boa to the development board, (such as /usr/local/bin/ directory)
2, create folders on development board
# mkdir /var/www/, and put a simple index.html test file into the directory
# mkdir /var/log/boa, used to store access_log error_log
3, copy the file boa.conf that had been modified well to /etc/boa/boa.conf
4, copy your pc (Fedora9) the mime.types file to /etc/mime.types

5, running boa
# boa

Note:

arm-linux-gcc version 3.4.1

boa download:http://download.csdn.net/source/3131162

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值