Linux Mint: Debian’s Favorite Grandchild

Linux Mint (Gloria release), at the time of writing via distro watch, has arguably become Debian’s favorite grandchild.  I can’t say that I use it, but I do recommend it.  I just installed it for a friend of mine.  I’ve installed it before and evaluated it, but I liked Ubuntu’s package manager better.  Just a personal preference, just like my preference towards Ubuntu’s desktop.

That being said, I will tell you what I do like about Linux Mint and why I recommend it to Windows’ converts.  Aside from its price tag (free as in speech, of course), its desktop interface is super easy to use.  Those who are familiar with modern desktops should be more comfortable with the environment.  It combines ease of use with a lightweight feel, free of heavy widgets, and any subsidizing promotional applications distributed with certain versions.

For common tasks, application management and organization seem to be more straight forward than Ubuntu.  The desktop seems “friendlier” as well,  with a hint of familiarity.  While virtual desktops is not inherently obvious, it is easy to invoke.  With one of my favorite key strokes, alt-ctrl left or right arrow, I can switch pretty easily from one desktop to another.   Compiz looks great on it, but didn’t install it for my friend.

There are other things that make Linux Mint pretty cool.  Like the integration of media codecs right out of the box.  Or the installation interface, which is based on Ubuntu’s installation interface but can be easier to use.  In conclusion, I still probably won’t use it personally, but I would recommend it to converts looking for a better experience than Windows.

References:

Test Driven Development and Project Euler Series: Palindrome Divisible by Three Numbers

Disclaimer: I will NOT disclose what the answers are to these problems.  The intent is that the testing is just as important, and in most cases, more than the answer.  If you want to know what the answer is without solving the problem, a simple google search will tell you what it is.

Background:

  • If you are not familiar with the series, please read this.
  • This is Java driven as well as JUnit 4.
  • You are familiar with TDD tenants.

References:

Problem:

“A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.

Find the largest palindrome made from the product of two 3-digit numbers.”

Difficulty: Easy

The Test File:

  • Please download it here.

Explanation:

A brute force approach would be to go from 10,000 to 998,001 and evaluating each number for the two criterea:

  • Is this number a Palindrome?
  • Is this number a product of two three digit numbers?

Not being a mathematician, I kind of liked a brute force idea, but I tweaked it a bit.  Instead of an incremental approach from min to max, I decided to use a decremental approach.  I suspected that the answer should be in the 900,000′s.  I only have to traverse through, at most, 100,000 integers.

For determining the divisibility, I was also going to take a brute force approach as well, but I was going to make an assumption.  That is, I’m going to guess that both products will be between 800-999.  So the determination will be a decremental loop starting from 999.  If the palindrome is evenly divisible by that number, I would divide the palindrome with that number, and check if the product is less than 1000.  So it goes like this:

  • Start from 998,001 and decrement by one in a loop.
  • Is the number a palindrome?
  • If so, is it divisible by a number in a decremental range starting from 999, and ending in 800.
  • If so, is the product of the palindrome and that number less than 1000?
  • Good.  Print the number, or print the number and exit.

The hardest thing about this problem then was then evaluating whether or not a given number is a palindrome or not.  I know what a palindrome is, but I never implemented an algorithm that evaluated a palindrome.  With strings, it’s slightly easier because you can easily compare first and last characters in Java and then strip them.  You have charAt at your disposal, substring and many implementations of strip (first and last chars).

With numbers how do you do that?  I didn’t know, so I had to write it out on paper.  After that, it was fairly straight forward.  I had to write an algorithm that compared the first and last digits of the number using modulo based on ten and divisors based on 10.  Then I had to write an extractor that stripped out the left and right most digits.

Stop if the stripped digit is either single or double digits.  If it gets down to single digits, the number is a palindrome.  i.e.: 151 is a palindrome because the first and last digits are equal and the remainder is 5.  This works for all three digit (or odd) digit numbers.

Stop if the stripped remainder is two digits.  If the number is a palindrome (22, 33, etc) return true.  Else return false.

Implementation Details:

Methods shouldTestGetLeftMostNumber, and shouldTestGetRightMostNumber were my first two test methods.  It was easy to implement (10 based divisors retrieved left most numbers, modulo retrieved right most numbers).  I started with one test first, for example:

  • Given the number 5, I expect that left most number is 5.  Assert that 5 is expected against the actual, 5.

