<<

Oracle Communication Policy Controller

Lab Environment Preparation

Edition 1.0 April 2013

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Disclaimer

This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle.

The information contained in this document is subject to change without notice. This document is not warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

Trademark Notice

Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Table of Contents

Lab Environment Preparation ...... 1-1 Part 1: Installing the Base System ...... 1-3 Preparation 1-1: Downloading Oracle Enterprise Linux ...... 1-4 Preparation 1-2: Downloading and Installing VirtualBox ...... 1-5 Preparation 1-3: Creating VM in Oracle VM VirtualBox ...... 1-6 Preparation 1-4: Installing Oracle Enterprise Linux ...... 1-8 Preparation 1-5: Configuring Oracle Enterprise Linux ...... 1-11 Preparation 1-6: Installing VirtualBox Guest Additions ...... 1-14 Preparation 1-7: Configuring and Updating your VirtualBox VM ...... 1-17 Lab Environment Preparation ...... 2-1 Part 2: Installing Tools ...... 2-3 Preparation 2-1: Installing Java JDKs ...... 2-4 Preparation 2-2: Downloading and Installing Seagull ...... 2-7

Lab Environment Preparation

Chapter 1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 2

Part 1: Installing the Base System

Overview Most Oracle courses assume that you have a pre-built environment available, with a number of tools already installed. But in some cases this course will be taught in custom environments and then all the basic setup needs to be done by the student. Using the instructions below, you will create a base system to be used in many Oracle courses.

Pre-requisites

Using Different Operating Systems on Your Host Machine The instructions assume that you are using Windows on your host machine. But since Oracle VM VirtualBox can be used on several platforms, it is possible to instead use OS X, Linux or Solaris. But no matter which platform you are using on your host machine, you need to have administration privileges.

Enabling Virtualization Technology in Your BIOS To effectively use your hardware in a virtual machine, it is recommended that you enable the virtualization technology features in the BIOS of your machine. This is done differently for different hardware, so you have to find out how to do this on your own. You will probably find this information on the internet by searching for “Enable Virtualization Technology in BIOS” plus the name of your laptop, for example “Dell Latitude” or “Lenovo Thinkpad”.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 3

Preparation 1-1: Downloading Oracle Enterprise Linux

Overview In this practice you will download Oracle Enterprise Linux (OEL).

Tasks

Downloading Oracle Enterprise Linux Since websites are often changed, the instructions below might differ slightly from the way the site looks at the moment. But the process should be very similar. 1. a browser and go to http://edelivery.oracle.com/linux. The Welcome to the Oracle® E-Delivery Web site for Enterprise Linux and Oracle VM screen appears. 2. Click Continue. The Registration screen appears. 3. Fill out the registration form and accept the license terms and export restrictions. 4. Click Continue. The Media Pack Search screen appears. 5. In the Select a Product Pack field, select Oracle Linux. 6. In the Platform field, select x86 64 bit. 7. Click Go. The list of available media packs is displayed. 8. Click the latest release of the Enterprise Linux media pack. At the time of writing, this was Oracle Linux Release 6 Update 4 Media Pack for x86_64 (64 bit). The Oracle Linux Release 6 Update 4 Media Pack for x86_64 (64 bit) screen appears. 9. Find the installation package. At the time of writing, the name of this package was Oracle Linux Release 6 Update 4 for x86_64 (64 Bit). 10. Click the Download button in front of the installation package. 11. Save the to your computer. Note: Depending on the browser used, this is done in different ways. 12. The file is called V37084-01.iso, which is a name that can be hard to remember. Rename the file to a better name, for example: OEL-R6-U4-x86_64.iso.

Summary You have now downloaded the installation package for Oracle Enterprise Linux.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 4

Preparation 1-2: Downloading and Installing VirtualBox

Overview In this practice you will download and install VirtualBox.

Tasks

