Install Ubuntu on Virtualbox Step by Step

Install Ubuntu Linux on Virtual Box

1) download an Ubuntu Linux CD Desktop or server version http://www.ubuntu.com/getubuntu/download
2) download and install virtualbox http://www.virtualbox.org
3) Open VirtualBox
4) Click New Button
5) The New Virtual Machine wizard appears… poof.
6) Click Next
7) name the virtual machine. I called mine “Ubuntu Linux Test install”
8) Change the operating system to Linux Ubuntu
9) Click Next
10) choose 512mb (at least) for base memory size
11) Select Boot hard disk primary master and Create new hard disk
12) The new hard disk wizrd appears… poof. Don’t worry, this is not going to erase your hard drive… this is only creating a virtual disk
13) Click NExt, then choose Dynamically expanding storage
14) on the next screen leave the defaults for disk size and press next
15) Click Finish
16) click Finish again
17) select the Ubuntu TEst virtual machine from the list of VMs and press the start button
18) the Frist Run Wizard appears… poof!
19) Choose CD for the media type
20) choose image file for the Media Source then click the folder icon next to the <no media> select box
21) The virtual media manager will appear… poof!
22) click the add button
23) Browse to the ubuntu linux install image that downloaded in step #1. Mine is called: ubuntu-9.04-desktop-i386.iso. Selec this file
24) Press the select button in the virtual media manager
25) Click the next button
26) Click the finish button
27) the Ubuntu boot screen will appear
28) Choose English as your language… press enter
29) After ubuntu loads an Install icon will appear on your Ubuntu Desktop. Click this icon follow the onscreen instructions in the Ubuntu Installer to Install Ubuntu!!
30) click the forward button
31) choose your timezone
32) keyboard layout… just press the forward button
33) on the disk partitioner… choose Use Entire Disk. Don’t worry… this will not erase your hard disk. Its just using the virtual drive.
34) fill in your name, username and desired password
35) give the computer a name that makes you laugh
36) click forward
37) click Install
38) ubuntu will copy files and finish the install… when it asks click the restart LATER button
39) click the red button in the upper right hand corner and choose shutdown.
40) browse to the Ubuntu Linux virtual machine in Virtualbox and click the Start Button… your Ubuntu Will boot!!!

Run Drupal from the Command Line

Often I need to perform mass operations on Drupal content (for example: importing content from an old CMS database system or making automated changes to a large set of nodes).

To do this I use the script below to run Drupal and access the API from the command line.

Create a file called update-node-12-title.cli and put inside of it:

<?php

// variables
$drupal_home = '/path/to/your/drupal';

// set some server variables so Drupal doesn't freak out
$_SERVER['SCRIPT_NAME'] = '/script.php';
$_SERVER['SCRIPT_FILENAME'] = '/script.php';
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['REQUEST_METHOD'] = 'POST';

// act as the first user
global $user;
$user->uid = 1;

// change to the Drupal directory
chdir($drupal_home);

