Running a Webserver on a Tonido Plug
Running a Webserver on a Tonido Plug - Installing PlugBox Linux PDF Print E-mail
Written by Administrator   
Tuesday, 16 November 2010 20:16
Article Index
Running a Webserver on a Tonido Plug
Getting Started
Installing PlugBox Linux
Installing the Apache Webserver
Installing an FTP server on a Tonido Plug
Apache and Bftp Autostart at Boot
Getting a JDK to run on a Tonido Plug
Compiling Tomcat from source on Plugbox Linux
Getting Tomcat Running After Building It
All Pages

Installing PlugBox Linux on your Tonido Plug

   On the previous page we covered how to connect to your Tonido plug using SSH with the Putty program running on your PC.   Once you are logged as root, then you can connect your USB Flash drive.   Ubuntu will automatically see the drive and mount it to /media/disk1part1.    What we are going to do is unmount it and reformat it with a Linux Filesystem.  Then we will download an OS image  from plugapps.com and unpack it onto the newly formated drive.   
 
  The steps I did to accomplish this are on the PlugApps: Getting Started: Tonido web page
 
 
After the Tonido plug has booted with no flash drive inserted, log in as root using Putty on your PC. Then plug in the flash drive that you want to install Plugbox Linux on.
 
 
(The following steps were taken from the PlugApps Tonido Tutorial
 
cd /
/etc/init.d/samba stop
umount /media/disk1part1
mkfs.ext2 /dev/sda1
mount /dev/sda1 /media/disk1part1
cd /media/disk1part1
wget
http://plugapps.com/os/1.1/Plugbox-Linux-1.1-rootfs.tar.gz
tar xzvf Plugbox-Linux-1.1-rootfs.tar.gz # This will take a long time
rm Plugbox-Linux-1.1-rootfs.tar.gz
initctl emit tstop
cp -dprv /root/app/tonido /media/disk1part1/usr/local/
cp -dprv /lib/libssl* /media/disk1part1/usr/local/tonido/
cp -dprv /lib/libcrypt* /media/disk1part1/usr/local/tonido/
cp -dprv /usr/lib/libjpeg* /media/disk1part1/usr/lib/
cp -dprv /usr/lib/libpng* /media/disk1part1/usr/lib/
cd /
umount /media/disk1part1
reboot
 
 Actually, the part which took the longest time for me was the umount command.   I think that the Patriot Drive actually has a large RAM cache on it.   So after the data was all written to the USB Flash drive from Ubuntu's point of view, the flash drive was still writing cached data to the permanent storage internally.   So if you have a flash drive which seems to be taking forever to unmount, don't assume it crashed or hung if the unmount seems to take a long time.
 
 Instead of typing in all these commands, I actually created a script.   I just typed
 
vi kevin_plugbox.sh
 
 Then I pressed ‘i’ to go into insert mode.  Then I copied the above commands into the windows clipboard on the PC, then I right-clicked in my putty window.   That dumped the commands into the file.  Then escape and shift-zz to save and exit.  Then I did a chmod +x kevin_plugbox.sh to make it so I could run my script.
Most people don't the VI editor, but the Ubuntu also has nano
 
   After you type that last command 'reboot', the Tonido plug should reboot.   Your Putty connection will be terminated, so after it reboots you will have to connect again.   However, when you return,  the Tonido plug will hopefully be running PlugBox linux instead of Ubuntu.   
 
   The first sign that it successfully booted the new image will be that Putty gets all worked up about the SSH credentials.    You will get a warning box that this device seems to be a different machine than last time.   You can clear Putty's stored certificate information to avoid this warning by running Putty with the command line option -cleanup
 
  The second sign that it worked is that the root password has now changed.   Instead of 'nosoup4u', the password will now be 'root'.
 
 Plugbox Linux Root Login
 
    Now that Plugbox Linux is running, the pacman package installer can be used to install all kinds of open source software which has been precompiled for the Arm processor.  On the next page we'll be updating and installing the Apache webserver.
 
 
 



Last Updated on Wednesday, 01 December 2010 14:06
 

Sponsored Links

Bold Inventions, Powered by Joomla!; Joomla templates by SG web hosting