Downloading VirtualBox Since websites are often changed, the instructions below might differ slightly from the way the site looks at the moment. But the process should be very similar. 1. Open a browser and go to http://www.oracle.com/us/technologies/virtualization/virtualbox/overview/index.html. The Oracle VM VirtualBox web site appears. 2. Click Download and then click Oracle VM VirtualBox. The Oracle VM VitualBox Downloads web site appears. 3. Click the download link for Oracle VM VirtualBox for Windows and save the file to your hard drive. At the time of writing, the current release of VirtualBox was 4.2.8. 4. Browse down in the same page and click the download link for Oracle VM VirtualBox Extension Pack and save the file to your hard drive.

Installing and Starting VirtualBox 5. Execute the installation binary for Oracle VM VirtualBox and follow the instructions for doing a typical installation. 6. Execute the installation binary for Oracle VM VirtualBox Extension Pack and follow the instructions for doing a typical installation. 7. Start VirtualBox from the Windows Start menu.

Summary You now have an installation of VirtualBox and are ready to start creating Virtual Machines, running any desktop operating system-

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 5

Preparation 1-3: Creating VM in Oracle VM VirtualBox

Overview A good strategy for testing new products or doing labs is to use a virtual machine. This way, nothing has to be installed directly on your machine. Everything will be sandboxed in a “computer inside your computer”. These instructions help you create a virtual machine (VM) in Oracle VM VirtualBox. In the instructions below, it is assumed that you have enough space on your hard drive and that you want to save the files for the VM in the :\VMs\VBox\OEL64.

Tasks

Creating the VirtualBox Virtual Machine (VM) 1. Start VirtualBox. 2. In the toolbar, click New. The Create Virtual Machine Wizard starts and the Name and operating system screen appears. 3. In the Name field, enter OEL64. 4. In the Type field, select Linux. 5. In the Version field, select Oracle (64 bit) and click Next. The Memory size screen appears. 6. Set the memory size to 2048 and click Next. The Hard drive screen appears. 7. Click Create. The Hard drive file type screen appears. 8. Click Next. The Storage on physical hard drive screen appears. 9. Click Next. The File location and size screen appears. 10. In the Location field, enter C:\VMs\VBox\OEL64\OEL64. 11. In the Size field, enter 24 GB and click Create. A new virtual machine, with the name of OEL64, appears in the list of virtual machines in the left hand side of the Oracle VM VirtualBox Manager screen.

Configuring the VM 12. Right-click the OEL64 VM and select Settings. The Settings screen appears. 13. Select Storage. The Storage panel appears. 14. Under Controller: IDE, select Empty. The Attributes panel containing CD/DVD unit appears. 15. To the right of the CD/DVD Drive field, click the disc icon and select Choose a virtual CD/DVD disk file from the pop-up menu. A file browser window appears.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 6

16. Locate and select the installation , the iso file, for Oracle Enterprise Linux and click Open. The DVD icon under Controller: IDE is now set to the name of the iso file. 17. Click OK. The Oracle VM VirtualBox Manager appears again. 18. Right-click the OEL64 VM and select Start. The VM starts and the Oracle Linux installation wizard appears.

Summary You have now created and configured your VM and is ready to install Oracle Enterprise Linux.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 7

Preparation 1-4: Installing Oracle Enterprise Linux

Overview These instructions help you install Oracle Enterprise Linux (OEL). When the VM boots up, the installation for Oracle Enterprise Linux will automatically start. The following instructions apply to the installation of Oracle Enterprise Linux 6 Update 4. If you are using another update of OEL 6, there may be minor differences but the process should be very similar.

Tasks

Installing Oracle Enterprise Linux 1. Click inside the running VM and press Enter to start the installation of Oracle Enterprise Linux in graphical mode. The Disk Found screen appears. Note: If you want to return to windows at any time during the installation you need to press the right Ctrl key on the keyboard. This will release the focus from the VM back to Windows. To move focus back to the VM you need to click inside the VM. 2. Press Tab to set focus on the Skip button and press Space. The Oracle Linux screen appears. 3. Click Next to start the installation process. The language selection screen appears. Note: For the purpose of creating a general VM, you will use English as the default language and U.S. English for the keyboard. 4. Click Next. The keyboard selection screen appears. 5. Click Next. The storage device screen appears. 6. Click Next. The storage device warning dialog appears. 7. Click Yes, discard any . The name this computer screen appears. 8. Click Configure Network. The Network Connections dialog appears, with the Wired tab selected. 9. Select System eth0 and click Edit. The Editing System eth0 dialog appears. 10. Select Connect automatically and click Apply. The Network Connections dialog appears again. 11. Click and then Next. The region configuration screen appears. 12. Select your Region and click Next. The root password configuration screen appears. 13. In both the Root Password and the Confirm field, enter oracle and click Next.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 8

