Sunday, January 8, 2012

Ubuntu Apache Dev Web Server Install


I'm investigating Yii, a PHP web framework, for some friends. We want to do a web project and they know at least some PHP. Since I don't want to do all the programming myself, PHP seems like a good option.

The first step is installing the Apache HTTP Server. While I have that self-same web server already installed on my machine as a service, I decided I wanted a development copy I could mess up and not hose my machine's install.

Going to the Apache download site, I see 2.2 is the latest stable version. I navigate to that page and find the Unix tarball to download. Once downloaded, I extract the file any old place.

Step 1 -  run 'configure' with your final install directory for Apache.
./configure --prefix=[Apache Install Dir] --enable-so
Lots of output follows. I recommend giving a full path vs. a relative path to the install directory. You can probably use either but you never know.

Step 2 - Now it's time to run 'make'.
make
Lots more output follows.

Now run 'make install'. This actually creates the server instance software in you install directory you picked in step 1.
make install
Now navigate to your Apache install directory. Since this is a development web server, we're going to change the default listing port to 8080. I do this so it won't interfere with an installed web server running on the default port of 80.
cd [Apache Install Dir]/Apache2.2/conf
Use your favorite editor, and open httpd.conf. Find the line 
Listen 80
Change it to
Listen 8080
You can substitute 8080 with any other open port. If you need to see if a port is open you can run
netstat -a
and look through the results to make sure your port isn't in use.

Now change directory to the Apache bin directory and run apachectl start. This starts your web server.

cd [Apache Install Dir]/Apache2.2/bin
./apachectl start
Now open a web browser and try
http://localhost:8080/
You should bet a message that says
It Works
If you get this pat yourself on the back and go get a cup of coffee smiling that you've successfully geeked for the day. If not, do what we professionals do, consult the all knowing Google search.

Coming up next, configuring Apache to run PHP.


Saturday, January 7, 2012

Expanding A Disk in Oracle's VirtualBox

I run Ubuntu Linux at home. I love Linux. It's fast, has a smaller footprint than other O/Ss, and it's free. The rest of the world, however, lives on MicroSoft Windows or Apple OSX. I don't mind this. I like being different and enjoy the time I don't spend on virus issues and the money I save on hardware.

Still, ever so often you need a Windows operating system. Normally I can do these small tasks using other resources, but recently I've been hit over and over again with the need to have Windows at home.

If you run Linux you have a few options. You can use Wine to run windows applications within your Linux O/S or you can use a Virtual Machine server to host a Windows O/S within your Linux system. I decided to go this route.

I was once a VMWare fan. I guess I still am but Oracle has a free product called VirtualBox that was recommended by my next door neighbor, the Linux Kernel Commando. The primary advantage to VirtualBox is its ability to access the USB port. VMWare doesn't do that, at least the free version doesn't.

VirtualBox is easy to download, install, and setup as was the Extension Pack which added the USB 2.0 support. Everything was wonderful once I had Google Chrome installed in my new Windows 7 instance. I used it rarely, but it was always there when I needed it. The only issue was when it cranked up, Windows would download the latest MicroSoft patches. I think the VM spent more time patching than running.

Then came my decision to purchase MicroSoft Office 2010. I had 20 GB allocated to my Window's VM and needed more. VirtualBox doesn't have a nice little switch to extend a disk from their console (hint: THEY SHOULD). You have to go to the command prompt and do it. The pig that is Microsoft Office needs over 40 GB to install. After futzing around, making new drives, and generally getting frustrated, I found the magic command to extend a virtual disk.

Before running this, make sure you have a good snapshot of your current VM image. I did a full clone as well just in case.  Here's a screen print of my current VirtualBox console (after the expansion). Note the happy little Snapshots(1) button in the upper right. That's where you go to make the snapshot.


The command to expand the disk to 80 GB is

VBoxManage modifyhd [virtual disk filename] --resize [size in MB]

You find the path to the file from the Storage link on the console above. You can find this and other VirtualBox commands in the Manual.

I was then able to go in and install MicroSoft Office with no problems although I wonder how much more time my little VM will spend patching itself.



Friday, January 6, 2012

Microsoft Office

I write as a hobby. What's more I also do some small office programming. I'm finally ready to throw in the towel and purchase Microsoft Office. Sadly, I have no choice.

I've use Open Office for years and I love it. It does almost everything I need for word processing, spread sheets, and presentations. But there is a last 1% that I need that I can't get from Open Office, precise formatting of Microsoft Office exports.

I consider this a sad day but I will save time and money in the end by paying the giant from Redmond his due.




Wednesday, December 14, 2011

Dyson DC25 Ball All-Floors Upright Vacuum Cleaner

Here's one I'm considering for my wife. After all, don't we all score points by purchasing them household cleaning gadgets?

Well, much like the camera from the previous post, she's dropped hints she really wants one of these. We have three dog and two cats. The Chow/Sheltie mix sheds a lot of fur during the Spring and Summer. We've considered investigating a Chow/Sheltie fur clothing line. On top of that, the Pit has big feet and drags a lot of dirt. We (meaning she) spends a lot of time cleaning the floors. We also spend a lot of money on vacuum cleaner bags

