Woodworking Project Update


bench-dreams

Not my bench but I hope it will be someday soon…

Well, It’s been a busy¬†few months so I haven’t had much time to post updates but I have some new, interesting things in the works that I wanted to share with you.

It’s been a full year since I built my first Corn Hole set. In that time, I have learned so much about basic wood working. I have had several challenges to overcome and with them some heartbreak, lots of practice of my colorful vernacular, and some surprising wins! I have built just over 60 sets which works out to:

  • over 18 sheets of plywood quartered
  • 120+ 6″ holes cut
  • 240+ rails, stiles and legs cut
  • 1680+ brad nails
  • 240+ Carriage bolts, washers, and wing-nuts
  • 4, 1/4″ rounder-over router bits
  • 3 leg hole jigs
  • 2 hole saws* 3 drills
  • 2 RO Sanders
  • 1 Belt sander
  • An obscene about of sanding disks (80, 150, 220 grit)

Since Corn Hole sets are a very basic carcass to build, I was able to experiment with different tools and techniques to improve the quality of the product and to reduce the amount of effort to build each set. I discovered that when you compromise quality for speed, you end up paying for sooner or later.

My shop motto: Slow is fast. Fast is slow, and painful, and costly, and dangerous! I learned this when I was rushing to get the roundover on a couple sets before the rain came in. I got halfway around the the first deck when the router bit shot off at 100 MPH to embed itself in a bookcase. In my hurry, I failed to tighten the bit and rather quickly, the bit went to be with Jesus. I think about that and I could have easily joined it on that trip to the heavens or, more likely, been seriously injured.

Being self-taught, I have had a couple other minor incidents but only one requiring a trip the the clinic and that was only to make sure I was up-to-date on my tetanus shot (I just said tet-anus). But I like to think that instead of just being slow, that I am being deliberate and thoughtful. Taking this approach, I have not had any more accidents and my mistakes have diminished to level that I can blame those on the wood or the tool. ūüėČ

Also, because of some personal events, I am not able to get into my shop until after my boys are asleep. This has vexed me considerably until I simply adopted a more focused, hand tool woodworking approach. More out of necessity, I have come to find a simple joy in working with wood and hand tools.

NOTE: Since my drill, impact driver, brad nailer, and circ saw don’t have a cord, they are considered hand tools ūüėČ

This change has really fired up my passion for woodworking to another level. I not getting into the holy war of power vs. hand tool woodworkers. I don’t care about all that. I have a Dewalt planer and a thumb-stealing table saw, a router, etc. Power tools are cool. I use them when I have to get stuff done. However, when I need my therapy, I can either drink a bottle of rum or wander out into my shop and do some woodworking by hand. Both satisfy my need to forget the world for a time, but the benefits from woodworking outlast the rum.

With my new-found enthusiasm for wood working, I have lined up a whole host of new projects: Here are just some of them:

  • Build an updated work bench (more Roubo-styled — ¬†see image above)
  • Build a Sawyer’s bench (Sawing by hand is a bitch without a way to hold your work) – ¬†inspired by Tom Fidgen
  • Updated Twin Screw Vise (More for joinery but this project is my white whale)
  • Make and use a Frame Saw – Resawing by hand just facinates me
  • Make and use a Bow Saw – i have seen some amazing things with these smaller saws and I want to see what I can make and make happen with them
  • Hand Planes Extraviganza! – I recently bought Scott Meaks’ DVD on making a hand plane. It’s every bit as good as attending a class and I will dive into many of the details as I plunge into these builds. Also, I’m looking into making router planes, shoulder planes, Scratch Stocks, Rabbet Planes, Kerfing Planes, Air Planes, whatever it takes to scratch the itch
  • Making Back Saws – As with many aspects of woodworking, making, sharpening, tuning and storing back saws is its own rabbit hole. I really want to explore more of this…

As you can see, building tools and appliances is really my wheelhouse since this is pretty much what I have done for the past 20 years, only with software. The tactile interaction with wood is so therapeutic for me and I appreciate every moment that I have in the shop.

Before I go, I just wanted to acknowledge a couple of people that have helped keep me motivated and inspired:

  • Shannon Rogers
  • Christopher Schwarz
  • Tom Fidgen
  • Scott Meeks
  • Marc Spagnuolo

and last by certainly not least…

  • Roy Underhill

(There are so many others and I will thank them when I get to projects especially inspired by them) 