// run the initial Drupal bootstrap process
require_once('includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

//now we have full access to the Drupal API
$node = node_load(12);
$node->title = "Hello, this is the new title";
node_save($node);

And from the command line I can run the script:

/path/to/php update-node-12-title.cli

Magento Ecommerce, “Please Wait”… and Wait… and Wait

I installed Magento (http://www.magentocommerce.com) on a dedicated server with 2 Xeon processors and 4 GB of RAM.  Often when adding products, editing them, or choosing a category in the admin Magento takes 5-10minutes to complete the Save operation. A “Please Wait” modal dialog appears for long periods of time while Magento is thinking. The operation always completes without error, but It often takes 5-10 minutes just to save a simple product.

asked for a solution in the Magento Forums and found one…

Following the the instructions in the DYI tuning section here
http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on…

I installed each optimization individually to see which made the difference. I found the following:
- Apache KeepAlives enabled. This seems to help the category selection pages load much much faster.
- Modify the configuration for your MySQL server. No noticeable gain on performance. Products still take 5 minutes to save.
- APC or XCache. This one fixed the problem.

Installing xcache seems to have fixed the problem. Products now save in about 2 seconds.

Edit on November 15th, 2009:

I found this in the Magento System Reqs:
“Memory_limit no less than 256Mb (preferably 512)”

Also please see:

The Lean Startup Talk by Eric Ries

Talk by Eric Ries at the Hotel Boulderado last night on The Lean Startup.

The talk was framed as a tale of two startups that he worked for. One was a failure the other was a success.

Startup #1 the Failure

On the surface the failure startup did everything right. They had a great business plan, the best team of people he had ever seen assembled, a well engineered product, and perfect launch publicity. The companies $40M failure was blamed on a set of “secret beliefs” that everyone at the company had but no one recognized outloud.

The “seceret beliefs” where:

  1. That we know what customers will want: they spent 4 years building one big product that was going to change the way people used the internet. The product was perfect from an engineering standpoint. But they never got feedback from the market along the way. This may sound obvious now, but at the time 2001 this is how things where done. They had one release and not “pivot points” along the way to adjust their ideas to the demands of the market.
  2. That we can predict the future: The team on startup #1 wrote a perfect business plan. They also executed it well. They judged their success through the 4 years of development based on how well they were sticking to the plan. Measuring success by sticking to the plan, assumes that the authors of the plan can magically see into the future and predict a path to success. No one can do this. Remember that just sticking to a business plan does not mean progress. The market may have moved somewhere else from when you wrote your perfect plan. Without feedback from it you will never know where it went.

What is real progress? We will talk about that later.

Summary: Startup #1 launched with perfect product, team, and publicity. But, they burned through their money before they had a chance to pivot the business to market feedback.

Startup #2 The success:

Very Simillar product to Startup #1 but… 10M in revenue 2007… much more now

Had a business plan (that went 6 months into the future instead of 4 years). Planned to release a Minimum Viable Product, no matter what state it was in, in six months of starting to write code. Good Team. No Publicity for first buggy beta terrible release. A few… 2 or three people actually downloaded and played with the release that was more likely to crash your computer than to work properly. They received invaluable feedback from these users. One thing they found was that the code Eric Reis had been working on for six months was a total waste. They were able to refocus his energy to other matters quickly. Now days, he recommends this feedback happen within a month or two, weekly, or even daily. 6 months is way to long now.

Another great success of Startup #2 was that they did not divide the team into departments. There was no support team, dev team, management team, HR, etc. Instead everyone was cross discipline. You could divide the focus of their work into two categories:

  • Those focused on delivering the product to customers and the market and bringing feedback back to their work
  • And those focused on taking the feedback and engineering solutions to it.

Startup #2 success also came from  Continuous Deployment. He says they have created test coverage that allows everyone on the team to deploy to production servers new small incremental features up to 50 times per day. They try to have newbies deploy to production on their first day. This continual deployment process evolved over time, learning from mistakes one by one… but you have to make mistakes to learn from them. They do not do weekly or monthly releases. Small deploys allow problems to be isolated quickly instead of wasting a whole release on something that might need to be reverted anyway. Startup #2 practices regularly reverting to be sure their revert process is fast, as quick as deploy, and always works. Every time a mistake is made a test is written to address it and a the human cause of it is addressed in person, possibly with a group. They use SimpleTestSelenium, and Nagios to build up a product immune system that detects problems before they go live, and that can heal and revert quickly.

Through startup #2, Eric learned his definition from progress in a startup company. Progress is “Validated Learning” on behalf of an employee. This should happen each day for each employee. The best way to achieve progress is to setup systems, processes, and culture that allows for validated learning to take place regularly, rapidly.

Finally Eric asked us to close our eyes and think of one thing we would like to improve at our current workplaces. That one thing he said should be done in one day. Think of it… plan it… do it tomorrow.

Here is Eric’s Blog: Startup Lessons Learned

Picking Up From Where We Left Off…

Continuing, at last, from where we left off. Having wrestled with my thoughts from Malawi from a few years back, some still make sense.  Those ideas form the foundation for the discussion on this blog:

  • Development is best defined as an increase in the amount of time that a person can foreseeably sustain their life into the future (See Pondering Poverty)
  • Poverty is best defined as “a lacking of sustainability” (See Pondering Poverty)
  • “I have come to believe more than ever in engineering, pure and empathetic put-me-in-your-shoes engineering, as one of the most effective strategies for realizing development.” (see Digital Development)