Then the tests followed…

  • Given the number 61, I expect that the left most number is 6.  Assert that expected and actual are equal.
  • You can do tests for any random 3, 4, 5 and 6 digit numbers.

Getting the right most number was similar and just as trivial.  Example:

  • Given a number 462, I expect that the right most number is 2.  Assert!
  • I didn’t do negative cases because I used random numbers.

So a palindrome checker is fun to implement.

  • Are the two numbers  on the ends equal?  If not, stop and return false;
  • If so return the center.
  • Stop and return true if the remainder is single digit.
  • Stop and return false if the remainder is double digit but not a palindrome.
  • Stop and return true if the remainder is double digit and is a palindrome (22, 33,  44, etc).

That’s it!!!  Now, how you implement your methods are totally up to you.  You can use recursion for the palindrome checker, but I didn’t.  I used iterative approaches for speed (although, unlike the Fibonacci problem, recursion shouldn’t pose to much of a performance hit).

Divisibility by three digits is easy as well.  It’s trivial so I need not write out the implementation.  Just guess that the range is between 999-800, decremented.

Java/Ubuntu/JBoss/Oracle XE Part II: Installation

This is the second installment of part I of the previous blog.  It will deal with the implementation portion.  If you have not already done so, please read the previous post.

Background:

This stack is a great choice for corporate environments or for someone who wants to learn Oracle and the full J2EE stack.  Make sure that your Ubuntu Server is the 32 bit version.

Quick Downloads:

Install the JDK:

You have two choices for your jdk.  There’s an open source JDK, aptly named OpenJDK, a free-as-in-speech version of the jdk.  Most mid to large projects use the free-as-in-beer version.  Plus with Sun being pwned (sic) by Oracle, it makes sense.  That’s what I recommend for this exercise.  You can install Sun’s JDK via the command line, but I don’t like that route.  I only install the JDK via the command line if it’s the OpenJDK version.

  • Download the JDK here.  DO NOT CHOOSE any of the bundles.
  • Do choose Java SE Development Kit (pick the latest update).
  • Pick the Linux distribution (32 bit version).
  • It will be a .bin file and is an executable.
  • Run it from the command line.  You’ll have to agree to an SLA.  The result will be a folder.
  • Rename the folder to java.
  • Move the folder to your /opt folder.
  • Alter your .bash_profile, .bashrc or /etc/bash.bashrc file to include the following:
  • JAVA_HOME=/opt/java
  • PATH=$PATH:$JAVA_HOME/bin

Install JBoss:

  • Make sure you have unzip installed.  If not, type:   sudo apt-get install unzip.
  • Download JBoss here or from the sourceforge site.
  • It’s going to be a zip file.  Unzip it.  It will extract as a folder.
  • Rename the folder to jboss.
  • Move the jboss folder to /opt.

Install Oracle XE:

Refer to my previous blog on installing Oracle XE on Ubuntu Server (Jaunty), 32 bit version.

Conclusion:

There you have it.  A full implementation of the JBoss/Oracle XE stack.  Stay tuned for an implementation of Weblogic/Oracle XE stack.

References:

Oracle XE installation on Ubuntu Jaunty

These are my notes from installing Oracle Express Edition on my Ubuntu Server (Jaunty).  I am writing this partly because I will write a sequel to my other blog based on a Java/Ubuntu/JBoss/Oracle XE environment.  This sequel will be way too long if I include this in the same blog.  So here it is as a separate entry.

Background:

For your smaller projects, the Oracle database, even the Express Edition, probably isn’t your best choice.  Why?  Well, for one, Oracle is a beast.  Volumes of books have been written on the administrative portion alone.  The hardware requirements are pretty thick (Express Edition recommends half a gig of RAM, but I say at least a Gig, 1 will give your server more flexibility). Although queries are fairly easy to write (and I like the Oracle syntax over ANSII), writing packages and stored procs can be daunting.

Another thing you want to take seriously are the hardware requirements itself.  I wanted to install it in a 64 bit OS with OXE 32 bit binaries.  The 10g version does not support this.  Why?  Because Oracle does not want you to use this edition for production purposes.  It enforces this by limiting you to single core, 1 Gig of RAM and 4 Gigs of data.  I can see where they are coming from, but I think it’s kind of silly.