The Dyson DC25 comes highly recommended (average of 4 stars with over 500 reviews listed on Amazon) for its features and durability. It has a ball at the junction of the upright handle and vacuum head which makes for easy maneuvering. It is bagless and so we won't be out any money on bags.

Here's a list of product features from the product's web page.
  • Upright vacuum cleaner with Dyson Ball technology for smooth steering
  • Root Cyclone technology ensures no clogging or loss of suction
  • Effective for all floor types; motorized brushbar; Telescope Reach wand
  • HEPA filter; certified asthma friendly; hygienic dust bin; on-board tools
  • Measures 12-1/5 by 15-2/5 by 42-2/5 inches; 5-year parts-and-labor warranty 

My only decission now is whether to buy the standard vacuum or the version made specifically for animal-friendly homes.

Saturday, December 10, 2011

Canon Powershot SX 150

The Christmas season is upon us so I thought I would show a few of the gifts I'm considering for others.

The Canon Powershot SX 150 is a special request from my mother-in-law. She's older and likes the form factor. The camera has good reviews so it seems like a good gift for this year. The camera has a 12x optical zoom with a stabilizer that makes it a good choice for shaky hands. It also has a large 3" display which helps those with poor vision.

It is powered by AA batteries. I consider this a plus although others may want a built-in battery. You can find AAs in any store. Since my mother-in-law doesn't have a computer, charging from a USB-style connector is a drawback. On the flip side, it apparently eats low quality batteries so buyer beware. You might consider a package of rechargeables along with a charger.

Below is more information from the Amazon product page:

12x Wide-Angle Optical Zoom and 28mm lens with Optical Image Stabilizer reduces camera shake so you achieve brilliant images whether you are up close or far away. 14.1 Megapixel image sensor and Canon DIGIC 4 Image Processor delivers stunning quality images. Improved Smart AUTO intelligently selects the proper settings for the camera based on 32 predefined shooting situations. Capture breathtaking 720p HD video in stereo sound with the dedicated movie button and zoom while shooting. Intelligent IS automatically chooses from six different modes to optimize image stabilization for the shooting condition. Large 3.0-inch wide LCD enables easy viewing. Movie Digest Mode records a short video clip right before shooting a photo and then combines one day’s worth of clips into a video. AA battery power provides added convenience.

The table below details the modes of operation.

Smart AUTOThe camera automatically selects the best shooting settings for optimal quality based on subjects and environmental factors to provide point-and-shoot simplicity.
Kids & PetsReduced focusing time freezes fast-moving subjects, so you won't miss those special shots.
Portrait The camera sets a large aperture, focusing the subject and artistically blurring the background to make your subject “pop.”
Manual You have complete contrl of exposure, selecting both aperture and shutter speed manually.    
Low LightFor high quality image capture in an amazing range of dimly-lit situations.
Toy Camera EffectSimulates photos taken with "toy" or pinhole cameras, darkening the image at the edges to create a vignette effect.
Poster EffectPoster Effect combines several similar shades into one color, turning subtle gradations into eye-catching, scene-popping contrasts.
BeachBeach Get clear shots of people at a sunny beach without darkened faces.
FireworksGrab brilliant images of skyrocketing fireworks.
Aperture-Priority You set the aperture, controlling depth-of-field. The camera automatically selects the shutter speed.    
ProgramAccess advanced exposure compensation features while shooting mostly automatically.
Fisheye EffectAdd a classic photo distortion without a fisheye lens.
Shutter-priorityYou select the shutter speed to stop or blur action, and the camera finds the appropriate aperture. With slow exposure times, Canon's noise reduction system activates to ensure low image noise.
MonochromeChoose from three single-tone effects: Black-and-White, Sepia, or Blue.
Color AccentChoose to retain a single color in your image while other colors turn monochrome.
FoliageCapture brilliant shots of autumn foliage, greenery and blossoms.
LandscapeIncreases depth-of-field for sharp and sweeping landscape shots.    
Movie DigestRecords a video clip before capturing a still image and then combines one day’s worth of clips into a video.
Smart ShutterThe camera automatically takes the photo when people smile, wink, or get into frame.
Discreet ModeDisables flash, AF assist beam, and all camera sounds with one mode dial setting — so you can capture images in quiet areas.
Miniature Effect for Movies & StillsEmphasizes perspectives for a miniature effect by blurring upper and bottom portions of the image.
Super Vivid SuperVivid intensifies existing hues, saturating the scene with bright colors.
Color SwapSelect a color and replace it with a color you specify for special effects.
SnowShoot clear snow scenes without darkened subjects or an unnatural bluish tint.
iFrame MovieThe Apple® movie format, iFrame, makes it easier and quicker to import and upload videos while retaining high image quality.
Movie Record video in stereo sound. Unwanted scenes can be deleted in playback mode.
Easy Mode In Easy mode, shooting is simple and relaxed—the camera handles all the settings automatically.