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,复制自己pc(Fedora9)上的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