ac_cv_func_realloc_0_nonnull=yes \
./configure \
--host=arm-linux \
--disable-readdir_r \
--disable-tls \
--enable-static-module=all \
--enable-trace \
--enable-static \
--enable-shared=no \
--enable-beta \
--disable-ipv6 \
CC=arm-linux-gcc
make
you will get an errro about readdir_mutex.
go to file cherokee/util.c line 400, changed it to:
#if defined(HAVE_PTHREAD)
now you are good to go, just type make and the final files are in cherokee/{cherokee,cherokee-worker}
To run Cherokee on an embedded platform:
1. download cherokee-worker, cherokee
2. create a conf file with the following contents:
server!bind!1!port = 80
server!timeout = 60
server!keepalive = 1
server!keepalive_max_requests = 500
server!server_tokens = full
#server!encoder!gzip!allow = html,html,txt,css,js
server!panic_action = /web/cherokee-panic
server!pid_file = /var/run/cherokee.pid
server!user = root
server!group = root
# Default virtual server
#
vserver!default!nick = default
vserver!default!document_root = /web
vserver!default!directory_index = index.php,index.html
vserver!default!logger = combined
vserver!default!logger!access!type = file
vserver!default!logger!access!filename = /var/log/cherokee.access
vserver!default!logger!access!buffsize = 16384
vserver!default!logger!error!type = file
vserver!default!logger!error!filename = /var/log/cherokee.error
vserver!default!rule!1!match = default
vserver!default!rule!1!handler = common
vserver!default!rule!1!handler!iocache = 0
vserver!default!rule!99999!match = extensions
vserver!default!rule!99999!match!extensions = php
vserver!default!rule!99999!handler = fcgi
vserver!default!rule!99999!handler!balancer = round_robin
vserver!default!rule!99999!handler!balancer!type = interpreter
vserver!default!rule!99999!handler!balancer!source!1 = 1
vserver!default!rule!99999!handler!balancer!local1!host = 127.0.0.1:1234
vserver!default!rule!99999!handler!balancer!local1!env!PHP_FCGI_CHILDREN = 5
vserver!default!rule!99999!handler!balancer!local1!interpreter = /web/php-cgi -b 1234
source!1!env!PHP_FCGI_CHILDREN = 5
source!1!host = 127.0.0.1:1234
source!1!interpreter = /web/php-cgi -b 1234
source!1!nick = php
#source!1!type = interpreter
source!1!type = host
3. create a themes directory with the followings files:
ls themes/default/
theme.css logo.png header.html footer.html entry.html
4. run it "./cherokee -C cherokee.conf"
You can enable tracing to see the traces of cherokee.
Hi,
ReplyDeleteCan you tell me why do we need to go to file cherokee/util.c
and change line 400 to
#if defined(HAVE_PTHREAD)
Thanks in advance.