Thank you gentlemen for providing your knowledge, insight, and perspective to this endeavor.
For those looking for more BeagleBone Black post, I hope to be working on some robotic/electronic/music -related projects with my oldest son, and anything related in that realm, I will certainly post ASAP.

Projects Update: It’s been crazy


CrazyWell, it’s been a rather crazy and chaotic few weeks.

First, I want to say thank you to everyone that has visited my blog. ¬†I don’t make money from this. ¬†I do it to share the knowledge that I accumulate. ¬†For the 2012 calendar year, I had a total of 333 hits… for the entire year! ¬†I must say that wasn’t really trying for an audience. ¬†Rather, I started blogging just to document some things that I wanted maintain in a way that I could share with others. ¬†However, in 2013, I actually gathered somewhat of a following and logged over 6000 hits, the lion share of those came after August. ¬†It is humbling and an honor to have not only so many visitors but regulars that come back and reference my posts. ¬†Thank you.

Now, I want to quickly let you know what I am working on and some of the projects I will be documenting in the near future.

  • Beaglebone Black Santa-CAM (after-magic report) – I had some issues with this but things worked out in the end
  • Beaglebone Black¬†Santa-CAM upgrade – adding motion detection on it so it will fire when there’s something happening
  • Hand-made Wood Bench Plane – I will be finishing that up soon
  • Bunk Bed Underbed Storage (IKEA Kura bunk bed hack)
  • SteamOS beta Virtual Machine Install (on Oracle Virtual Box – this is going to be a hoot!)

So, check back often because the updates will be coming fast and furious!

-Dave

Simple Santa-Cam Hack with BeagleBone Black


Merry Christmas and Happy Holidays to all! I hope this post finds you in a cheerful and festive way.

chippy

Chippy, the Christmas Elf on the Shelf

This past month, my son and I have been thinking about a way to get a picture of the elusive Santa Claus! ¬†We got the Idea from a Make! Weekend Project post. We’ve had to be extra careful because Santa has his embedded helper (spy), Chippy, ¬†watching our every move. ¬†Since Chippy has gone back to the North Pole to help Santa with his last minute preparations, Xander and I found our opportunity get this next project done. ¬†It is a simple frame capture using some inexpensive items we already had, so this didn’t cost us anything. ¬†However, if you were starting from scratch, I estimate this project would cost between $90.00 – $120.00.

Operation Polar Bear

First, here’s a list of the items we used to pull this off:

  • BeagleBone Black
  • Logitech HD C525 Webcam
  • 4-port USB Hub (as small as you can get it – I had to take the cover off mine)
  • 8GB thumb drive (for storing images)
  • Radio Shack Project Box
  • 5V Power Supply
  • Drill and various drill bits

First, I put everything together and proto-typed the build.  Once I verified everything was working as I had intended, I reached for the Project box.

Polarcam – Camera lid

I drilled one hole in the center of the lid for the camera and two holes on left-hand side of the box for power and networking (left or right makes no difference but you will want to position the BBB length-wise to make room for the USB hookup).  I turns out that my double-sided tape was used by Chippy (do you think he knows something?) so I had to improvise and use a combination of medical and painters tape to secure everything to my box.

Temp Mounting Solution

Temp Mounting Solution

Since we have very little time and this is a temporary installation, I was not very tidy with the side hole.  NOTE:  Be tidy with the side holes and give yourself plenty of space.  You will thank me later.

I then mounted the BBB, the USB hub, and the thumb drive into the box.  After one last check, I sealed it up and did a test. (See my post on mounting a USB drive HERE)

USB Hub with Camera and Thumb Drive attached

USB Hub with Camera and Thumb Drive attached

Once everything was working, it was time to fine tune the system. ¬†Here’s what I did to get the system running:

I am running Ubuntu 12.10 on my BeagleBone Black. ¬†I have mounted a 16GB thumb drive to it using my USB passive hub to “/media“. ¬†I created the folder structure under media to hold my images “/media/capture/polar-bear”.

Next I installed fswebcam.  I based my fswebcam build off a blog post HERE:

apt-get install fswebcam

To make this process work (time-lapse style), I created a configuration file and saved it in my home folder, called “polarcam.conf“, which I will explain:

device /dev/video0
input 0
loop 2
skip 10
#background
resolution 640x480
set brightness=60%
set contrast=13%
top-banner
font /usr/share/fonts/truetype/msttcorefonts/arial.ttf
title "Santa-CAM"
timestamp "%m-%d-%Y %H:%M:%S (%Z)"
jpeg 95
save /media/capture/polar-bear/polarcam-%Y%m%d-%H:%M:%S.jpg
palette MJPEG

