C H A P T E R 2 |
Installing the Sun Studio 9 Software |
This chapter gives you instructions for installing your Sun Studio 9 software and serial number.
Note - Do not use the pkgadd command to install the software. Use the provided installer. |
If you installed an Early Access version of the Studio 9 software or any other version of the Sun Studio software on your system, then install the current version of the Sun Studio 9 software in a different directory.
After installation, modify your PATH and MANPATH environment variables to include the new directory. See Setting Up Access to the Developer Tools and Man Pages for more information about setting the variables to use the new release.
When you upgrade from Try and Buy software to purchased software, you do not need to reinstall the software product. You only need to install your permanent serial number. The Serial Number Installation Tool (snit) is a utility that works from the command line and is used to display the contents of a license file and to install serial numbers into the license file.
Follow the steps below to install your permanent serial number.
1. Locate the permanent serial number. See Locating the Product Serial Number.
2. Become a superuser (root) by typing:
3. Use the snit command to enter your serial number by typing:
% /install-directory/SUNWspro/bin/snit -i serial-number -f /install-directory/SUNWspro/prod/lib/serial.dat |
The serial number is installed in the serial.dat file of your product. Refer to the snit(1) man page for more details about the snit command options.
If you obtained your files through electronic download, you can find complete instructions for downloading and extracting the downloaded files on the download page of the product web site at http:/wwws.sun.com/software/products/studio/index.html. Follow the instructions in the Download Instructions before you proceed with product installation.
There are four ways to install the Sun Studio 9 software:
Note - If the installer cannot find the required J2SE technology, then run the installer using the -j option with the following syntax: ./installer -jdkhome /usr/j2se. |
Note - The CD-ROM names are studio_9_sol_sparc and studio_9_sol_x86. In the examples provided, the CD-ROM name studio_9_sol_arch is used. |
These instructions describe how to install the Sun Studio 9 software and serial number using the graphical user interface installer available on the product CD-ROM. If you get the product from an electronic download, be sure to follow all instructions in the Download Instructions, which is available for download from the product web site download page.
Note - Do not use the pkgadd command to install the software. Use the provided installer. Do not run the installer in the background. |
1. Decide if you want to install using a remote display. See Choosing Local Display or Remote Display of the Installer for details.
2. If you are not currently superuser (root), become a superuser by typing:
Note - The installer prompts you to log in as superuser (root) if you invoke the installer when you are not logged in as superuser (root). |
3. Insert the CD-ROM in the CD-ROM drive.
If the installer does not start or you are using the Solaris 9 operating environment, the autorun feature might be disabled or unsupported on your system. In this case, use one of the following methods to start the installer:
(Optional for electronic download) If you downloaded the product files from the product web site, do the following:
a. See the Download Instructions available on the product web site download page for more information on extracting the tar files and using the installer launch script.
b. From the download directory, start the installer by typing:
(Optional for using the Solaris Product Registry tool) You can start the installer by using the Solaris Product Registry tool.
a. To start the Product Registry tool, type:
c. In the Select Installer dialog, navigate to the download directory or cdrom directory, and select installer.
d. Click OK, and the installer starts.
4. Click Next in the Welcome page.
The Initializing page appears, and when initialization is complete, the Binary Code License Agreement page appears.
5. In the Binary Code License Agreement page, click Accept.
If you choose Decline, you cannot continue with the installation.
6. Click Next to proceed to the Select Component page.
7. In the Select Component page, select the type of installation you want for each product.
8. Click Next to proceed to the Select Install Directory page.
9. Decide whether you want to change the software installation directory from /opt.
See Supporting Previous Sun Studio and Sun ONE Studio Releases if you want to install this new Sun Studio release on a computer that contains previous Sun ONE Studio releases or Forte Developer releases.
10. Click Next when you have entered the installation directory.
If you did not select Custom Install for any of the products, skip to Step 11.
(Optional for Custom Install) If you selected Custom Install for any of the products in the Product Selection page, a Subcomponent Selection page is displayed for each of those products.
a. Select the subcomponents you want to install by clicking the check box next to the item.
Items with a check mark in the box will be installed.
b. Click Next to continue with installation.
11. In the Enter Serial Number page, click the 60-day Trial Serial Number button to generate the 60-day trial serial number or enter your permanent serial number in the text box. See Locating the Product Serial Number for information on finding the serial number.
12. Click Next to install the serial number.
The installer checks for adequate disk space, and the Ready to Install page appears.
13. Verify that the disk space shown at the top of the Ready to Install page is available on your system by using the df -k command. If you receive a disk space error message and you have sufficient disk space to install the product, then ignore the error message and continue with installation.
14. In the Ready to Install page, confirm that the items you want to install are listed.
The Installing page appears with a progress indicator. When installation is complete, the Installation Summary page appears.
15. If you want to view the installation log file for a product, click the Details button for that product in the Installation Summary page.
16. In the Registration page, read the information about registering the product and click Next.
17. In the After Installation page, read the information about the log files and how to run the product.
18. Click Exit to finish the Sun Studio 9 software installation.
19. Remove the CD-ROM from the CD-ROM drive.
20. (Optional) If you performed the installation using a remote display, on the display computer, disable client access by typing the following:
21. Exit from superuser privileges on the source computer by typing:
22. To set up your access to the Sun Studio 9 software tools and man pages, set your PATH and MANPATH variables by following the steps in Setting Up Access to the Developer Tools and Man Pages.
These instructions describe how to install the Sun Studio 9 software and serial number using the command-line interface.
Note - Do not use the pkgadd command to install the software. Use the provided installer. Do not run the installer in the background. |
1. Decide if you want to install using a remote display. See Choosing Local Display or Remote Display of the Installer for details.
2. If you are not currently superuser, become a superuser (root) by typing:
Note - The installer prompts you to log in as superuser (root) if you invoke the installer when you are not logged in as superuser (root). |
3. Insert the CD-ROM in the CD-ROM drive.
If the GUI installer starts, choose Exit to exit from the installer. To restart the installer in the command line, type:
(Optional for electronic download) If you downloaded the product files from the product web site, do the following:
a. See the Download Instructions available on the product web site download page for more information on extracting the tar files and using the installer launch script.
b. From the download directory, start the command-line installation by typing:
Do not run the installer in the background.
4. The installer welcomes you. Press Enter to continue.
The Binary Code License Agreement text appears.
Note - The Enter key is equivalent to the Return key on some keyboards. Press the Enter key to accept the default selections during installation. |
5. Follow the installer instructions to complete the installation. See Step 9 in Using the Graphical User Interface Installer for additional information about selecting the installation directory.
6. When installation is complete, you can view a product's log file by typing the number that corresponds to that product. When you finish viewing the log files, type the number that corresponds to Done.
7. Remove the CD-ROM from the CD-ROM drive.
8. (Optional) If you performed the installation using a remote display, on the display computer, disable client access by typing the following:
9. Exit from superuser privileges on the source computer by typing:
10. To set up your access to the Sun Studio 9 software tools and man pages, set your PATH and MANPATH variables by following the steps in Setting Up Access to the Developer Tools and Man Pages.
You can install the Sun Studio 9 software, Sun Performance Library software, or Sun Studio Source Distribution software with the batch installer for a default installation.
Note - Do not use the pkgadd command to install the software. Use the provided installer. Do not run the installer in the background. |
Follow these instructions for batch installation:
1. Decide if you want to install using a remote display. See Choosing Local Display or Remote Display of the Installer for details.
2. If you are not currently superuser, become a superuser (root) by typing:
3. Use the following command to run the batch installer:
(Optional for electronic download) Use the following command to run the batch installer:
The batch installer commands for each component are the following:
See TABLE 2-1 for the options that are available for the batch_installer command.
The batch_installer command and the options can be used in the scenarios shown in TABLE 2-2
4. Choose the appropriate installation scenario from TABLE 2-2 to run the batch_installer command. For example, to use the options to generate the 60-day Trial serial number and install in a directory other than the default, type the following:
The Binary Code License Agreement appears, and the installer checks for adequate disk space. The installer proceeds with installation, and the prompt returns when installation is complete.
(Optional for electronic download) If you downloaded the product files from the product web site, type the following:
5. (Optional) If you performed the installation using a remote display, on the display computer, disable client access by typing the following:
6. Exit from superuser privileges on the source computer by typing:
7. Set your PATH and MANPATH variables. See Setting Up Access to the Developer Tools and Man Pages.
You can use the Solaris JumpStart installer on at least the Solaris
9 operating system (SPARC® Platform Edition) and on at least the Solaris
9 operating system (x86 Platform Edition) to automate the software installation process to install the Sun Studio 9 software on multiple systems. An overview of the JumpStart installation steps is listed below. See the Solaris Installation Guide for complete details of JumpStart installation.
Note - In the following instructions, substitute the download directory name for the cdrom_path that is used in the command-line examples. |
1. Verify that you have more than one gigabyte of disk space in both the swap partition and the /opt partition on the source machine.
2. (Optional for electronic download users) Copy the downloaded file into the $SI_CONFIG_DIR directory.
3. Create a finish script that resides on the source machine. The file must contain the following information:
Note - The batch_installer -d option does not work in JumpStart installation. |
See Using the Batch Installer for information on the available batch_installer command options.
Refer to the Solaris Installation Guide for further instruction on completing the JumpStart installation process.
The Sun Studio 9 Integrated Development Environment (IDE) supports the Java 2 Platform, Standard Edition technology (the J2SE
technology) and related Solaris
Operating System (OS) patches.
If you have the supported J2SE technology installed on your system, then the J2SE selection is not visible in the Select Components page of the installer.
If you do not have the supported J2SE technology installed on your system, then you can install the technology on your system by using one of these installers:
See the Download Instructions available on the product web site download page for more information on extracting the tar file. Follow the instructions in Using the Graphical User Interface Installer to install the J2SE technology.
Once the installation is completed, you can use any of the following methods to verify a successful installation:
a. Go to the logs directory by typing at the prompt:
The file extension varies for each log file.
Because the Sun Studio 9 software product components and man pages are not installed into the system directories /usr/bin/ and /usr/share/man, you must change your PATH and MANPATH environment variables to enable use of the Sun Studio 9 software.
Set the PATH and MANPATH variables in your home environment files. In the examples that follow, the .cshrc file is shown if you are using the C shell, and the .profile file is shown if you are using the Bourne shell or Korn shell.
For more information about the PATH and MANPATH environment variables, the SunOS man page csh(1) describes the PATH variable for the C shell, the sh(1) man page describes the PATH variable for the Bourne shell, and the ksh(1) man page describes the PATH variable for the Korn shell. The man(1) man page describes the MANPATH variable.
To use the Sun Studio 9 software commands, your PATH environment variable must contain the path /opt/SUNWspro/bin. To determine whether you need to set your PATH environment variable, follow these steps:
1. Display the current value of the PATH variable by typing:
2. Review the output for a string of paths that contain /opt/SUNWspro.
3. Add the path /opt/SUNWspro/bin to your PATH environment variable. If you have previous versions of Sun ONE Studio or Forte Developer software installed, add the path before the paths of the previous installations.
Note - Substitute your home environment file name for the file names shown in the examples. |
To access Sun Studio 9 software man pages with the man command, your MANPATH environment variable must contain the path /opt/SUNWspro/man. To determine whether you need to set your MANPATH environment variable, follow these steps:
1. Request the dbx(1) man page by typing:
If the man dbx command cannot find the dbx(1) man page, or if the page that is displayed is not for the version of the software you just installed, you do not have the MANPATH variable set correctly. Set your PATH variable as described in the next step.
3. Add the path /opt/SUNWspro/man/ to your MANPATH environment variable.
The following procedure lets you permanently add the paths for the Sun Studio 9 software tools and man pages to the appropriate environment variables so that all Sun Studio 9 components are always available. These commands can also be entered at a shell prompt to temporarily enable that shell only.
1. Add the Sun Studio 9 software to your PATH and MANPATH variables.
Note - The PATH and MANPATH variables must be set to include Sun Studio 9 software in each user's environment, which allows each user to use the installed software. |
If the response is "Undefined variable" (C shell) or an empty line (Bourne shell or Korn shell), the MANPATH variable is not set. If paths to one or more man directories are displayed, the variable is set.
Now edit the .cshrc file in your home directory and add the following line at the end of the file:
If the MANPATH variable is not already set, add the following line:
If the MANPATH variable is already set, add the following line instead:
Do not type any spaces in these two lines.
2. Save the .cshrc file or .profile file that you modified in Step 1.
3. Reinitialize your shell by executing the following command:
For the Bourne shell or Korn shell, type:
Copyright © 2004, Sun Microsystems, Inc. All rights reserved.