Close

Cole10540316 blog

Twenty-one
Original
Zero
Reprint
Zero
translation
One
comment
Twenty-five thousand seven hundred and fifty-seven
Visit

Two thousand and sixteenJune
Thirty

Linux web server build

Linux's Web server build

  1. Introduction to boa web server

    Boa is a very compact web server with about 60K of execution code and is widely used in embedded platforms. The boa server is a single task network server that can only execute user requests in turn.

    Bao download address (has not been updated for 10 years)

    Http://www.boa.org/

    Here is the boa-0.94.13.tar.gz version, and the next thing to do is compile boa.

  2. Boa file compilation

    • Unzip the installation package file: tar -vxf boa-0.94.13.tar.gz
    • Generate Makefile file: CD SRC file, execute./config, generate Makefile file
    • Modify the Makefile file: VI Makefile into the Makefile file, CC=GCC will revise the corresponding platform compiler changed: CC = arm-none-linux-gnueabi-gcc -static CPP = GCC -E = arm-none-linux-gnueabi-gcc -E -static to CPP
    • Change the compat.h file, #define TIMEZONE_OFFSET (foo) foo##->tm_gmtoff #, removed into #define TIMEZONE_OFFSET (foo) foo->tm_gmtoff
    • Execute the make command to compile the boa server
    • Execute arm-none-linux-gnueabi-strip boa to slim down boa files
    • So far, compile work is complete
  3. Boa web server file structure build

    The boa server needs to work under the specified file, so here's the boa web server file structure

    File description:
    (1) the compiled boa files are copied to the /bin directory of Linux
    (2) boa.conf comes from the boa installation package file
    (3) mime.types comes from the /etc directory of Linux
    (4) the group file entry is root:*: 0:
    (5) modify the boa.conf file. Find the "Group nogroup" line, "Group root", modified to find the "#ServerName www.your.org.here" line, "ServerName www.your.org.here", modified to find the "DocumentRoot /var/www" line, "DocumentRoot /www", modified to find "ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/" a "ScriptAlias /cgi-bin/ /www/cgi-bin/, modify save and exit
    (6) boot up, set the last line of etc/init.d/rcS, and enter boa &
    (7) index.html file to access the home page

4. test method

Enter the server IP address for testing

Img

Cole10540316

Grade:

Ranking:A thousand li away

Blog column
Article classification
archives
Reading list
Review ranking
Recommended articles
Latest review
Img