The Weak Password dialog appears. 14. Click Use Anyway. The which type of installation screen would you like screen appears. 15. Select Use All Space and click Next. The writing storage configuration to disk dialog appers. 16. Click changes to disk. The software set selection screen appears. 17. Select Desktop and click Next. Note: The installation will take 5-15 minutes. If you want to return to Windows and do other work in the mean time, you need to press the right Ctrl key on the keyboard to release the focus from the VM back to Windows. 18. When the installation is done, click Reboot.

Configuring Oracle Enterprise Linux After reboot, there are a number of additional configuration steps that you need to go through. 19. In the Welcome screen, click Forward. The License Information screen appears. 20. Click Forward. The Set Up Software Updates screen appears. 21. Select No, I prefer to register at a later time and click Forward. The firstboot dialog appears. 22. Click No thanks, I’ll connect later and then click Forward. The Create User screen appears. 23. Click Forward. A warning dialog appears. 24. Click Yes. The Date and Time screen appears. 25. Click Forward. The Kdump screen appears. 26. Click Finish. The log in screen appears. 27. Click Other. The Username field appears. 28. In the Username field, enter root and click Log In. The Password field appears. 29. In the Password field, enter oracle and click Log In. A warning dialog appears. 30. Click Close. You are now running your Oracle Enterprise Linux installation.

Disabling the firewall 31. From the System menu, select Administration, then select Firewall. The Firewall Configuration Startup dialog appears.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 9

32. Click Close. The Firewall Configuration application appears. 33. In the toolbar, click Disable and then Apply. A warning dialog appears. 34. Click Yes. The firewall is disabled 35. From the File menu, select Quit. The firewall configuration application is closed.

Disabling SELinux 36. From the Applications menu, select System Tools, then Terminal. A Terminal window appears. 37. Open the configuration file for SELinux: $ gedit /etc/selinux/config Note: The dollar sign ($) signifies the prompt. You are not supposed to type the dollar sign. 38. Change the value for SELINUX to disabled, as shown below, then save the file and close the editor. SELINUX=disabled

Placing a for the Terminal on the Desktop 39. From the Applications menu, select System Tools, then right-click Terminal and select Add this launcher to desktop. A shortcut for terminal appears on the desktop.

Summary You have now installed and done basic configuration of Oracle Enterprise Linux.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 10

Preparation 1-5: Configuring Oracle Enterprise Linux

Overview These instructions help you configure OEL. All types of installations require this preparation be done.

Change the Host Name 1. On the desktop, double-click the Terminal shortcut. A new terminal window appears. 2. Open the hosts configuration file for edit: $ gedit /etc/hosts Note: The dollar sign ($) signifies the prompt. You are not supposed to type the dollar sign. 3. Add oel64 at the end of both lines, then save and close the file. 4. Open the network configuration file for edit: $ gedit /etc/sysconfig/network 5. Set host name to oel64, then save and close the file. HOSTNAME=oel64 6. Finally change the hostname in the kernel file, with the following command: $ echo oel64 > /proc/sys/kernel/hostname 7. Reboot Oracle Enterprise Linux and log in as root again $ init 6 Note: This will take a while.

Creating Accounts The configuration of the oracle user is important, especially if you are installing an Oracle database.The user installing an Oracle database must, at least, belong to two groups – oinstall and dba – and dba should be the primary group. So, to simplify things, the oracle group should never be created. All files created by the oracle user should have the owner oracle and belong to the group dba. The root account should only be used to install system components. When installing Oracle products, another account should be used. The instructions below will help you create the necessary groups and user. 8. Open a new terminal window. 9. Create the groups oinstall and dba using the following commands: $ groupadd -g 1520 oinstall $ groupadd -g 1521 dba 10. Create the oracle user using the following command: $ useradd -g dba -G oinstall -u 1521 oracle 11. Set the password for the new user to oracle, using the following command: $ passwd oracle oracle oracle Note: Ignore the warning about the bad password. In a production system you should use better passwords.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 11

