WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TCL as micro web server ~ n00b starts here  (Read 19057 times)

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
TCL as micro web server ~ n00b starts here
« on: September 14, 2012, 12:58:59 AM »
Hi all,

Got Core loaded on a USB stick on an old thinclient with the intention of creating a micro webserver!

I now have several daunting tasks in front of me ;

* Install lighttpd
* lighttpd config
* Install ssh service
* ssh config
* Set static ip
* Make all above persisitent

So, my questiosn are;

1) Is the above possible?
2) Has anyone else done this who could throw in some quick pointers to get me started.

Right now I am going round in circles with the wiki trying to find out how to make my ip
static and survive reboots!

Thanks for your patience!
« Last Edit: September 16, 2012, 02:37:39 AM by cpcnw »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Re: TCL as micro web server ~ n00b starts here
« Reply #1 on: September 14, 2012, 05:49:22 AM »
Hi cpcnw
Here's a step by step to set up static IP:
http://forum.tinycorelinux.net/index.php/topic,13781.msg77070.html#msg77070

Offline etopeter

  • Newbie
  • *
  • Posts: 5
    • Personal Blog
Re: TCL as micro web server ~ n00b starts here
« Reply #2 on: September 14, 2012, 02:44:31 PM »
Just few days ago I wrote HowTo setup webserver using nginx. Im not allowed to post external links so I have to post it like this:
blog.matchgenius.com/tinycore-nginx-server-with-php-cgi-and-vsftpd/

I have wordpress running there and another Tiny Core box is my mysql server. Hope that helps.

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #3 on: September 14, 2012, 03:11:24 PM »
Thanks for the tips - I realise now that what I am actually managing to get booted is not the same as what should be happening when following the wiki instruction for installing to USB stick - which actually fails.

So, using UNetbootin-windows248.exe and the core iso I can get a boot but of course the wiki instructions for persistence wont work because there is no extlinux.conf etc

When creating core usb from the CD installer I get one cursor past the syslinux output and a halt.

Guess this should be a seperate post now ...

btw DSL 3.4.12 boots flawlessly but is outdated and gui ...

Offline etopeter

  • Newbie
  • *
  • Posts: 5
    • Personal Blog
Re: TCL as micro web server ~ n00b starts here
« Reply #4 on: September 14, 2012, 03:59:46 PM »
I guess this is different problem now.
Here's what works for me:
1. Windows format usb FAT32
2. Unetbootin install tiny core iso (download from website not from dropdown)
3. Boot USB
4. Inside console list for your disks and if needed setup linux partitions/swaps
5. Mount your drive /mnt/sda1 (depends on your setup)
6. Create boot dir /mnt/sda1/boot
7. Copy vnlinuz and core.gz from /mnt/sr0/boot (or whatever other device device you have there) to /mnt/sda1/boot
8. Get grub using tce-ab
9. Copy grub files to /mnt/sda1/grub
10. Create grub config /mnt/sda1/grub/menu.lst and make sure you have kernel /boot/vmlinuz and initrd /boot/core.gz
11. Install grub MBR (sudo grub -> root (hd0,0) -> setup (hd0) ( depends on your HD configuration)
12. Create /mnt/sda1/tce/mydata.tgz
13. Reboot

That would be it ... in short.
« Last Edit: September 14, 2012, 04:20:34 PM by etopeter »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL as micro web server ~ n00b starts here
« Reply #5 on: September 14, 2012, 11:17:14 PM »

So, using UNetbootin-windows248.exe and the core iso I can get a boot but of course the wiki instructions for persistence wont work because there is no extlinux.conf etc


Did you try installation with http://sourceforge.net/projects/core2usb/ ?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10963
Re: TCL as micro web server ~ n00b starts here
« Reply #6 on: September 15, 2012, 12:22:22 AM »
Quote
So, using UNetbootin-windows248.exe and the core iso I can get a boot but of course the wiki instructions for persistence wont work because there is no extlinux.conf etc

Please don't use third-party installers like Unetbootin and then expect persistence, etc to work automatically.

Either use the native installer from TC, or core2usb as linked above from Windows.


@etopeter:
You shouldn't have to do those three copies to use nginx - that would be a bug in the extension. The PHP bug we know about, but the PHP maintainer's busy and nobody else has expressed interest in updating PHP.
« Last Edit: September 15, 2012, 12:37:13 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL as micro web server ~ n00b starts here
« Reply #7 on: September 15, 2012, 12:49:32 AM »

@etopeter:
You shouldn't have to do those three copies to use nginx - that would be a bug in the extension. The PHP bug we know about, but the PHP maintainer's busy and nobody else has expressed interest in updating PHP.

I will take a look the files installed during next update; current stable is 1.2.3 Advice to rearrange files in the extension welcome.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #8 on: September 15, 2012, 05:13:09 AM »
Thanks all - will get back to it later today or tomorrow :)

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #9 on: September 15, 2012, 05:45:57 AM »

