Topic: Lighttpd for chumby!

I've posted the steps for turning a chumby into a web server here.

Although these instructions were done for the Ironforge production chumby devices, they should also work for the alpha prototypes.

Re: Lighttpd for chumby!

i really wanted this to work, but after installing the one that was pre-made (because i cant make it as the newbie that i am) and then putting it on a flash drive then i put it in my chumby and rebooted it, it wouldn't work. Im not sure if i did something wrong or if there is a way to start it up that i don't know, but could you please help me out? i really want this to work (it would change chumby from terminator bad ass to like chuck noriss bad ass) help help help... please

Re: Lighttpd for chumby!

does the server support PHP and MySQL databases?

if so, how should I go about installing them?

Re: Lighttpd for chumby!

I'm sure some enterprising developer could port these to chumby, but as far as I know, it hasn't been done yet.

The chumby is a bit lightweight to run such heavy applications, but I suppose it's worth a shot.

Re: Lighttpd for chumby!

I've got PHP running just fine on my chumby. To install, follow this thread:

http://forum.chumby.com/viewtopic.php?id=1302

Re: Lighttpd for chumby!

This hack has been rebuilt for GCC 4.3.2/EABI to be compatible with firmware 1.7

Re: Lighttpd for chumby!

Excuse my ignorance in this category, but I was curious if there was anything special I can do to make this "auto-load" on the C1.  When I put the usb drive on a classic it loads up everything without intervention, but on the C1 it wont start the lighttpd process, though it does activate the sshd.

debugchumby:

#!/bin/sh
touch /tmp/ttyUSB0.nogetty
/sbin/sshd

# kill the built-in web server
killall httpd

#tmp
mkdir /tmp/logs

# start lighttpd
LD_LIBRARY_PATH=/mnt/usb/lighty/lib
/mnt/usb/lighty/sbin/lighttpd -f /mnt/usb/lighty/lighttpd.conf

There is also the "start.sh" in the lighty directory which contains:

#!/bin/sh
# kill the built-in web server
killall httpd
# start lighttpd
LD_LIBRARY_PATH=/mnt/usb/lighty/lib
/mnt/usb/lighty/sbin/lighttpd -f /mnt/usb/lighty/lighttpd.confv

This is the one I have to maually log in and start to get it to work.

Any ideas, or am I out of luck on this one?  Thanks in advance.

-dev

Re: Lighttpd for chumby!

I don't see anything obviously wrong - are the line-endings in the file all correct?

9 (edited by cbreeze 2012-01-22 14:49:26)

Re: Lighttpd for chumby!

I assume so.  I just used the included file.  Again, it works flawlessly on chumby classic.  Is the C1 stricter?

Something odd I am seeing, after manually starting lighttpd, is the sshd & web server (lighttpd) connection dropping off after a handful of minutes and then coming back up many minutes later!?  Maybe memory related?  I will admit that this unit is acting a bit skittish, on one of the reboots it "landed face down" with a zeroed out network.

Am I up to date?

SW Version: 1.0.7
FW Build: 1.0.3454
HW Version: 10.6

The reason I'm asking is that I have a piece of software that I've built on top of that stack, so I guess I'll just release what I have and see if it works for others with C1s.  Perhaps someone can come up with a fix.

-dev

EDIT: After the initial dropping and reconnecting of the sshd and web server they do not seem to drop again.  But the same situation always takes place on reboot.

10 (edited by cbreeze 2012-01-22 15:31:48)

Re: Lighttpd for chumby!

I probably should add that I am using the PHP verison http://forum.chumby.com/viewtopic.php?id=1302

EDIT: Well I'm going to chalk up the dropping/non-loading services to memory.  The classic shows 12940 free and the C1 shows 4584 running the same stack, which seems kind of odd.

-dev

Re: Lighttpd for chumby!

You might be able to kill some other services - I think chumbhowld uses up a chunk.

Re: Lighttpd for chumby!

Duane wrote:

You might be able to kill some other services - I think chumbhowld uses up a chunk.

It certainly gave a bit more memory but still getting no love on the lighttpd service auto-starting.  Ill post the whole piece so perhaps someone can see what's causing it.

Thank you for your help.

Re: Lighttpd for chumby!

Is there any way to get Python running with lighttpd on chumby?