Skip to main content

If you don't have an IBM ID and password, register here.

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

Deploy your database applications and projects on the cloud

Using IBM DB2 data server and Amazon Elastic Compute Cloud (EC2)

Rav Ahuja (rsahuja@ca.ibm.com), Senior Product Manager, IBM
Rav Ahuja is a Senior Product Manager for Data Management at IBM and is based in the Toronto Lab. He has been working with DB2 since version 1, and he has held various roles in DB2 development, technical support, marketing, and product management. In addition to product strategy and evangelism, Rav spends his time helping customers and business partners around the globe benefit from DB2 solutions using emerging technologies and cloud computing. He is a frequent presenter at events in many countries, and he has written numerous papers, articles and books related to DB2. In his spare time, Rav helps maintain ChannelDB2.com, a social network that aggregates DB2 related videos, blogs, podcasts, and so on. Rav holds a Computer Engineering degree from McGill University and an MBA from University of Western Ontario.
Bradley Steinfeld (bsteinfe@ca.ibm.com), Software Developer, IBM
Bradley Steinfeld is a software developer and an open-source-software evangelist based out of the IBM Toronto Lab. He is one of the first IBMers to work with DB2 on the cloud, and he has become an expert on various cloud technologies (Amazon EC2, CloudBurst, Eucalyptus, and so on). He has a Bachelor of Mathematics from the University of Waterloo.

Summary:  Cloud computing is an increasingly popular paradigm that can significantly accelerate development and prototyping cycles. In this tutorial you will learn how you can easily deploy your database applications and projects on the cloud in just minutes using IBM® DB2® data server and Amazon Elastic Compute Cloud (EC2). No prior cloud computing or DB2 experience is necessary.

Date:  28 Jan 2010
Level:  Intermediate PDF:  A4 and Letter (2313 KB | 39 pages)Get Adobe® Reader®

Comments:  

D. Performing initial configuration of your DB2 AMI instances

Follow these steps to perform initial configuration of your DB2 AMI instances.

  1. On the AWS Management Console EC2 Dashboard, click Instances.
  2. Wait for the server status to change from Starting to Running, which typically takes 5-10 minutes, as shown in Figure 26.

Figure 26. My instances
Shows instance status
  1. Record the Instance ID and the Public DNS, as shown in Figure 27. You might need to click to view the full Public DNS.

Figure 27. Instance description
Shows instance ID and public DNS
  1. Open a terminal and enter the following commands:
    chmod 600 $HOME/.ec2/ <keypair>,pem
    ssh -i $HOME/.ec2/ .pem root@<hostname>
    

    Refer to Using PuTTY to connect to your instance from a Windows system if you are using a Windows® system.
  2. When prompted with Are you sure you want to continue connecting (yes/no)?, enter yes, as shown in Figure 28.

Figure 28. Entering commands
Terminal screen capture
  1. Read the content, and click I understand to accept the license agreement, as shown in Figure 29.

Figure 29. License agreement
I understand and accept that SUSE Linux  Enterprise Server is provided and licensed directly by Novell
  1. Read the content, and click I understand to accept the copyright details, as shown in Figure 30.

Figure 30. License agreement details
Novell copyright details
  1. Read the content, and click I understand to accept the DB2 license agreement, as shown in Figure 31.

Figure 31. DB2 license agreement
Shows details of DB2 license agreement
  1. Select Manually enter contents for Certificate and Private Key, as shown in Figure 32.
  2. Tab over to Next, and press Enter.

Figure 32. Manually entering certificate and key
Shows selecting to manually enter the information
  1. Press Alt+F2. The Run Application window appears.
  2. Enter gedit, and click the Run button, as shown in Figure 33.

Figure 33. Run Application window
Entering gedit
  1. Click the Open button.
  2. Right-click into the file listing, and click Show Hidden Files, as shown in Figure 34.

Figure 34. File listing on machine
Shows screen with file listing
  1. Browse to the .ec2 directory, and select the cert-xxxxxx.pem file, as shown in Figure 35.

Figure 35. Browsing directories
Shows selecting the file
  1. Click Open.
  2. Select the entire content of the file, as shown in Figure 36.

Figure 36. Contents of cert-xxxxxx.pem file
Shows selecting contents of file
  1. Paste the selected content into the X.509 text box in the Terminal using Shift+Ctrl+v, as shown in Figure 37.

Figure 37. Pasting into the X.509 text box
Shows the terminal text box
  1. Repeat Steps 15-18 for the pk-xxxxxx.pem file.
  2. Click Next, and click End. A window appears showing the configuration results, as shown in Figure 38.

Figure 38. Configuration result
Shows AWS credentials set up successfully
  1. Click New EBS volume (persistent), and click Next, as shown in Figure 39.

Figure 39. AMI storage configuration
Shows choosing EBS volume
  1. Ensure Single is selected, and enter a size of 1 GB, as shown in Figure 40.
  2. Click Next.

Figure 40. Creating and attaching new volume
Shows selecting single volume as opposed to RAID
  1. Click End, and record the EBS volume number, as shown in Figure 41.

Figure 41. EBS configuration result
Shows volume successfully mounted
  1. Enter any acceptable root password (and record it), as shown in Figure 42, and click Next.

Figure 42. Specifying password
Shows entering password
  1. Click End to see successful configuration, as shown in Figure 43.

Figure 43. System configuration
Change password for root is successful
  1. Enter passwords for db2inst1, dasusr1, and db2fenc1 users (and record them), and click Next, as shown in Figure 44.

Figure 44. Specifying passwords for DB2 instance users
Shows password screen
  1. Click Next to see the DB2 configuration log, as shown in Figure 45.

Figure 45. DB2 configuration
Shows configuration log
  1. Enter a database name, such as demo, (and record it), as shown in Figure 46, and click Next.

Figure 46. DB2 database creation
DB2 database creation
  1. Click End to see that the database partitions and the database were successfully created, as shown in Figure 47.

Figure 47. Installation log
Shows database partitions and database successfully created
  1. A database called demo has been created, and you are now ready to connect to it and use it for your development purposes. After the setup wizard finishes, log in as the db2 instance owner to connect to the database you created, and start entering and querying data in the database you created.

The DB2 9.7 instance is now ready.

5 of 12 | Previous | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management,
ArticleID=465178
TutorialTitle=Deploy your database applications and projects on the cloud
publish-date=01282010
author1-email=rsahuja@ca.ibm.com
author1-email-cc=
author2-email=bsteinfe@ca.ibm.com
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).