![]() |
#1 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
![]()
Right 1st: What is RT. http://bestpractical.com/rt/docs.html
2nd: Who wrote it? Jesse did, the guy who also brought you savory and the early X11 on a kindle hacks for the k3. 3rd: Twobob, why the hell are you doing this. Well. That's a tougher question to answer. a) because I would rather like to ask Jesse a completely unrelated question about his x11 build and this seemed like an amusing way to get his attention b) because using a kindle 3 (and all kindles actually from just this one build since it is built to run on them all) to be a LAMP server seemed like a pretty sexy, if stupid, thing to do and finally c) because RT is cool and I wanted to see if it could be run on something so tiny as a kindle. 4th: Wait a LAMP server on a kindle? Well... not really in the traditional sense, This will be Linux, Nginx(ot Lighthhtpd), Postgresql and Perl(or php) but that's /pretty/ close to a LAMP server.. so. I think we get a "Gimme" (or a mulligan, either way) 5th: So, what, like all from a debian loop mount? Pfft. too easy, this is all got to run natively, only loop mounts allowed will be to provide ext3 compatible storage on FAT. 6th: Well did it work? TBC: Last edited by twobob; 11-16-2013 at 08:32 PM. |
![]() |
![]() |
![]() |
#2 | ||||||||||||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Step 0: Get a compiler configured to build this stuff.
I'm going to use native arm debian compiler on my PC via qemu. You can use w/e, I provide a download to the qemu ready debian image I used. Step 1 and beyond...: Nginx: http://wiki.nginx.org/Main I grabbed the source and configured like: nginx-0.7.67 Quote:
Quote:
we also want to build lighttpd, just for the spawn-fcgi it has. (meh, call me lazy) we configure it thusly: lighttpd-1.4.19 Quote:
so next we need a database engine. I'm going with postgresql (mainly because mysql is bit heavy, doesn't natively support arm processor and finally is a total PITA to build) NOTE: The kindle has sqlite and RT supports that but meh. I wanted something a bit more hunky. we configure like so: postgresql-8.4-8.4.2 Quote:
Also we could adjust the file permission checks to be 755 (say) rather than 700 since this is gonna live on a kindle and no one should be insane enough to ACTUALLY use this in production to say, run a business. Like really. Whut? Don't. or lock it down like crazy and actually add some user accounts etc... (you are like totally on your own there) and shove that on the kindle Now... we also need some space for that to run in. It won't run on FAT (I couldn't get it to anyways) so let' give it a bit of ext3 space Quote:
/mnt/us/extensions/postgresq/usr/bin/initdb /mnt/us/extensions/postgresql/data/rt done Next up we need perl Configuring it goes like this: perl-5.10.x Quote:
we also need to add one or two missing required modules via cpan. MISSING RT MODULES to get via CPAN Quote:
here is one way to install a SINGLE one of those that bypasses to need to do self testing... Quote:
You can also limit the above list by removing inessential thing like Graphviz etc... (I did this) Quote:
(I did it by hand, meh) don't shove that on the kindle just yet. [SNIP ADD THE CONFIGURING postgresql HERE ] We need to configure RT like this: rt-4.2.0 Quote:
and then a couple of extra commands pointed at our postgresql database server [Add details about that.] Okay let's test out our RT fast-cgi module [root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/lighttpd/usr/bin/spawn-fcgi -p 127.0.0.1 -p 9000 -f /mnt/us/extensions/rt/usr/sbin/rt-server.fcgi Quote:
[SNIP ADD THE CONFIGURING nginx HERE ] TBC: [JUMP TO STARTING THE DATABASE] [root@kindle bin]# /mnt/us/extensions/postgresql/usr/bin/postgres -D /mnt/us/extensions/postgresql/data/rt Quote:
Now the DOCS say we can WITHOUT running nginx use the invocation: [root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/rt/usr/sbin/rt-server and browse the thing, however doing so will top out the memory required to above 240 MB and the kindle will reboot... So... not an option. Last edited by twobob; 11-16-2013 at 10:07 PM. |
||||||||||||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
This somehow seems an appropriate comment:
@twobob: Go ahead and moderate this one into the bit-bucket if you wish. |
![]() |
![]() |
![]() |
#4 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Just for giggles. I slapped on a 100MB swapfile and ran the native server.
Worked great. not super fast but totally usable. I'll finish up documenting fast-cgi and such later. but yeah. P.O.C. works. probably run real nice on a PW. Last edited by twobob; 11-16-2013 at 10:46 PM. |
![]() |
![]() |
![]() |
#5 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Looks better than expected for certain.
Even in grayscale. A note for the general readers: The nginx server can be used as a proxy server, for those trying to re-direct attempts to access the Amazon system URLs. A note for the technical readers: Here "swap on flash" is being used - the Kindle just does not have the free RAM available to do this sort of applications set without it. Last edited by knc1; 11-17-2013 at 07:35 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I saw recently that you were building web server stuff, why am I not surprised that this all works?
![]() The other day I was going to try lighttpd but it complained I didn't have an sql installed yet, so I put it off. Maybe I'll go back and revist. Not that I need any of this, just fun to get working. I would like, as a package, lighttpd, php, and postgresql. Nice combo IMO. Some cool scripts could be served up with that... Thanks for the inspiration! As a side note, I was just using this python script to serve /mnt/us as an index and allow files to be uploaded, one at a time. Handy for quickly sharing with a friend, yes? Needs python : https://www.mobileread.com/forums/sho...ghlight=python Thanks again! |
![]() |
![]() |
![]() |
#7 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Expects to live in /mnt/us/extensions/lighttpd ( I was lazy and didn't pack it up like that) Haven't really played with this, just used it to test fast-cgi.
|
![]() |
![]() |
![]() |
#8 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
okay so.. after a very large amount of messing around thinking I just couldn't get the sockets working for fast-cgi turns out it wasnt me: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698071 DUH!
Now have fast-cgi sockets working properly on the k3. Yay. [root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/lighttpd/usr/bin/spawn-fcgi -s /var/run/fcgiwrap.socket -f /mnt/us/extensions/rt/usr/sbin/rt-server.fcgi Quote:
Last edited by twobob; 11-17-2013 at 10:41 PM. |
|
![]() |
![]() |
![]() |
#9 | |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Quote:
![]() twobob - thanks for the lighttpd package - now to test then add php, then... yep - with your previous php post, I just got phpinfo ! On my way now ![]() Last edited by brianinmaine; 11-18-2013 at 01:19 AM. |
|
![]() |
![]() |
![]() |
#11 | |||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
![]() Quote:
Quote:
because: Quote:
Spoiler:
didn't test it, just built it. EDIT: bundled up a libz-so.1 to dump in /mnt/us/extensions/uwsgi/usr/lib if you want to get rid of that version warning. Oh and these work on a k3 and above... Cheers Last edited by twobob; 11-18-2013 at 09:11 AM. |
|||
![]() |
![]() |
![]() |
#12 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Does that thing have enough options?
I don't see any: "--moon-in-third-quarter" options in the list. ![]() Nor any: "--include-kitchen-sink" |
![]() |
![]() |
![]() |
#13 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
[root@kindle root]# /mnt/us/extensions/uwsgi/uwsgi -s /var/run/uwsgi.socket
Quote:
|
|
![]() |
![]() |
![]() |
#14 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
A for-real, serious question here
Now that this thread that includes non-Apache servers has caught the interest of "server type people" -
I have a serious question: I have a need to support SRP over HTTPS (TLS-SRP) on a web site. To do that with OpenSSL requires at least version 1.0.1 It can also be done using GNUTLS package (minimum version unknown). Do any of these non-Apache servers support TLS-SRP authentication? (My hosting provider does not support a new enough mod-ssl - good 'ol customer service says: "run your own server".) Since TLS-SRP is only supported by a very limited number of browsers, the client code will be in Javascript: http://code.google.com/p/srp-js/ |
![]() |
![]() |
![]() |
#15 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
https://wiki.mozilla.org/Security/DNSSEC-TLS-nginx
"This page details how to set up a server running a modified version of nginx that uses a self-signed certificate with the DNSSEC TLS extension to authenticate https sessions. It's probably safest to do this in a virtual machine. However, for the brave, simply skip the VM-specific steps." |
![]() |
![]() |
![]() |
Tags |
fast-cgi, kindle, lamp, perl, rt request tracker, twobob |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
tiny C compiler on the kindle | lrizzo | Kindle Developer's Corner | 13 | 04-16-2018 10:44 AM |
php-cli/cgi - All kindles | twobob | Kindle Developer's Corner | 13 | 09-27-2013 07:50 AM |
Help finding tiny towers and tiny zoo | mojkadona | Kindle Fire | 5 | 04-26-2012 07:02 PM |
How to handle RSS sites with redirections (cgi-bin) | Bortolotto | Recipes | 2 | 07-09-2011 12:13 AM |
Kindle dx has a tiny chip | ryeyoo | Amazon Kindle | 4 | 12-05-2010 02:21 AM |