So, using UNetbootin-windows248.exe and the core iso I can get a boot but of course the wiki instructions for persistence wont work because there is no extlinux.conf etc


Did you try installation with http://sourceforge.net/projects/core2usb/ ?


When trying to run this I get ;

The application failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

But it doesnt :(


Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: TCL as micro web server ~ n00b starts here
« Reply #10 on: September 15, 2012, 05:58:30 AM »
Never seen such error :(
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #11 on: September 16, 2012, 01:39:57 AM »
@etopeter can use your method and get a working boot with grub albeit with a few kernel error messages that fly by so fast I don't get a chance to read them. But in any case, thanks ~ my usb boots and I should be happy...

But, I decided to try from Linux again and followed this tute ;

http://fragilematter.blogspot.co.uk/2010/09/installing-tiny-core-linux-on-usb-drive.html

Which went exactly to plan up until ;

extlinux -i /mnt/sdb1/boot/extlinux

where I get a segmentation fault [using puppy 5.2.8]

Not being one to give up I carried on and tried to boot in any case and now at start up get "Missing Operating System" message prior to dropping to pxe attempts  :(

Getting closer ....

OK, so install syslinux 4.03 and issuing the following command ;

Code: [Select]
syslinux --directory /mnt/sdb1/boot/syslinux --install /dev/sdb1
I get
Code: [Select]
/dev/sdb1: invalid media signature (not a FAT filesystem?)
and there was me thinking syslinux was designed for Linux partitions ...
« Last Edit: September 16, 2012, 02:11:09 AM by cpcnw »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11226
Re: TCL as micro web server ~ n00b starts here
« Reply #12 on: September 16, 2012, 06:39:42 AM »
Hi cpcnw
I think syslinux is for installing to FAT and extlinux is for installing to Linux file systems.

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #13 on: September 16, 2012, 09:07:26 AM »
Thanks - looks like it is a extlinux prob - finally got it to the same point manually as the installer does i.e. hanging at the syslinux prompt. Here is what ParkyTowers says about this thinclient;

http://www.parkytowers.me.uk/thin/DT166/Linux.shtml

Offline cpcnw

  • Newbie
  • *
  • Posts: 21
Re: TCL as micro web server ~ n00b starts here
« Reply #14 on: January 27, 2013, 03:51:29 AM »
OK its 4 months down the road and I am re-visiting tc on my thin client and the good news is I got it to boot from a CF connected to the 40 pin disc header on an adapter.

So I booted my laptop to tc+ disc and then plugged in the CF but in a USB adapter. I then installed core to the CF using /dev/sdb [I think]

This went well and completed without error - I used 'showapps noswap waitusb=5 kmap=uk' and chose hdd install and ticked for kb extensions

When  completed I shutdown laptop and removed CF then installed it in the thinclient

It boots ok with one error I cant catch but I still want to do what my original post suggests.

So, starting with persistence - how the hell do I find my disk id or device name?

Have tried fdisk -l and it just falls back to the next line?

cat /etc/fstab doesnt actually show any discs and doing fdisk on /dev/hd[a,b,c] or /dev/sd[a,b,c]
doesnt work either [no device msg]

The first thing I need is persistence and I think I need to specify where my tce= lines

Any help appreciated!
« Last Edit: January 27, 2013, 04:20:13 AM by cpcnw »