Device: this is your webcam.  In most instances, it will be /dev/video0 unless you have other video sources plugged in.

Loop: this is the delay between frames, in seconds.  Since I figured Santa was a busy guy and would be trying to get in and out rather quickly, I set this for 2 seconds.

Skip: this is the number of frames to skip at startup.  Most camera have a short warm-up period where colors and brightness are not exact.  I set mine for 10 seconds but you can adjust for your particular device.

Background: runs the app in quiet mode if you are using it interactively. ¬†I leave this commented out until I am ready to put it into “production”

Resolution:  This is the video resolution.  A smaller image size saves space and bigger has better image quality.  Based on your needs, and storage, you will be able to modify and adjust accordingly.

Top-banner: ¬†This puts a banner at the top where you can put the name of the camera and a time stamp. ¬†I haven’t played around with this but I believe you can put this at the bottom too.

Title:  Whatever you want to call this camera.  It will be superimposed in the banner on every frame.

Timestamp:  Puts the date and time on each image as it was taken.  This can be modified.

Save:  This is the path to where I want to save my images.

I really didn’t mess with the other parameters but you can get the details on all the available parameters and add them to your config by using the “fswebcam –help” command.

To test this, I simply entered the following:

sudo fswebcam -c <path-to-config-file>/fswebcam.conf

If the background parameter is commented, then the output should look something like this:

dfrey@ubuntu-armhf:~/fswebcam$ sudo fswebcam -c polarcam.conf 

>>> Next image due: 2013-12-24 09:59:52 (EST)
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
--- Capturing frame...
Skipping 10 frames...
Capturing 1 frames...
Corrupt JPEG data: 1 extraneous bytes before marker 0xd3
Captured 11 frames in 0.34 seconds. (32 fps)
--- Processing captured image...
Putting banner at the top.
Setting font to /usr/share/fonts/truetype/msttcorefonts/arial.ttf.
Setting title "Santa-CAM".
Setting timestamp "%m-%d-%Y %H:%M:%S (%Z)".
Setting output format to JPEG, quality 95
Writing JPEG image to '/media/capture/polar-bear/polarcam-20131224-09:59:52.jpg'.
>>> Next image due: 2013-12-24 09:59:54 (EST)
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
--- Capturing frame...
Skipping 10 frames...
Capturing 1 frames...
Corrupt JPEG data: 1 extraneous bytes before marker 0xd1
Captured 11 frames in 0.34 seconds. (32 fps)
--- Processing captured image...
Putting banner at the top.
Setting font to /usr/share/fonts/truetype/msttcorefonts/arial.ttf.
Setting title "Santa-CAM".
Setting timestamp "%m-%d-%Y %H:%M:%S (%Z)".
Setting output format to JPEG, quality 95
Writing JPEG image to '/media/capture/polar-bear/polarcam-20131224-09:59:54.jpg'.
>>> Next image due: 2013-12-24 09:59:56 (EST)

… and so on until you stop it (CTRL-C). ¬†I noticed that there were a couple error messages regarding corrupt images but when I looked back at them, they looked ok, so I disregarded them.

If the “background” parameter is uncommented, you will see nothing and the app will run until the cows come home (translation: until you run out of storage space or turn off the BBB). ¬†However, you can shut it off using this command:

sudo pkill fswebcam

Automation

Now that I have the app and hardware to get the job done, I have to make a decision as to how I want to start and stop the application. ¬†I tried putting the start command in my .bashrc file and it worked but it just runs forever and that’s just not enough control for me. ¬†After talking with Xander, we decided that we needed to limit the amount of time the camera ran so we could get as many images as possible. ¬†We decided that between 11:30pm and 1:00AM would be fine b/c Santa has historically made his rounds in our town by 1:00AM (based on NOAA, NASA and NORAD data). ¬†I elected to start and stop the process with a cron job (pronounced: CRAN JAB).

Here’s my script for root:

sudo crontab -e -l root

@reboot /opt/startup.sh

00 */12 * * * ntpdate -b -s -u pool.ntp.org
30 23 * * * fswebcam -c /home/dfrey/fswebcam/polarcam.conf
00 01 * * * pkill fswebcam

The last two lines are where the magic happen.  At 11:30PM, the fswebcam process will start, using my polarcam config file.  This will run continuously until 1:00AM, where the process is killed.