Lastly, I found this out the hard way, you’ll need a desk top so that you can finish the rest of the configuration.  I installed this on a 64 bit virtualized server host, so I didn’t want to use more memory than needed.  After hours of google-fu, I ended up deleting the host, reinstalling Ubuntu Server (Jaunty) as a 32 bit edition, upgraded to 2 gigs of RAM, with xfce as the desktop.  I lowered the number of processors to 1 since I didn’t need more due to Oracle XE’s 1 core limitiation.

Requirements:

  • Single core machine
  • Max of 1 Gig of RAM, but you can have more.  Oracle won’t use it.
  • 32 bit version of Ubuntu Server Edition
  • Comfortability with command line based terminal
  • root access

Installation:

So the installation process is pretty straight forward.  The notes below represents basically the documentation.  So I’ll make this as concise as possible.  For a more in depth documentation, please click here.

  • Download the Express Edition here.  You may have to sign up for a user account.
  • Choose the Western European character set.  For Ubuntu downloads, choose oracle-xe_10.2.0.1-1.0_i386.deb.
  • su as root.  If you don’t know how to do that, click here.
  • Go to the folder in which you downloaded the binary.  Type:
  • dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb
  • Configure by typing:
  • /etc/init.d/oracle-xe configure
  • Go with defaults for http port, the listener and auto start
  • Pick a strong password (chars, CAPS, nums).  REMEMBER THIS PASSWORD!!!

Set your env vars:

  • in your terminal,  do the following:
  • type:   cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
  • make sure you have permission to execute  scripts on file oracle_env.sh
  • type:   ./oracle_env.sh

Alter bash.bashrc or .bash_profile or .bashrc to set your env automatically.  I prefer editing the bash.bashrc because I like my environments initialized at start up.

  • append to end of file with vi or nano:   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

OK, so hopefully you installed Oracle XE on Ubuntu Server (instead of Desktop).  So you’ll need a desktop.  In your terminal, type the following:

  • sudo apt-get update
  • sudo apt-get install xubuntu-desktop
  • you may have to restart

A couple useful commands:

  • start:   /etc/init.d/oracle-xe start
  • stop:   /etc/init.d/oracle-xe stop

Make sure that OXE is started.  If not, type the start command in your terminal above.

On your desktop, pull up your favorite browser.  In the address bar, type:

  • http://localhost:8080/apex

You’ll have to login with your SYS or SYSTEM username and the password you defined above.

You’ll have to go to Administration–>Manage HTTP Access.  Choose:

  • Available from local server and remote clients
  • Click Apply Changes

Now you can do CRUD actions and write queries from remote computers.

You’re basically done.  You can install the oracle client, found here.  If you like TOAD (Windows), you can get it here.

References:

Firefox Tip #3: GSpace

Problem: You would like a free, 2 Gig drive managed by the internet.

Solution: Use GSpace Firefox Addon

This is for sure, the coolest addon.  So google published their services for gmail.  The result?  Firefox GSpace addon.  It’s a Firefox addon that manages your google space.  Do yourself a favor and download this now!

References:

  • https://addons.mozilla.org/en-US/firefox/addon/1593

Clouds Within Clouds, Part I

Buzzwords, gotta love ‘em.  So the hottest buzzwords right now include cloud (grid) computing, web 2.0, SaaS, semantic web, the list goes on and on.  The buzzword this blog deals with incorporates virtual desktop on a virtual host, which I call clouds within clouds.  For background on virtualization, please read this blog.

Background:

I’m going to assume you know what cloud computing and virtualization is.  If you do not, please read this blog.  So with the help of web 2.0 technologies (javascript libraries, ajax, adobe air/flex, RIA pluggins), coupled with virtual servers (vmware server, Virtual Box), Desktop as a Service is now possible as a thin client, driven by your browser.  For the past decade or so, we’ve had vpn, and in the past couple of years, we’ve managed to defer a vpn server within the clouds.

The problem (and not necessarily a big problem), is that vpn desktops tend to be a little on the thick side and require LAN like speeds.  This includes Microsoft’s Citrix implementation as well as Linux strains of vpn.  Now we have two relatively lightweight Desktops that’s 100% served by virtual hosts, yet runs on your browser as if it were a web page (assuming you have a modern browser like Firefox).  The implications are unknown but I believe that the influence in the Enterprise 2.0 arena and collaboration will depend upon light weight, open source, browser based desktops.

All Eyes with Ulteo:

There are multiple browser desktops but I will focus on two.  Both are not google’s Chrome OS because Chrome OS seemed to be “geared” towards mobile and netbook market, where as I’m focusing on virtual desktops geared more towards laptop to desktop environments.  The two technologies in question are Ulteo and eyeOS.  Ulteo is created by Gael Duval who also created Mandriva Linux.  Ulteo is one of the more complex virtual desktops and is based off of Debian/Ubuntu.  The cool thing is that it can be deployed off of Microsoft servers which implies organizations can Ubuntu instances under their current infrastructure without adding any non-Windows servers.  For the purpose of this blog, I used a LAMP stack to implement the Ulteo environment.  Of the two virtual desktops, Ulteo is more for desktops but may be light enough for laptops.

EyeOS is a very light weight virtual desktop that’s totally a PHP application.  The back end I used is MySQL and is therefore, LAMP driven.  Unlike Ulteo, it is Linux agnostic (or OS agnostic for that matter) and does not retain any Linux modules or libraries.  It can be light enough for netbooks but can still be robust for your desktop needs.  For the purpose of this blog, I’ve tested with a dual core AMD laptop with 2 gigs of ram and my AMD quad core desktop with 8 gigs of ram.

The Technology:

What’s great about the tech stack for both virtual desktops is that both are driven by the LAMP stack on the server side.  EyeOS, on the client side, needs javascript enabled as it depends on technologies like ajax and json to interact with the server.  Ulteo is thicker, as does require a Java Virtual Machine (JDK 5/6) installed in the browser.  Not only does a jvm need to be installed, but the hardware and network requirements are fairly heavy.  Heavy as in dual or quad core CPU with a minimum of  a gig of RAM.

The Installation Process:

Both the installation instructions are included under the references below.  Of the two, eyeOS was the easiest, by far.  It required a 3.6 MB tar ball download, an extraction to my php folder, a change to the database and we are in business.  Ulteo wasn’t complicated, but was time consuming.  First, the host I initially installed it on was a 64 bit instance of Ubuntu Jaunty (9.04).  I quickly found out the install binaries are 32 bit.  I could have downloaded a generic, Linux independent version of the binaries, extract, make and configured the application but I didn’t want to.  I went down the path of including the package references in my sources.list file and work with aptitude package manager via the command line.  Once I rebuilt my host with a 32 bit version of Ubuntu (Jaunty 9.04), the installation process was self explanatory.  The longest part of the installation process were the downloads for the session manager and session manager administration modules (roughly a gig total once it was said and done).

Configuration:

Configuration was easy for both Ulteo and EyeOS.  I spent less than half an hour going through various settings for each and found that the process was intuitive.  Ulteo was slightly more complicated because you have an option of installing both the administrative module and the desktop engine on different servers.

Performance:

I evaluated both Ulteo and EyeOS on wireless and LAN environments.  My wireless setup is Wireless-N end to end on the desktop.  On the laptop, the wireless setup is Wireless-N on the broadcasting portion and receives at Wireless-G.  The LAN is a gigabit environment.  That said, the wireless on EyeOS was blazing fast.  That’s totally different from Ulteo.  Ulteo’s wireless requirement, unfortunately, does not include wireless.  At least at my speeds (which isn’t too shabby by today’s standards).  My LAN handled the Ulteo interface rather well, but the wireless issue is near deal killer on the netbook/laptop side, especially with the Wireless-G card I have in my laptop.

Features:

The features for both are extensive.  Both can browse the internet, create documents and launch apps.  EyeOS’s applications are more like widgets, but this isn’t a bad thing.  The widgets are fast and effective (and pretty).  Ulteo resembles launching true applications.  In fact, Ulteo utilizes xfce desktop found in XUbuntu.  It installs (default out of the box) Open Office, Adobe Reader and even Gimp, which all renders well provided you are wired to a LAN line.  Both can install new apps rather easily.  The only thing I really wished I could do is open a terminal and type cool commands like chmod (at least on Ulteo).

Conclusion:

The future of Enterprise level collaboration depends highly on this type of technology.  Don’t be surprised if people start to update their tweets or facebook statuses via virtual desktops.  I wouldn’t be surprised if social networking and collaboration sites are virtual desktops.  It’s a new paradigm on applications and traditional web pages blending into a collaborative desktop like interface.  It certainly has its use in Enterprise 2.0 like applications and I’m excited to see how.

