<! --
@ Page {margin: 2 cm}
P {margin-bottom: 0.21}
-->
After 2
Day, finally put Boa
The server is transplanted to my dm365
Ipcam
On! I will share my personal experience with you!
Environment:
HOST: ubuntu9.10
Cross-compilation tool: arm_v5t_le
Target Board: Ti
Company dm365
The detailed process is as follows:
1.
Download Boa
Source code
:
Http://www.boa.org/
Latest release: 0.94.13
Download boa-0.94.13.tar.gz
2.
Modify file
(1
) Modify
Src/compat. h
Find
# Define timezone_offset (FOO)
Foo ##-> tm_gmtoff
Modify
# Define timezone_offset (FOO)
(FOO)-> tm_gmtoff
Otherwise, an error occurs:
Util. C: 100: 1: Error: pasting
"T" and "->" does not give a valid
Preprocessing token make: *** [util. O]
Error 1
(2
)
Comment out the following statement:
If (setuid (0 )! =-1)
{
Die ("icky
Linux Kernel bug !");
}
Is
# If 0
If
(Setuid (0 )! =-1 ){
Die ("icky
Linux Kernel bug !");
}
# Endif
Otherwise, a problem occurs: boa. C: 228.
-Icky Linux kernel bug! : No such file or directory
3.
Generate makefile
Run:
# Cd
BOA-0.94.13/src
#./Configure
4.
Modify makefile
CD SRC
Vim makefile
Modify CC
= Gcc
CC
=
Arm-softfloat-Linux-GNU-gcc
Modify CPP
= Gcc
-E
CC
=
Arm-softfloat-Linux-GNU-gcc-e
5.
Compile
Make
Ls-l Boa
-Rwxr-XR-x
1 David 189223 Boa
Then, for the generated binary file Boa
Slimming
Arm-softfloat-Linux-GNU-strip
BOA
Ls-l Boa
-Rwxr-XR-x 1 David 61052
BOA
BOA can be found
The gap between the size and the size is very large, which saves us a lot of space.
6. BOA
Configuration
In Boa-0.94.13
There is an example boa. conf in the directory.
. As follows:
# Vi boa. conf
(1) Group
Modification
Modify group nogroup
Group Root
(2) User
Modification
Modify user nobody
User Root
(3) ScriptAlias
Modification
Modify ScriptAlias/cgi-bin/
/Usr/lib/cgi-bin/
It is ScriptAlias/cgi-bin/
/Var/www/cgi-bin/
(4) accesslog
Create/var/log/BOA/
Folder
Otherwise, the error message "unable" appears.
To dup2 the Error Log: Bad file descriptor"
(5)
The following configuration and BOA. conf
Configurations are related
Create
Perform the following steps on the Development Board:
Create directory/etc/Boa
And put Boa
And boa. conf
Copy to this directory
Mkdir/etc/Boa
Create HTML
Main directory of the document/WWW
Mkdir/WWW
Create CGI
Script recording
/Www/cgi-bin
Mkdir/www/cgi-bin
In ubuntu, follow these steps:
Run:
Set boa. conf
Copy/etc/BOA to the root file system of the Development Board
Lower
# Cp boa. conf
/Source/rootfs/etc/Boa
Change Boa
Copy/etc/BOA to the root file system of the Development Board
Lower
# Cp src/Boa
/Source/rootfs/etc/Boa
Set Ubuntu
Lower/etc/mime. Types
Copy to/etc of the Development Board root file system
Lower
# Cp/etc/mime. Types
/Source/rootfs/etc
Set your main page index.html
Copy to www
Directory
7
, Test
Open a browser and enter the Development Board IP address.
View results
192.168.16.44
OK