Last night, I tested this a couple times. ¬†I did have some trouble with it not actually running but I think that this was because I didn’t give the BBB enough time to boot up after moving it to the target location. ¬†However, my final test was successful and I was able to capture 30 minutes of images @ 1 per 2 second intervals. ¬†Something else to note is that this camera has an IR filter on it, so it cannot use IR LEDs to illuminate dark rooms. ¬†I will have to insure that the room has adequate lighting for our “Polar Bear.” ¬†I will be upgrading this project to include and IR-ready camera and a PIR motion sensor.

Well, today is the big day. ¬†After 46 years of trying to catch that Jolly Ol’ Elf in the act, I think I finally have a solution. ¬†Check back in a couple days to see Santa in Action!

Thanks for stopping by.  Merry Christmas and a Happy New Year to all!

Workbench-Nearing Completion


03534 ATonight, I made a push to finish the workbench but things happen and I wasn’t able to put the bow on it. ¬†However, I did get a lot done.

We left off with the untrimmed legs laying on the workbench surface waiting to be mated to the tabletop. ¬†I began by assigning each leg to a corner then marking of the center of where the leg would be from the outside rail of the frame. ¬†The plan was to secure the leg to the table top with a hex bolt. I didn’t get very far when I was interrupted and had to assume other duties. ¬†While otherwise occupied (probably doing the dishes or folding laundry… some household chore), I started thinking about stability. ¬†If I only use one hex bolt, over time, that will become an axle for the legs to pivot on. ¬†Not good. ¬†I rushed to my nearest big box hardware

Where we left off

Where we left off

store and picked up four more hex bolts, eight lock-washers, and 8 locking nuts.

The next day I measured out (from my center marks) the center for each bolt. ¬†Once satisfied, I used my 1/2″ auger bit to drill out the holes. ¬†I had a little trouble with this in that my 7.2V DeWalt and 12V Ryobi cordless drills didn’t have enough juice to get the job done. ¬†I was afraid that they just didn’t have the muscle. ¬†I did as much as I could then when the batteries gave up the ghost, I switch to cutting the legs to size. ¬†Since I want the bench to be 36″ tall, I cut the legs to 34 1/2″ (tabletop is 1 1/2″ thick”). ¬†This is cake using a miter/chop saw. ¬†But it’s 11:30PM and I have children sleeping so this would have invoked an ass-beating of epic scale. ¬†Since I want my wife’s encouragement and support, I opted for the hand saw.

wb-06-outside-leg-attachmentI really haven’t used a handsaw where it counts. ¬†I’ve used them in the past to cut stuff up but not with the level of precision that I “needed” from the miter saw. ¬†I found out, like with everything, practice is important. ¬†My cuts on the leg are not square and just off. ¬†Since its on the end grain, the plane doesn’t want any part in that. ¬†I will need to use my palm sander to get this fixed. ¬†Learning is living, aye?

The next day, I had fully charged batteries and a new attitude. ¬†This bench was going down (or up?)! ¬†I finished up drilling the holes into the rails (Yay! The drills still have some life left) and then marked each leg’s bolt hole location and then drilled all the legs separately. ¬†I thought this was going to give me trouble because I can measure twice or a hundred times and still jack up a simple hole. ¬†Well, I can tell you that I did NOT this time. ¬†However, there were some minor variations in the alignment. ¬†I think this is good since it helped lock in the legs once the bolts were fastened.

Now that the legs are drilled, I began by attaching the bolt closest to the tabletop firstwb-05-ahh-nuts then moving the the upper (lower? … the table is upside down at this point) bolt. ¬†The first bolt is much easier then the second and I discovered how far my drill holes were off. ¬†I didn’t have to alter any holes but I did have to use my BF Hammer to get some of them in. ¬†Once I locked the first leg down, I pushed and pulled on it to see how stable it really was… <insert evil laugh> ¬†It was gloriously solid and whatever stability issues I might have, it won’t be due to wobbly leg joints.

wb-08-wiggle-testI proceeded to attached the other three ¬†legs and then went around and gave each bolt a final snugging up. ¬†I still have to install the braces on the legs but I wanted to see the workbench on it’s feet. ¬†I flipped it over and set it up (this was not the easiest one-man job). ¬†I was surprised at how high it was. ¬†Yup. ¬†36″ is pretty high. ¬†I also needed to see if it was going to be stable. ¬†Meh! ¬†This workbench design has a basic flaw in that it is long, narrow and tall. ¬†If I chopped 10 inches off the legs, that would probably help but that means it’s back to the crinkle-back, all hunched over my work. ¬†I want it this height. ¬†The other thought would be that I could add one or two more 2x10s and widen it. ¬†I think this would allow me to keep the height and give me more stability. ¬†Space is limited so I am going to stick with this design for now and try the leg braces. ¬†I can do my planing on the ends of the table which will prevent the tippiness. ¬†Since I attached the legs to the long rails of the frame, I can simply pull out the short rails and put in longer ones. ¬†I will have to do some serious disassembly but it’s something I could finish in an afternoon. ¬†Something to consider.