References:

  • http://wiki.eyeos.org/Install_EyeOS
  • http://www.ulteo.com/home/ovdi/openvirtualdesktop/documentation/installation?autolang=en
  • http://en.wikipedia.org/wiki/Cloud_computing
  • http://en.wikipedia.org/wiki/Ulteo
  • http://en.wikipedia.org/wiki/EyeOS
  • http://news.cnet.com/8301-17939_109-10281744-2.html

Windows 7: Will It Be Worth It?

At the time of writing, the scheduled release date for Microsoft’s Window’s 7 is October 22, 2009.  Are you excited?  Probably not.  Why?  Is it because of the YEARS of sloppy user interface and unreliable/prolonged release cycles?  Is it because of banal and antiquated features that other OS’s have implemented years ago?  Is it because of the extremely high hardware requirements of the OS itself?  Or is it Microsoft’s silly pricing model for various “versions” of the OS?  If this is an SAT question, the correct answer is: ALL OF THE ABOVE.

Windows Core:

This version of Windows will be fundamentally better than the previous versions.  How?  Because both Vista and XP are just so awful that almost any change to the kernel will be better than what we currently have today.  That being said, I am excited to see how Windows 7 will implement programming for multi-core processors.  For modern hardware architectures, this should be a “Win” for Windows.  I can’t tell you how frustrating it is to see cpu cycles being wasted when running the simplest of applications.

Security:

The good news is that Windows security policies can be better set.  Currently, under the Vista regime, it’s an all or nothing approach.  Instead, the new User Account Control (UAC) will be driven by a slide bar.  The parent of this new UAC will be the Action Center, replacing the Security Center, so the user will have better control of what should be reported to the user.

The bad news is that Windows is still behind the *nix security policies.  Unix is designed on security foremost and will always consider it top priority, Linux follows suit.  For example, I am an Ubuntu user (bandwagon, I admit, but I’ve been using Suse prior to Ubuntu).  Ubuntu does server security things right.  For instance, the root user is disabled by default.  Some find this annoying, I think it’s great.  For actions which require admin level authentication at both the GUI and shell level, it prompts the user for credentials.  At the command line level, the user has to type ‘sudo’ for every admin level action, even to be considered to be authenticated.  When I’m performing heavy admin tasks, I simply su into root.  I usually close the shell and it’s back to my protected user again.

To protect against the six (yes, six) known viruses for linux, I install ClamAV for good measure.  It’s free, it’s unobstrusive and it works great.  Most virus (if not all) in the Linux world is actually a Windows virus embedded in a Linux email.  Couple this with Firefox extensions and security best practices, my Ubuntu box isn’t worth being hacked into.  Some of these best practices include using strong passwords, only using ssh (w. root login disabled), increasing the delay time for bad logins, keeping ports locked unless you absolutely need them open, implementing rootkit protection practices, etc.

The Desktop:

The new Windows Desktop looks pretty good.  It has a modern look about it while still retaining that lovable “square” like feel.  Windows 7 will have a better task bar.  It has a auto snap feature for comparing documents.  It will also implement touch and hand writing recognition.  Sounds cool but at the same time, kind of useless.

For my Ubuntu desktop, I installed Compiz.  This allows a sweet, rich desktop experience.  The coolest, by far is desktop cube.  You can have multiple desktops represented by a cube.  This cube rotates to a different desktop via a mouse (scroll up/down on desktop), keyboard mouse gesture combo (alt-ctrl-left mouse button) or just the keyboard (alt-ctrl-left or right).  If you want to switch it up, you can traverse desktops via the flat desktop features, where keyboard strokes (alt-ctrl-down, then left or right) give it a “film” like effect.  These features are just the tip of the ice berg.

Hardware Requirements:

The minimum hardware requirements for Windows 7 is 2 Gig for the 64 bit version.  This is where Windows 7 truly loses.  My quad core, 8 Gig Vista desktop sits idle at 3+ Gigs, granted I do have apps running in my task bar.  This is silly.  What’s more silly is that the OS installation requires 20 Gigs.  Compare these hardware requirements with that of Ubuntu, or even XUbuntu at the 64 bit level.  XUbuntu requires 256 MB or RAM and 1.5 Gigs of HD space. Ridiculous.

Price Point:

I’m not going to lecture you, the reader, of Linux’s perfect price point (it’s free).  I will purchase a copy of Windows 7, but I have to agree that the migration path matrix is confusing (six editions, 2 architectures).  Some editions do not have a migration path.  A fresh install is the only way to upgrade.  Still, is the new operating system worth it?  For Home Premium Edition, yes (about $119 upgrade).  I tend to suppliment software with free open source applications like VLC and Firefox.  I love Open Office (OOo), FileZilla, 7zip, among others.