Giving sudo rights to the oracle user It is possible to give a normal user the right to run commands in super user mode. In a lab environment this can save time since you don’t have to log in as root when you need to do something as the superuser. The tool used to safely edit the sudo configuration file is based on the vi editor, and the notes in the instructions will help you successfully use the tool. Warning: You will give root access to any user that is later added to the wheel group. Make sure you never do this in a production environment. 12. Start the tool for editing the sudo configuration file: $ visudo 13. Find the following entry for giving the users in the wheel group the right to use sudo: # %wheel ALL=(ALL) NOPASSWD: ALL Uncomment this line so it looks as shown below: %wheel ALL=(ALL) NOPASSWD: ALL Note: Use the arrow keys to position the cursor on the # character and press the x key twice. 14. Save the file and quit the editor by doing the following: Press the esc key twice. Type :wq and then press the Enter key. 15. Make the user oracle member of the wheel group: $ usermod –a –G wheel oracle

Giving access to sbin to the oracle user 16. Open the .bashrc file for editing: $ gedit /home/oracle/.bashrc 17. Add the following line at the end of the file: =$PATH:/sbin:/usr/sbin 18. Save and exit the file.

Configuring X11 The graphical user interface in most Linux systems is based on the X Window System, also called X11, because the current major version is 11. When you start a program with a graphical user interface, you make a network connection to the X11 server, even if the server and the client are on the same machine. The X11 system has security features for preventing hackers from accessing your displays. These security features also need to be configured to allow different users in the same machine to be able to run graphical programs. To make things simple in the lab machine, the following instructions will allow all local users to setup non-network local connections to the X server. To make sure the configuration is automatically done for all users, you will add the necessary settings in the file /etc/profile as described below. 19. Open the /etc/profile file for editing: $ gedit /etc/profile 20. Search for the following line in the file: export PATH USER LOGNAME MAIL HOSTNAME ... 21. Add the following two lines right after the above line:

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 12

# Allow local non-network connections to the X server. xhost local: > /dev/null 22. Save and exit the file. 23. From the System menu, select Log Out root. 24. Click Log Out. The log in screen appears. 25. Log in as root. 26. Open a new terminal window and log in as the oracle user: $ su – oracle 27. Verify that the configuration is done: $ xhost access control enabled, only authorized clients can connect LOCAL: SI:localuser:root 28. Log out the oracle user: $ exit

Summary You have now configured Oracle Enterprise Linux (OEL.)

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 13

Preparation 1-6: Installing VirtualBox Guest Additions

Overview These instructions help you install the VirtualBox guest additions. The guest additions give you much better integration between the host machine and the guest operating system. The most obvious things are better integration of the displays and mouse actions. In the following instructions, you need to replace nnn with the actual version number. Also, in these instructions it will be very useful to use the feature of tab completion. For example when you want to change directory to /media/ VBOXADDITIONS_nnn, type: cd /med Then press the tab key. You will see how the command is completed to: cd /media/ Continue to type in the command and add VBOX: cd /media/VBOX Then press the tab key again and you will see how the command is completed to: cd /media/VBOXADDITIONS_nnn This is a very useful feature that will save you a lot of time. Tab completion works for commands, directories and files.

Tasks

Updating the Oracle Enterprise Linux Installation Even though you used the latest installation binary, there are probably a number of updates to many of the components. You will now download and install these updates. Warning: This part might take a long time. Make sure you have 1-2 hours, when you can let the machine be connected to the internet and finish the update. 1. Make sure your VM is started and that you are logged in as root. 2. On the desktop, double-click the Terminal shortcut. A new terminal window appears. 3. Update the system: $ yum update 4. Accept the GPG key from the Oracle OSS group. Importing GPG key 0xnnnn: Userid: “Oracle OSS group …” From : http://public-yum.oracle.com/… Is this ok [y/N]: y