wb-10-workbench-functionalSo, I threw my shooting board on the bench and started planing a scrap piece of wood. ¬†I definitely need to work from the ends when doing planing or chisling (where permitted). ¬†It’s a little wobbly but I still haven’t attached the braces or flattened out the feet. ¬†I am planning to surface the feet with bicycle tire tread (I saw this done while making a dog sled on “How It’s Made” on the Science Channel). ¬†Once flat, the tread should give a solid non-slip surface to keep the bench from sliding. ¬†I don’t want to permanently mount the workbench to the floor.

Tomorrow night, I plan to add the leg braces then flatten and surface the feet.  If I have time, I will start planing the surface and get the MDF for top.

Oh, I almost forgot.  I had to make some alterations to the dimensions.  Here is the cut list.  Keep in mind the following:

  • 2×10 = 1 1/2″ x 9
  • 2×4 ¬† = 1 1/2″ x 3 1/2″
  • 1×4 ¬† = 3/4″ x 3 1/2″

Cut list:

  • (3) 2x10x54 (table top)
  • (2) 2x4x50 (long rails)
  • (3) 2x4x20 3/4″ (short rails and center brace)
  • (8) 2x4x34 1/2″ (legs 2 laminated together to make a 3×3 1/2 post)
  • (1) 1x4x51 1/2″ (long leg brace)
  • (2) 1x4x20 3/4″ (short leg brace)

I have also listed below, the hardware and tools I used:

  • (8) 1/2″ x 6″ Hex Bolts
  • (8) Disk Washers
  • (8) Lock Washers
  • (8) Lock Nuts
  • 1/2″ Wrench
  • 1/2″ Socket and Ratchet Wrench (long is leverage)
  • 1/2″ Auger bit
  • Tons of screws (I forget the specs… I’ll come back to those)
  • Countersink bit
  • Powerful Drill (or in my case…)
    • (2) Weak-ass Drills
  • BF Hammer
  • Swanson 12″ Combo Carpenter’s Square (these are da BOMB!)
  • Tape Measure
  • Titebond Glue
  • Sandpaper (60 and 120 grit)
  • Sharpened Pencil
  • Plenty of Diet Coke
  • Plenty of Sam Adams (for after the job)

Here is the gallery of images taken since my last post.

This slideshow requires JavaScript.

Beaglebone Black : Get More Space From Your SD Card


sandisk-micro-8While researching for my post, “Backing up your Beaglebone Black“, I came across an article that demonstrated how to expand the linux partition from the standard image size. ¬†I use an 8GB card and after flashing my sd card with the Ubuntu image, I had roughly 4GB of unused space. ¬†Since space is at a premium, I have added external USB drives to help with that but leaving 4GB on the table is just silly. ¬†So I decided to fix that today.

Even though I’m doing this on an Ubuntu instance, this should work for Angstrom instances as well. ¬†However, be forewarned that this is potentially dangerous for your file system. ¬†Make backups, double-check your work, and test this out on an install you can afford to lose before doing it on one you can’t. ¬†Warning over. ¬†Let’s get back to throwing caution to the wind.

First, let’s take a look at what we’re working with. ¬†As root, run:

fdisk -l

This will spit out a list of all the partitions on your BBB.  The one we are concerned with today is mmcblk0.

Now, using the fdisk utility, we can resize the card while in the BBB. ¬†We’re going to delete the existing partition, then create a new one, expanding its size and then wrap it all up with a bow on top.

Let’s start with:

fdisk /dev/mmcblk0

You will get a prompt:

Command (m for help):

If you’re curious, enter ‘m‘. ¬†You should be safe here, just don’t enter ‘w‘ which is write! If you’re unsure at any time, you can enter ‘q‘ to bail without committing.

Here’s the sequence to resize the card:

root@ubuntu-armhf:~# fdisk /dev/mmcblk0

Command (m for help): d
Partition number (1-4): 2

