D. Performing initial configuration of your DB2 AMI instances
Follow these steps to perform initial configuration of your DB2 AMI instances.
- On the AWS Management Console EC2 Dashboard, click Instances.
- Wait for the server status to change from
Running, which typically takes 5-10 minutes, as shown in Figure 26.
Figure 26. My instances
- 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
- 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.
- When prompted with
Are you sure you want to continue connecting (yes/no)?, enter yes, as shown in Figure 28.
Figure 28. Entering commands
- Read the content, and click I understand to accept the license agreement, as shown in Figure 29.
Figure 29. License agreement
- Read the content, and click I understand to accept the copyright details, as shown in Figure 30.
Figure 30. License agreement details
- Read the content, and click I understand to accept the DB2 license agreement, as shown in Figure 31.
Figure 31. DB2 license agreement
- Select Manually enter contents for Certificate and Private Key, as shown in Figure 32.
- Tab over to Next, and press Enter.
Figure 32. Manually entering certificate and key
- Press Alt+F2. The Run Application window appears.
- Enter gedit, and click the Run button, as shown in Figure 33.
Figure 33. Run Application window
- Click the Open button.
- Right-click into the file listing, and click Show Hidden Files, as shown in Figure 34.
Figure 34. File listing on machine
- Browse to the .ec2 directory, and select the cert-xxxxxx.pem file, as shown in Figure 35.
Figure 35. Browsing directories
- Click Open.
- Select the entire content of the file, as shown in Figure 36.
Figure 36. Contents of cert-xxxxxx.pem file
- 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
- Repeat Steps 15-18 for the pk-xxxxxx.pem file.
- Click Next, and click End. A window appears showing the configuration results, as shown in Figure 38.
Figure 38. Configuration result
- Click New EBS volume (persistent), and click Next, as shown in Figure 39.
Figure 39. AMI storage configuration
- Ensure Single is selected, and enter a size of 1 GB, as shown in Figure 40.
- Click Next.
Figure 40. Creating and attaching new volume
- Click End, and record the EBS volume number, as shown in Figure 41.
Figure 41. EBS configuration result
- Enter any acceptable root password (and record it), as shown in Figure 42, and click Next.
Figure 42. Specifying password
- Click End to see successful configuration, as shown in Figure 43.
Figure 43. System configuration
- 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
- Click Next to see the DB2 configuration log, as shown in Figure 45.
Figure 45. DB2 configuration
- Enter a database name, such as demo, (and record it), as shown in Figure 46, and click Next.
Figure 46. DB2 database creation
- Click End to see that the database partitions and the database were successfully created, as shown in Figure 47.
Figure 47. Installation log
- A database called
demohas 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.