Installing Tools Later, you will build the guest additions for Virtual Box, and to do this you need a number of compiler tools. You will now make sure they are available in your installation. 5. Install the C++ compiler: $ yum install gcc … Is this ok [y/N]: y

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 14

6. Install the kernel development packages: $ yum install kernel-devel kernel-uek-devel … Is this ok [y/N]: y

Installing Library for Backward Compatibility Some of the product installers are dependent on a library that is not installed by default 7. Install the 64-bit version of the Xprint library: $ yum install libXp … Is this ok [y/N]: y 8. Install the 32-bit version of the Xprint library: $ yum install libXp.i686 … Is this ok [y/N]: y Note: This is only applicable if you are using Oracle Enterprise Linux version 6.

Installing VirtualBox Guest Additions After a major update of a Linux system, like the one you just did, you need to both install and update the VirtualBox Guest Additions. A major update of a Linux system, may involve both the X Windows system, which controls the graphical user interface, and the kernel, which is the core of the Linux system. This means that you have to install and update the VirtualBox Guest Additions before the reboot, to make sure the graphical user interface works afterwards and then after the reboot, to use the new kernel. In the following instructions, you need to replace nnn with the actual version number. 9. From the Devices menu, select CD/DVD Devices then Remove disk from virtual drive. Note: If the menu item is greyed out, there is no disk in the virtual drive and you are ready to perform the next task. 10. From the Devices menu, select Install Guest Additions. The VBOXADDITIONS_nnn image will be mounted. Note: If the VBOXADDITIONS_nnn dialog appears, just click Cancel. 11. In the terminal window, change directory to the DVD image: $ cd /media/VBOXADDITIONS_nnn Note: Remember to use tab completion as described in the overview of this practice. 12. Build the guest additions: $ sh ./VBoxLinuxAdditions.run Note: Wait for the build of the guest additions to complete. 13. From the System menu, select Shut Down and then click Restart. The system restarts. 14. Log in as root. 15. Open a terminal window and change directory to the DVD image: $ cd /media/VBOXADDITIONS_nnn 16. Build the guest additions: $ sh ./VBoxLinuxAdditions.run

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 15

17. Close the terminal window: $ exit 18. Right-click the DVD icon on the desktop and select Eject. The DVD icon disappears. 19. From the System menu, select Shut Down and then click Shut Down.

Summary You have now installed the guest additions and your VM will now be much easier to work with since display and mouse integration is almost seamless between your virtual machine and your host system. Whenever you update the components installed in this virtual machine, and especially if the kernel is updated, the installation of the guest additions might need to be executed again to rebuild the runtime components.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 16

Preparation 1-7: Configuring and Updating your VirtualBox VM

Overview These instructions help you mount a directory on your local that can be used to exchange files with the virtual machine. You will also update your virtual machine with the latest version of the components in your environment.

Tasks

Configuring Your VM 1. In your windows machine, create the directory C:\VMs\LinuxStage. 2. Make sure the VM is powered off. 3. In the Oracle VM VirtualBox Manager, right-click the VM and select Settings. The Settings screen appears with the General panel selected. 4. In the General panel, select the Advanced tab. 5. For Shared Clipboard, select Bidirectional. 6. In the left-hand list of settings, select Shared Folders. The Shared Folders panel appears. 7. Click the folder icon with a plus sign. 8. In the Folder path field, enter C:\VMs\LinuxStage. 9. In the Folder name field, enter stage. 10. Click OK. 11. Click OK. 12. Start your VM and log in as the user oracle. Note: From now on always log in as the user oracle and only change to superuser (root) when it is absolutely necessary.

Adding some useful scripts 13. From the Applications menu, select System Tools, then right-click Terminal and select Add this launcher to desktop. A shortcut for terminal appears on the desktop. 14. On the desktop, double-click the Terminal shortcut. A new terminal window appears. 15. Open the /etc/bashrc file for editing: $ sudo gedit /etc/bashrc 16. At the end of the file, add the code shown in the box below. You should now be able to copy the text in this document using Ctrl-c, and paste it into the editor in the VM, using Ctrl-v. # GLOBAL Aliases ipget='/sbin/ifconfig eth0 | /bin/grep inet\ addr | cut - d":" -f2 | cut -d" " -f1' Note: Make sure you add the code above into the file as two lines of text. 17. Save and exit the file. 18. Start a new session as the oracle user:

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 17

