Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to migrate boa based on SAIL-AM335?

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Boa transplant based on am335, a total of five steps, the following are detailed steps, to this knowledge is relatively unfamiliar with the small partners, you can learn it.

1. Prepare the development environment:

(1)VMware 10.0

(2)Ubuntu 14.04 64bit

(3) Sail335 development board

(4) Cross-compiler: gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux

2. Source code:

(1) Boa source code: boa-0.94.13.tar.gz

(2) Boa test page: index.html

3. Transplantation process:

1) Transplantation of Boa

① Decompression #tar zxvf boa-0.94.13.tar.gz ② Enter boa-0.94.13 directory #cd boa-0.94.13 ③ Go to src directory and run./under src directory. configure ④ Generate Makefile, modify Makefile compiler options #gedit Makefile CC = gcc changed to CC = arm-linux-gnueabihf-gcc CPP = gcc -E changed to CPP = arm-linux-gnueabihf-gcc -E Add temporary environment variables for cross-compiler #export PATH=/usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/:$PATH Modify the file src/boa.c and remove the following lines from the boa.c file. if ( setuid ( 0 ) != - 1 ) { DIE ( "icky Linux kernelbug! " ); } Modify file src/compat.h #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff changed to #define TIMEZONE_OFFSET(foo) foo->tm_gmtoff If(!) in config.c. server_name){..........} (Approximately 266 lines. between lines 286) comment out Modify src/log.c to comment out if (dup2(error_log, STDERR_FILENO) == -1) { DIE("unable to dup2 the error log"); } compiled code #make

4. Operating environment setup

(1) Create the following directories in the development board

/etc/boa /var/logs /var/logs/boa /var/www /var/www/cgi-bin #mkdir -p /etc/boa #mkdir -p /var/logs #mkdir -p /var/logs/boa #mkdir -p /var/www #mkdir -p /var/www/cgi-bin

(2) Copy and modify documents

Copy boa-0.94.13/boa and boa-0.94.13/boa_indexer to/usr/bin. Copy/etc/mime.type of Ubuntu 12.04 to/etc of the development board Copy boa-0.94.13/boa.conf to/etc/boa Change/etc/boa/boa.conf For #ServerNamewww.your.org.here read ServerName www.dianyu.org ScriptAlias /cgi-bin//usr/lib/cgi-bin/changed to ScriptAlias /cgi-bin//var/www/cgi-bin/ AccessLog/var/log/boa/access_log changed to AccessLog /var/logs/boa/access_log ErrorLog /var/log/boa/error_log changed to ErrorLog /var/logs/boa/error_log Copy index.html to/var/www

5. Test and Run

Connect the PC and the network card 0 (eth0) of the development board Set the eth0 network card ip of the development board to 192.168.1.123 #ifconfig eth0 192.168.1.123 up Test the network connection between NIC 0 and PC of development board #ping PC IP address Run Boa #boa& Open a browser on your PC, type 192.168.1.123 in the browser, and view the index.html displayed by boa (this file name is the same as the index.html in DirectoryIndex.html in boa.conf file)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report