Conclusion:

The Windows 7 OS gets my recommendation but only one edition, which is the Home Premium Edition of Windows 7.  In my household, Microsoft has lost the battle.  I keep one desktop around for games and software not available for Linux (like printer drivers).  For those who do not play games or need the latest wi-fi adapters (or can find wi-fi alternatives like access point / router combo), I recommend either Ubuntu or openSuse at the desktop level, Ubuntu Server or CentOS for light web servers, or CentOS or RHEL for heavy load production servers which may require support.

References:

  • http://en.wikipedia.org/wiki/Windows_7
  • http://www.microsoft.com/windows/windows-7/
  • http://news.cnet.com/8301-10789_3-10078931-57.html
  • http://www.compiz-fusion.org/
  • http://blogs.zdnet.com/Bott/?p=1246

On Virtualization

So we’re finally to the point in technology where virtualization is mainstream. I’m going to suggest that most of you reading this blog knows what virtualization is. For those who do not, click on this.  I first came in contact with vmware back at a project in 2003/2004.  The development manager set up a virtual server to host our production application servers for this one java based webapp.  At the time, the notion of virtualization was pretty cool but the hardware requirements and the cost of the product didn’t exactly appeal to my price point.

Now, virtualization is cheap.  As in dirt cheap.  The options are great on the host, guest and hardware requirement side.  On the host software, administrators have the choice among VMWare’s vmware server, Sun’s Virtual Box and xen.  Of these three, the hypervisors I’ve evaluated were vmware server and VirtualBox.  Both have their strength and weaknesses.  Both are production ready as well as mature.  Most importantly, both are free (some versions of the respective product are free as in speech).

Rather than buying one server, for every tech stack I want to deploy, experiment with, develop on, why not utilize one server to host multiple apps.  Sure, you can download JBoss or Apache Tomcat (in the Java world) and host multiple applications in one server that way, but why not utilize one server to separate or host your apps at the server level?  Well that’s what I did and the notes below are from my experience with the configuration of both Sun’s Virtual Box and VMWare Server.  I did not experiment with Xen’s hypervisor.

Sun’s Virtual Box

The first hypervisor I experimented with was Sun’s Virtual Box.  The official documentation and the third party documentation was pretty good.  I was able to read it over just once and install it on one of my Ubuntu desktops and set up two guests rather easily.  The networking was probably the most time consuming (google kung fu resolved my issues in a timely manner).  What I liked most about Virtual Box was its interface on the desktop.   Configuration was also breazy.  I liked the option to create an expanding storage device or create one big allocation at once.  What I wanted to do was install it on a server without a desktop.  I think I will do that in the future.

VMWare Server

A couple weeks later, I bought a server off of desktop components.  It was an AMD, Phenom II quadcore with 1 TB or storage and 8 gigs or RAM.  I added it to my network using basic network configuration and installed proceeded to install the the host remotely.  The experience was slightly more challenging than Sun’s Virtual Box, but it was worth it.  The host didn’t have a desktop so all the installation was done via the command line.

Right away, I was able to access the web interface via port 8222 on the host (which redirected me to an https port on 8333).  This web interface (which didn’t work well on Opera 9, but works great on Firefox 3) allowed me to create hosts rather easily.  You can edit/delete hosts equally as easy via this web interface.  The only thing I have to check out is the number of process it allocates to a host.  On my quad core, I can assign only 2 processors per host.  Is this correct with the version of vmware server I downloaded?  I made sure that virtualization in my bios is set correctly.  I’ll have to go through the documentation again and verify.

On the administration front, the web interface seemed sufficient.  I installed the vmware addon for Firefox and it allowed me to create a link on my desktop that is a front end to a specific host.  I installed a host as a desktop and this addon seemed more than sufficient as well as responsive.  The desktops that I tested were gnome and xfce on Ubuntu.  At the time of writing, I have a six guests in this host.  2 lamp stacks, 2 java stacks (one is tomcat6 and the other is used for the Alfresco CRM), 1 is my desktop and the last is my Oracle XE server.

My only complaint is that sometimes I have to restart the server.  This is because the web interface sometimes doesn’t work.  I haven’t explored the solution but an acceptable (at the development level) work around is just to restart the server.

Virtual Appliances