$ su – oracle 19. Test the ipget alias: $ ipget 10.0.2.15 20. Close the session: $ exit

Configuring Your OEL Installation 21. Create a mount point for the shared folder: $ sudo mkdir /mnt/stage 22. Create a script for mounting the shared folder. $ gedit mount_shared.sh 23. Add the code shown in the box below. Remember that you should be able to copy the text in this document using Ctrl-c, and paste it into the editor in the VM, using Ctrl-v. #!/bin/sh echo "Mounting Stage Folder on Host" sudo mount -t vboxsf stage /mnt/stage 24. Save and exit the file. 25. Change the permission of the file: $ chmod 755 mount_shared.sh 26. Test the script: $ ./mount_shared.sh Mounting Stage Folder on Host 27. Copy the script to the shared folder: $ cp mount_shared.sh /mnt/stage/. 28. List the content of the stage folder: $ ls /mnt/stage 29. Use the File Explorer in Windows, check the folder C:\VMs\LinuxStage and you should see the file mount_shared.sh. Note: In the rest of the instructions, whenever is used this should be replaced by /mnt/stage. Also, every time you restart your VM you need to run the mount_shared.sh script to be able to access the shared folder.

Summary You have now mounted a file system on your windows machine which will be used when installing other products. You have also installed all updates for your system and rebuilt the guest additions, to make sure it all works after reboot.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 1 - Page 18

Lab Environment Preparation

Chapter 2

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 1

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 2

Part 2: Installing Tools

Overview Most Oracle courses assume that you have a pre-built environment available, with a number of tools already installed. But in some cases this course will be taught in custom environments and then all the basic setup needs to be done by the student. Using the instructions below, you will install the necessary tools in your base system.

Pre-requisite You should already have a base system up and running.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 3

Preparation 2-1: Installing Java JDKs

Overview Many products require a Java JDK. To make sure that you have a Java installation that is easy to upgrade and is not dependent on any other Oracle product installation, you should install a Java JDK separately. Using the instructions below, you will install both the Oracle Java JDK and Oracle JRockit JDK.

Tasks

Downloading Oracle Java JDK 1. In your windows machine, use a browser and download the latest update for Java SE 6 of Oracle Java JDK. Save the installation in your stage directory: C:\VMs\LinuxStage. At the time of writing these instructions, the Oracle Java JDK is found at http://www.oracle.com/technetwork/java/javase/downloads/index.html. The version is Java SE 6 Update 43 and you should download the binary file for Linux x64: jdk-6u43-linux-x64.bin.

Installing Oracle Java JDK 2. Open a terminal window and mount the shared folder: $ ./mount_shared.sh 3. Create a directory for the installation: $ cd /opt $ sudo mkdir java 4. Change to the install directory: $ cd java 5. Run the installer: $ sudo /jdk-6u43-linux-x64.bin 6. After unpacking the files, the installer will ask you to press the Enter key. It will take a while, but the installer will then finish and open a browser for registering. Just close the browser. 7. Verify that the installation was successful by issuing the following commands: $ cd jdk1.6.0_43/bin $ ./java -version A successful installation will return the following: java version "1.6.0_43" Java(TM) SE Runtime Environment (...) Java HotSpot(TM) 64-Bit Server VM (...) 8. Create for jconsole: $ cd /usr/bin $ sudo rm –f jconsole $ sudo ln -s /opt/java/jdk1.6.0_43/bin/jconsole jconsole 9. Verify that the installation was successful by issuing the following command: $ jconsole -version A successful installation will return the following:

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 4

JConsole version "1.6.0_43-b01" Java(TM) SE Runtime Environment (...) Java HotSpot(TM) 64-Bit Server VM (...)