Command (m for help): n
Partition type:
 p primary (1 primary, 0 extended, 3 free)
 e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (4096-15523839, default 4096): <enter>
Using default value 4096
Last sector, +sectors or +size{K,M,G} (4096-15523839, 
default 15523839): <enter>
Using default value 15523839
Command (m for help): w

The partition table has been altered!
Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: 
Device or resource busy. The kernel still uses the old table. 
The new table will be used at the next reboot or after you run 
partprobe(8) or kpartx(8)
Syncing disks.

root@ubuntu-armhf:~#

Now, since the partition is currently in use, we won’t see any change until we reboot. Let’s do that now:

shutdown -r now

When the BBB comes back, you will have a 4GB partition in an 8GB partition. ¬†We can fix that with a utility called resize2fs. ¬†Here’s how to use it. ¬†As root run this command:

resize2fs /dev/mmcblkp2

When this command completes, reboot again and then run ‘df -h‘. ¬†Here’s what mine looks like:

dfrey@ubuntu-armhf:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 7.3G 1.4G 5.6G 20% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
devtmpfs 248M 4.0K 248M 1% /dev
none 50M 244K 50M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 248M 0 248M 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/mmcblk0p1 1004K 472K 532K 48% /boot/uboot

Personally, I think this is a better solution than the USB drive but the USB drive works for backups and supporting content like MP3s, videos etc to host on my WordPress site. Space is still at a premium but at least now I have a little more breathing room.

http://www.gigamegablog.com/2012/09/26/beaglebone-101-linux-tricks-for-backing-up-and-resizing-your-microsd-card/

Beaglebone Black : Issues with Java on Ubuntu


java-duke-logoWhile I was starting work on my next walk-through, I discovered that I had not installed Java on my Ubuntu instance. ¬†I don’t know why other than it simply didn’t come up. ¬†When I originally installed it, I did it on Angstrom and had no issue. ¬†Well, it was most certainly a different story with Ubuntu.

I downloaded the ARM version of JDK 1.7 from java.com and attempted to unpack it with this command:

tar -xvpzf jdk-7u40-linux-arm-vfp-hflt.tar.gz

Instead of a stream of files being strone across my screen, I received an error message:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I thought that I had corrupted my instance so I unpacked my latest backup. ¬†As a side note, I dug around a bit and discovered how to overwrite existing files. ¬†Here’s that command:

tar --overwrite -xvpzf bbb-ubuntu.tar.gz

This reset my BBB to my standard setup.  After attempting to unpack the Java tarball again, I received the same error.  I also unpacked the package on my host machine and then moved it over to the BBB and attempted to run Java.  It looked at me like I was daft and replied with:

-su: jdk1.7.0_25/bin/java: No such file or directory

Hmmmmm.   Time for Dr. Google.

I found the answer in teensy sized print in the middle of a StackOverflow.com answer:

sudo apt-get install libc6-*

This adds/updates a buch of files (took about 15 minutes to download and install) but it didn’t seem to be too large (about 50MB).

Once this was complete, I was able to unpack my JDK files, then from the bin directory,  I ran java -version and received:

java version "1.7.0_25"
 Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
 Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode)

Now I can get back to work

https://dotnetdavid.wordpress.com/2013/07/12/apache-karaf-on-beaglebone-black/

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

http://stackoverflow.com/questions/9081962/java-is-installed-in-listing-but-execution-produces-java-no-such-file-or-d

BeagleBone Black : WordPress On Ubuntu


wordpress

Installing LAMP and WordPress on Ubuntu Running on A BeagleBone Black

Since I have been using WordPress with a couple blogs for almost 8 years now, I am fairly comfortable with the platform. ¬†With my weekly BeagleBone Black challenges of late, I felt that installing WordPress would be a great idea to try. ¬†I can tell you that the BeagleBone Black, once again, didn’t disappoint.

Before we begin, I want to just say that running WordPress on the BBB is an academic endeavor. ¬†I wouldn’t think about hosting a public blog due to performance with this configuration but it is perfect for my needs as a teaching tool. ¬†My oldest son just turned seven and is incredibly inquisitive about science. ¬†He catches bugs, lizards, etc. and takes pictures of them. ¬†He loves astronomy and never stops asking when the sun will go supernova. ¬†I thought it would be a great for him to document his findings in a blog to teach him more about the scientific method, documenting his findings and getting more comfortable with the computer. ¬†As an added bonus, I want to see where this takes him.

Getting Started