My next evaluation will be how virtual appliances work on both the Virtual Box and VMWare Server host.  There are a ton of virtual appliance sites out there, included in the references below.  I think it would be cool to have these virtual appliances as guests “templates”.  Stay tuned for the review or recipe on virtual appliances.  I’ll you through how to create and configure a virtual appliance in the context of server administration.

References:

  • http://en.wikipedia.org/wiki/Virtualization
  • http://www.vmware.com/products/server/
  • http://www.virtualbox.org/
  • http://en.wikipedia.org/wiki/Virtual_appliance
  • http://www.vmware.com/appliances/directory/
  • http://virtualappliances.net/

Ubuntu Jaunty Lamp Recipe using tasksel

These are my notes for installing the lamp stack on Ubuntu server, Jaunty.

Ingredients:

  • 64 bit AMD phenom II quad core machine
  • Ubuntu v. 9.04 (Jaunty Jackalope)
  • ability to invoke the tasksel application via the command line

1. Set up your environment:
This will update/upgrade your environment w. the latest libraries, restart server if prompted

  • sudo apt-get update
  • sudo apt-get upgrade

2. Use tasksel to install the stack
Note: tasksel is probably the easiest way to install the stack, in the future, I may publish an a la carte version of this recipe

  • sudo tasksel install lamp-server
  • tasksel will make you choose a password

3. Configure the extensions dir

  • find the mysql.so file (I did it via cd / then sudo find | grep mysql.so)
  • write this folder down
  • sudo vi /etc/php5/apache2/php.ini
  • look for the extension_dir and put the location of the mysql.so file there

4. Configure my.cnf

  • change line: bind-address = localhost
  • to: bind-address = whatever_your_ip_address_is

5. Install phpmyadmin (optional)
Note: phpmyadmin is a useful tool for configuring/debugging your lamp stack. I don’t use it personally, but a lot of developers do.

  • sudo apt-get install phpmyadmin
  • phpmyadmin will make you choose a password

6. Test phpmyadmin

  • goto: http://WHAT_EVER_YOUR_SERVER_NAME_IS/phpmyadmin

7. Changes to the DocumentRoot (optional)

  • Find the line that is DocumentRoot, it should be defaulted to /var/www.  Change it whatever you want.  The DocumentRoot setting can be found below:
  • sudo pico /etc/apache2/sites-available/default

That’s all there’s really to it.  My next revision to this recipe will include finding the index.html/index.php and modifying it to complete the installation.

References:

  • https://help.ubuntu.com/community/ApacheMySQLPHP#Installing%20Apache%202

Abandon Xampp

So I’m a java developer who has seen the php light.  All excited, I created a virtual Ubuntu server (9.10 Juanty) dedicated to the linux, apache, php and mysql stack.  With minimal research, I downloaded xampp and installed it on my new Ubuntu server.  With minimal efforts and problems, I was ready for a “hello world” page.

However, as I did more research, I noticed that the xammp installation page mentioned that the initial configuration of xampp is “not meant for production, but only for developers in a development environment.”  Then it lists certain items that pose security concerns.  All of these concerns are easy to fix.

This is when I realized that if I were going to enable additional configuration for xampp security, I might as well build a true lamp environment, free from the security liberations of xampp.  The configuration wasn’t too bad.  Essentially, the installation calls for the correct packages, changes to the my.cnf and apache.conf files, validation of php-apache integration, a couple mysql admin commands and we’re set up for business.

Why I like this setup better is because apache and mysql is configured to most admin standards.  For instance, restarting both mysql and apache is done via  /etc/init.d instead of having to go through /opt/xammp and traverse through shell scripts that’s essentially doing the same thing.  I think that the migration path of any portion of the stack can be done more cleanly via  an la carte method where you can control the dependencies better via your package manager (synaptic is usually good about telling me when there’s a conflict in packages, if I have to go to a lower level, I can use dpkg if I’m uncertain about dependencies).  I’m sure one can just as easily migrate their xampp stack a la carte, but something doesn’t “feel” right about that migration path.

My development environment mimics xampp while my staging environment is a little more secure (strong passwords, disabled ports, services not necessarily exposed to the outside world).  In conclusion, I’m not an xampp hater, but was rather satisfied with how easy it was to setup a “true” lamp environment.

Stay tuned for my next entry: the recipe for installing the lamp stack on Ubuntu’s Jaunty.  I’m sure it’s been documented a million of times, but it may still be worth the read.

Follow

Get every new post delivered to your Inbox.