Development platform: ubuntu8.04
Target platform: S3c2410
Development tools: arm cross tool chain version 3.4.5
boa version: boa-0.94.13.tar.gz
1. Download the source code and generate a makefile
1. Download the source code:
2. Copy to the /opt directory
3. Unzip tarzxvfboa-0.94.13.tar.tar
4. cdboa-0.94.13/src
5../configure
2. Before compiling, modify the file
1. Modify the Makefile, find CC=gcc and CPP=gcc-E, and change them to the path of the cross compiler installation:
CC=arm-softfloat-linux-gnu-gcc
CPP=arm-softfloat-linux-gnu-g++
Save and exit.
2. Modify the compilation method:
LDFLAGS=-g–staTIc
Note: The use of static compilation can make the target file automatically contain the required
Library files, while dynamic compilation requires manual copying of library files.
3. Modify the /src/defines.h file:
#defineSERVER_ROOT"/etc/boa"
4 Modify the boa-0.94/src/uTIl.c file
Modify the char*get_commonlog_TIme(void) function.
TIme_offset=0;
5. Modify src/config.c: add Current_uid=1
6. Modify compat.h: put the line 120
#define
TIMEZONE_OFFSET(foo)foo##->tm_gmtoff
change into:
#define
TIMEZONE_OFFSET(foo)foo->tm_gmtoff
7. Modify /src/boa.c, comment out the following two lines:
/*if(setuid(0)!=-1){
DIE("ickyLinuxkernelbug!");
}*/
/*if(passwdbuf==NULL){
DIE("getpwuid");
}*/
8: config.c
/*if(!server_name){
structhostent*he;
chartemp_name[100];
if(gethostname(temp_name,100)==-1){
perror("gethostname:");
exit(1);
}
he=gethostbyname(temp_name);
if(he==NULL){
perror("gethostbyname:");
exit(1);
}
server_name=strdup(he->h_name);
if(server_name==NULL){
perror("strdup:");
exit(1);
}
}*/
9. Modifications in /src/log.c: comment out:
/*if(dup2(error_log,STDERR_FILENO)==-1){
DIE("unabletodup2theerrorlog");
}*/
10. Modifications in boa.conf:
(1) Setting of ServerName
Modify #ServerName
ServerName
Note: This item is not opened by default. Executing Boa will exit abnormally, prompting "gethostbyname::Nosuchfileordirectory", so it must be opened. Other default settings are fine.
Note: The following is changed to the following:
(2) Modification of User and Group:
User0
Group0
(3) ErrorLog/var/log/boa/error_log
AccessLog/var/log/boa/access_log
(4) DocumentRoot/var/>
(5) DirectoryIndexindex.html
(6) KeepAliveMax1000
KeepAliveTimeout10
(7) MimeTypes/etc/mime.types
(8) ScriptAlias/cgi-bin//var/
Three, compile and transplant
1. Compile boa
#make
#arm-softfloat-linux-gnu-stripboa
2. Copy the mime.types file to the /etc directory of the target board root file system
3. On the development board
cd/etc
mkdirboa
Copy the 3 files (configuration file) boa.conf (compilation result) boadefines.h on the development machine to the development board /etc/boa/
4. On the development board
cd/var
mkdirwww (web pages can be placed in this folder)
mkdir/var/log/boa
Four, write CGI script test
1. Write Helloworld.c program
intmain(void)
{
printf("Content-type:text/htmlnn");//This sentence must be added
printf("Hello,world.");
exit(0);
}
arm-softfloat-linux-gnu-gcc-ohelloworldhelloworld.c
2. Browse
Copy helloworld to /var/, and enter the IP address of the development board in the browser to see the web information.
ZGAR AZ Ice Box Vape
ZGAR electronic cigarette uses high-tech R&D, food grade disposable pod device and high-quality raw material. All package designs are Original IP. Our designer team is from Hong Kong. We have very high requirements for product quality, flavors taste and packaging design. The E-liquid is imported, materials are food grade, and assembly plant is medical-grade dust-free workshops.
Our products include disposable e-cigarettes, rechargeable e-cigarettes, rechargreable disposable vape pen, and various of flavors of cigarette cartridges. From 600puffs to 5000puffs, ZGAR bar Disposable offer high-tech R&D, E-cigarette improves battery capacity, We offer various of flavors and support customization. And printing designs can be customized. We have our own professional team and competitive quotations for any OEM or ODM works.
We supply OEM rechargeable disposable vape pen,OEM disposable electronic cigarette,ODM disposable vape pen,ODM disposable electronic cigarette,OEM/ODM vape pen e-cigarette,OEM/ODM atomizer device.
ZGAR AZ ICE BOX Disposable Vape,ZGAR AZ ICE BOX disposable electronic cigarette, ZGAR AZ ice box vape ,ZGAR AZ Ice Box E-cig,AZ ICE BOX disposable electronic cigarette
Zgar International (M) SDN BHD , https://www.zgarpods.com