penguin-ubuntuAs I mentioned my previous blog, I created a “snapshot” of sorts by starting off with a fresh version of Ubuntu then adding my base setup changes then finally creating the tarball of the entire OS. ¬†This way, I can simply reflash the card, restore my base install and begin on the next project. ¬†That’s what I am doing with this. ¬†This is basically my setup:

BeagleBone Black ‚Äď Installing Ubuntu ‚Äď Part¬†1

BeagleBone Black ‚Äď Installing Ubuntu ‚Äď Part¬†2

Beaglebone Black : Back Up Ubuntu

I didn’t include the wireless, cloud9, or OpenGate for this because I wasn’t sure where I was going to put WordPress and was concerned with space. ¬†Turns out, that space wasn’t an issue (other than bleeding off CPU cycles).

Once I had my base install configured, I needed to install and configure three additional components before WordPress:

  • mySQL Database
  • Apache Web Server
  • PHP Scripting Language

This comprises what is called a LAMP server (Linux Apache Mysql Php)

Installing LAMP on BeagleBone Black Ubuntu

At first, I thought this was going to be easy. ¬†I found a package in the package manager for installing LAMP and tried it out. ¬†I’m not saying it doesn’t work, but I will say that I had to reflash a couple times and it never really worked well for me. ¬†Also, I really wanted to have a little more control over what I was installing, so I ended up installing and configuring each component separately. ¬†We’re going to do that here. ¬†I based my steps off a couple walk-through guides found on Ubuntu Server Guide and ¬†DigitalOcean.com¬†(links to these and other resources will be found at the end of this walk-through).

MySQL Installation and Configuration

Real quick, before we start installing packages, let’s make sure we’re up to date with everything:

sudo apt-get update
sudo apt-get upgrade

Since we already have the Linux part of LAMP, let’s move to mySQL. You can install this with a simple command of:

sudo apt-get install mysql-server

You will be prompted to provide a password for the root account. ¬†It is always strongly advised to do so and remember this password. ¬†If you forget, you won’t be able to move forward.

Once the install is complete, we need to test the install and then create a database for our installation. ¬†Before we continue, think about the name or type of WordPress site you want to create. ¬†Since mine is to help teach my son about science, I will call mine, ‘science’. ¬†You want to keep it small and if you have more than two words, separate with underscores or dashes (‘_’ or ‘-‘).

To test your installation, type:

mysql -u root -p

You will be prompted to for the password you provided during the installation.  Once you have successfully done this, type:

show databases;

This command will list out a table of databases that are currently available.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.01 sec)

If you have made it this far, you are ready to continue.

Now we need to create a user, a table, and provide permissions. ¬†I used ‘scienceadmin‘ for the username and ‘science‘ for the database. ¬†Simply replace these with your credentials. ¬†Oh, and with these commands, don’t forget the semicolon. If you do, it’s not a big deal, just type `;` on the next line and the command will execute.

Create the Database:

create database science;

Create the user:

create user scienceadmin@localhost;

Set a password for this user:

set password for scienceadmin@localhost=password("squirrelhunter01");

Create the permissions for this user to use the database:

grant all privileges on science.* to scienceadmin@localhost identified by 'squirrelhunter01';

Finally, let’s refresh MySQL:

flush privileges;

To get out of mySQL:

exit

Installing Apache Web Server

beagleThis will be pretty straight forward.  To install the web server, you enter in:

sudo apt-get install apache2

After the install you can start it up with this command:

sudo service apache2 start

and test it in your browser:¬†“http<beaglebone IP or personalized hostname>/”

You should see the “It Works!” page.

We’re done with Apache for now.

Installing PHP

To install or update PHP, run the following command:

sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Once this is complete, let’s test it. ¬†Navigate to /var/www and create a file named, ‘test.php‘ then add the following text:

<?php
 phpinfo();
?>

Next, fire up a web browser and navigate to `http://<bbb_IP>/test.php`.

You should see a page filled with server/site/php goodness.

And we are done with the LAMP installation.  Easy right?

WordPress Install and Configuration

Now we get to the meat of this walk-through. ¬†Let’s first decide where we’re going to put our WordPress site. ¬†When you download WordPress and unpack it, you can put it in your root or in a sub-folder. ¬†You an even have several instances running at the same time in several folders. ¬†When I was working through this, I went a road less traveled by putting the site on a thumb drive and created a symlink from the web server root. ¬†This creates quite a mess (I will write up a way to do this shortly) but for the purpose of getting a wordpress site up and running, we’ll start with the easy way.

The Easy Way

