Bekijk de volledige versie : webserver mit busybox
edding_3000
26-06-2010, 16:59
guten abend liebe leute!
hab mal wieder eine frage an euch. ^^
und zwar ist es ja möglich mit busybox einen webserver zu starten.
funktioniert auch alles recht gut und reicht für meine zwecke.
nun habe ich aber das problem, das wenn der gute router mal neu gestartet wird, der webserver nicht mitgestartet wird.
ich habe bereits in die datei
/usr/local/sbin/post-boot
folgendes rein geschrieben
busybox_httpd -p 57000 -h /tmp/harddisk/www
und das ganze mit
flashfs save && flashfs commit && flashfs enable
gespeichert.
hab ich iwas vergessen oder falsch gemacht?
newbiefan
26-06-2010, 21:48
hab ich iwas vergessen oder falsch gemacht?
Kannst du einmal ein:
cat /tmp/local/sbin/post-boot
und ein
ls /tmp/local/sbin
durchführen und das Ergebnis posten?
edding_3000
27-06-2010, 10:29
hier mal die post-boot
#!/bin/sh
dropbear
busybox_httpd -p 57000 -h /tmp/harddisk/www/
und der sbin ordner
total 0
drwxr-xr-x 1 admin root 0 Nov 7 2008 .
drwxr-xr-x 1 admin root 0 Jan 25 2008 ..
-rwxr-xr-x 1 admin root 833 Jun 17 08:02 ez-setup
-rwxr-xr-x 1 admin root 64 Oct 26 2009 post-boot
-rwxr-xr-x 1 admin root 0 Nov 7 2008 post-firewall
-rwxr-xr-x 1 admin root 45 Nov 7 2008 post-mount
-rwxr-xr-x 1 admin root 109 Jun 3 07:35 pre-boot
-rwxr-xr-x 1 admin root 264 Jun 3 07:36 pre-mount
-rwxr-xr-x 1 admin root 176 Jun 3 07:38 pre-shutdown
meinst du die rechte sind falsch?
newbiefan
28-06-2010, 20:54
meinst du die rechte sind falsch?
Nein, ich wollte nur sehen, ob deine Startfiles ausführbar sind.
Komisch ist, dass alles ok sein sollte......
Mach einmal ein top oder htop (vom ipkg) oder ps -axf, ich wette der läuft schon....
Ich sehe soeben, dass er auch bei mir zwar läuft, aber nicht reagiert - vielleicht fehlt noch die httpd.conf Datei. Müsste probieren, bzw. googeln.
Dennoch würde ich einfach lighttpd installieren, der ist klein und stabil und ganz einfach zu konfigurieren. Nur in /opt/etc/lighttpd/lighttpd.conf den richtigen Port angeben und eventuell das Document root anpassen (kann aber auch auf /opt/share/www/ bleiben). Der Startscript wird auch installiert.
Also nur ipkg install lighttpd ....
Funktioniert denn der neue lighttpd?
Der "alte" hatte doch einige Problem, weshalb ich auf anraten die Version 1.4.22-1 genommen habe.
Die neue Version ist ja mittlerweile bei 1.4.26-1.
Gruß wolder
edding_3000
02-07-2010, 14:45
top sagt folgendes:
top - 15:37:41 up 6 days, 1:40, 0 users, load average: 0.16, 0.04, 0.01
Tasks: 57 total, 2 running, 53 sleeping, 0 stopped, 2 zombie
Cpu(s): 2.3% user, 2.6% system, 0.0% nice, 95.2% idle
Mem: 30164k total, 29584k used, 580k free, 2944k buffers
Swap: 506008k total, 39040k used, 466968k free, 7276k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
643 admin 18 0 632 632 492 R 3.2 2.1 0:00.39 top
361 admin 9 0 17688 6160 2952 S 0.3 20.4 19:56.64 python
211 admin 10 0 17764 6152 2728 S 0.3 20.4 22:59.96 python
212 admin 10 0 17764 6152 2728 S 0.3 20.4 22:59.02 python
360 admin 9 0 17688 6160 2952 S 0.3 20.4 19:56.32 python
1 admin 8 0 260 160 160 S 0.0 0.5 0:02.04 init
2 admin 8 0 0 0 0 S 0.0 0.0 0:00.00 keventd
3 admin 19 19 0 0 0 S 0.0 0.0 2:38.02 ksoftirqd_CPU0
5 admin 9 0 0 0 0 S 0.0 0.0 0:00.00 bdflush
70 admin 9 0 0 0 0 S 0.0 0.0 0:00.02 khubd
77 admin 9 0 72 4 4 S 0.0 0.0 0:00.10 lpd
61 admin 9 0 264 192 192 S 0.0 0.6 0:00.48 httpd
66 admin 9 0 376 224 224 S 0.0 0.7 0:01.55 nas
84 admin 9 0 124 0 0 S 0.0 0.0 0:00.03 rcamdmain
89 admin 9 0 124 16 8 S 0.0 0.1 0:00.06 infosvr
90 admin 9 0 352 272 240 S 0.0 0.9 0:01.49 watchdog
4 admin 9 0 0 0 0 S 0.0 0.0 0:03.16 kswapd
und pf -axf
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
PID TTY STAT TIME COMMAND
1 ? S 0:02 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 2:38 [ksoftirqd_CPU0]
4 ? S 0:03 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
61 ? S 0:00 httpd
66 ? Ss 0:01 nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
70 ? S 0:00 [khubd]
77 ? Ss 0:00 lpd
79 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
82 ? Ss 0:00 waveservermain
84 ? Ss 0:00 rcamdmain
89 ? Ss 0:00 infosvr br0
90 ? Ss 0:01 watchdog
92 ? Ss 0:00 \_ ntp
100 ? S 0:00 dropbear
639 ? Ss 0:01 \_ dropbear
640 pts/2 Ss 0:00 \_ -sh
646 pts/2 R+ 0:00 \_ ps -axf
101 ? S 0:22 [usb-storage-0]
102 ? S 0:00 [scsi_eh_0]
121 ? S 0:00 [kjournald]
122 ? S 0:01 [kjournald]
169 ? Ss 0:00 /opt/sbin/cron
196 ? Ss 0:00 SCREEN -dmS pyload python pyLoadCore.py
202 pts/0 Ss+ 0:28 \_ python pyLoadCore.py
207 pts/0 Z+ 0:00 \_ [tesseract] <defunct>
209 pts/0 S+ 0:00 \_ python pyLoadCore.py
210 pts/0 S+ 0:00 \_ python pyLoadCore.py
211 pts/0 S+ 23:00 \_ python pyLoadCore.py
212 pts/0 S+ 22:59 \_ python pyLoadCore.py
213 pts/0 S+ 0:00 \_ python pyLoadCore.py
216 pts/0 S+ 0:00 \_ python pyLoadCore.py
204 ? SN 0:00 /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
205 ? SN 0:00 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
206 ? SN 16:47 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
214 ? SN 0:00 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
219 pts/0 S+ 0:15 python /opt/pyload/module/web/run_server.py 192.168.2.100:59000
220 pts/0 S+ 0:00 \_ python /opt/pyload/module/web/run_server.py 192.168.2.100:59000
279 ? Ss 0:00 /usr/sbin/vsftpd
303 ? S 0:00 /sbin/syslogd -m 0 -O /opt/var/log/syslog.log -S -l 7 -s 0
315 ? Ss 0:01 /opt/sbin/nmbd -D
317 ? Ss 0:00 [smbd]
343 ? S 0:00 \_ [smbd]
345 ? Ss 0:00 SCREEN -dmS pyload python pyLoadCore.py
351 pts/1 Ss+ 0:28 \_ python pyLoadCore.py
356 pts/1 Z+ 0:00 \_ [tesseract] <defunct>
359 pts/1 S+ 0:00 \_ python pyLoadCore.py
360 pts/1 S+ 19:57 \_ python pyLoadCore.py
361 pts/1 S+ 19:57 \_ python pyLoadCore.py
362 pts/1 S+ 0:00 \_ python pyLoadCore.py
353 ? SN 0:00 /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
354 ? SN 0:00 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
355 ? SN 0:19 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
358 ? SN 0:00 \_ /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
scheint also nich zu laufen ...
werd mal lighttpd ausprobieren
newbiefan
02-07-2010, 22:34
Der neuere Lighty scheint zu gehen....
Ein ipkg list_installed | grep lighttpd ergibt:
lighttpd - 1.4.26-1 - A fast webserver with minimal memory footprint.