CC1000 Webserver
Last updated: June 19, 2008
|
The CC1000 does not use much room.
|
Hardware
Beside the CC1000 you will need a MMC/SD card and
a kernel with the MMC driver. No other hardware needed.
Partitioning the MMC/SD card
The webserver uses a 1GB SDcard.
This space is divided in 2 partitions,
a 512MB partition with a VFAT filesystem for the web data
and a 443MB (the rest) partition with a bootable Linux EXT2 filesystem.
The Linux is not used during normal operation.
Partitioning the SD card is done with the Linux 'fdisk' program. First delete
the unneeded partions on the card and then create both new partitions.
Of course it's also possible to use only 1 partion that contains
the web data.
If you have never done this before, have a look at
this sample session
System initialization
The webserver is started from rc.sysinit on u02 (/u02/etc/rc.sysinit).
/u02/etc/rc.sysinit:
#!/bin/sh
# Config files
cp /u02/etc/config/* /ramdisk/etc
# Services
/usr/sbin/httpd -h /u02/www
# Dropbear
mkdir /ramdisk/etc/dropbear
cp /u02/etc/dropbear* /ramdisk/etc/dropbear
/usr/sbin/dropbear
- /u02/etc/config contains resolv.conf with the IP adres of the nameserver.
- HTTPD is started with the new DocumentRoot /u02/www
- The SSH hostkeys are copied to the ramdisk
- The SSH deamon is started.
Uploading the web data
The web data is copied to /u02/www with rsync from a PC running FreeBSD.
Rsync is part of the root filesystem.
Usage
This site is powered by a CC1000.