At this point, I am showing 1.1 GB of free drive space. ¬†This should be more than apache_featherplenty to run WordPress right off the BBB. ¬†First let’s download the WordPress files. ¬†I can simply download the latest version to my home directory like this:

dfrey@ubuntu-armhf:~$ cd
dfrey@ubuntu-armhf:~$ wget -O wordpress.tar.gz http://wordpress.org/latest.tar.gz
...
dfrey@ubuntu-armhf:~$ tar -xvpzf wordpress.tar.gz

...

Now, we should have the WordPress site files that I can copy to any directory. ¬†Let’s try it out in the root of our web site.

sudo cp -r wordpress/* /var/www/

This just copied all the files to the root of my web server. ¬†Let’s go check it out in the browser: `http://<bbb_ip>/`

huh? ¬†We still get the same message as before. ¬†Well, this is because we need to configure a couple things. ¬†Since this is a manual installation of WordPress, we have a little more work to do but it’s easy.

In your browser, navigate to, `http://<bbb_ip>/wp-admin/`

You should see a message indicating the wp-config.ini is missing. ¬†Click the `Create a Configuration File` button and you will navigate to the setup configuration introduction page. ¬†You are going to need to have the following ready (we did most of this already so it’s no big deal). ¬†I’ll add my info from above as an example:

  1. Database name – ‘science
  2. Database username ‘scienceadmin
  3. Database password ‘squirrelhunter01
  4. Database host ‘localhost
  5. Table prefix (if you want to run more than one WordPress in a single database) – You can create whatever prefix you like. ¬†If I were going to put more than one WP site in the same database on this BBB, I would choose, ‘sci_‘, but for now we’ll go with ‘wp_

And click ‘Submit

When I ran this, The wp-config.php file couldn’t be written. ¬†Not that this is a huge problem now but it will be shortly so let’s address this issue now.

We installed Apache as root, so the folders that where created by the installer are owned by root. ¬†Apache runs under a user named www-data. ¬†We need to change the ownership of the www folder so that apache can do it’s magic. ¬†Navigate to /var then run this command:

sudo chown -R www-data:www-data www

This will change the ownership and group membership of the www folder and everything underneath it. ¬†Now we can continue. ¬†Hit your back button in the browser so you can see the configuration form again. ¬†Click submit again and you should now get the “All right Sparky…” message indicating the config file was created successfully.

Now, let’s head on to setting up the actual WordPress site. ¬† Click the “Run the Install” button. ¬†Here, you will enter the title of the site that displays on the header, ¬†the user name of the site administrator and the password for this user. ¬†Don’t worry. ¬†You didn’t miss anything, we’ll create this account inside of WordPress now. ¬†These are for the site not the database. ¬†They can be completely different or exactly the same. ¬†It’s up to you.

Site Title:     Science
Username:  scienceguy
Password:   tesla@24
Email:          scienceguy@gmail.com (just made that up)
Privacy:       (turned this off)

Now click on the ‘Install WordPress` button. ¬†The scripts will run for a while then take you to the `Success Page`. ¬†Click Login then enter your username and password. ¬†If everything was done correctly, you now have a spanky brand new WordPress site.

After installing, I still have just under 1GB of space left.  If you intend to install other things on your BBB, you might want to install other things off the board, on a thumb drive.  That walk-though will be coming in a couple days.

Oh, I forgot one thing.   You need to remove two files from your /var/www folder:

  1. index.html – this will override the WordPress pages (its why we didn’t get an error when we tried it before configuring WordPress)
  2. test.php – this has some server-specific information that a hacker could use against your BBB.

Now got to `http://<bbb_ip>/&gt;` in your browser and you will see the public version of your site.  Go WordPress Crazy and have fun.

Feel free to leave comments if you have any questions or if you found this walk-though useful.

I got so excited to post this, I forgot my link references.  Here you go:

http://codex.wordpress.org/Installing_WordPress

https://help.ubuntu.com/community/ApacheMySQLPHP

http://ubuntuserverguide.com/2012/05/how-to-install-latest-wordpress-in-ubuntu-server-12-04-lts.html

http://www.pantz.org/software/mysql/mysqlcommands.html

http://www.cyberciti.biz/faq/how-do-i-test-php-installation-with-a-phpinfo-page/

https://www.evernote.com/Home.action#st=p&n=01d839eb-0539-47a5-b341-e04b59320d66

https://www.digitalocean.com/community/articles/how-to-install-wordpress-on-ubuntu-12-04