Downloading Oracle JRockit JDK 10. In your windows machine, use a browser and download the latest update for JRockit 6 of Oracle JRockit JDK. Save the installation in your stage directory: C:\VMs\LinuxStage. At the time of writing these instructions, the Oracle JRockit JDK is found at http://www.oracle.com/technetwork/middleware/jrockit/downloads/index.html. The version is JRockit 6 - R28.2.5 and you should download the binary file for Linux x86-64: jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin.

Installing Oracle JRockit JDK 11. Run the installer: $ sudo /jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin After a while the installer welcome screen appears. Note: If you get an error message, the file might not be . To solve this problem, run the following command: $ chmod +x jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin 12. Click Next. The Choose Product Installation Directories screen appears. 13. In the Product Installation Directory field enter /opt/java/jrockit-jdk1.6.0_37- R28.2.5-4.1.0. 14. Click Next. The Optional Components screen appears. 15. Click Next. The product is installed an after a few moments the Installation Complete screen appears. 16. Click Done. The terminal window reappears. 17. Create the necessary symbolic links: $ cd /usr/bin $ sudo rm –f java $ sudo ln -s /opt/java/jrockit-jdk1.6.0_37-R28.2.5- 4.1.0/bin/java java $ sudo rm –f jar $ sudo ln -s /opt/java/jrockit-jdk1.6.0_37-R28.2.5-4.1.0/bin/jar jar $ sudo ln -s /opt/java/jrockit-jdk1.6.0_37-R28.2.5- 4.1.0/bin/jrmc jrmc 18. Verify that the installation was successful by issuing the following command: $ java -version A successful installation will return the following: java version "1.6.0_37" Java(TM) SE Runtime Environment (...) Oracle JRockit(R)(...)

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 5

19. Verify that you can run jar and jrmc as well: $ jar -help $ jrmc –version

Summary You have now a standalone installation of both the Oracle Java JDK and Oracle Jrockit JDK.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 6

Preparation 2-2: Downloading and Installing Seagull

Overview Seagull is a multi-protocol traffic generator test tool. It is primarily aimed at IMS and is perfect for testing and simulating IMS type of traffic. In this practice you will download and install Seagull in your environment.

Tasks

Downloading Seagull Since websites are often changed, the instructions below might differ slightly from the way the site looks at the moment. But the process should be very similar. 1. From the Applications menu, select Internet and then Firefox Web Browser. Firefox starts. 2. Open the internet address http://gull.sourceforge.net The Seagull homepage appears. 3. In the Section part on the left hand side, underneath Download, click the link called Stable release. The list of download directories appears. 4. Click seagull. The list of release number directories appears. 5. Click 1.8.2. The list of available packages appears. 6. Click seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz. The download page is shown and after 5 more seconds the download dialog appears. 7. Select Save File and click OK. The Downloads screen appears and the file is downloaded. 8. Close all the Firefox browser windows.

Installing Seagull You will now install the Seagull core plus support for the protocols Diameter, Radius and SIP. 9. Open a terminal window and change to the Downloads directory: $ cd Downloads 10. Unpack the installation packages: $ tar -zxvf seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz 11. Enter the packages directory: $ cd packages 12. Install Korn shell, which Seagull is dependent on: $ sudo yum install ksh 13. Install the Seagull core $ sudo rpm -ivh seagull-core-1.8.2-linux-2.6-intel.rpm 14. Install support for diameter in Seagull $ sudo rpm -ivh seagull-diameter-protocol-1.8.2-linux-2.6- intel.rpm

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 7

14. Install support for radius in Seagull $ sudo rpm -ivh seagull-radius-protocol-1.8.2-linux-2.6- intel.rpm 14. Install support for sip in Seagull $ sudo rpm -ivh seagull-sip-protocol-1.8.2-linux-2.6-intel.rpm 15. Verify that the tool is available by checking the help information: $ cd $ seagull –help 16. Remove the downloaded file and exit all terminal windows: $ cd Downloads $ rm seagull-1.8.2-Linux_RHEL6U1_X86_64.tar.gz $ rm –Rf packages

Summary You have now installed Seagull.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Lab Environment Preparation Chapter 2 - Page 8