C H A P T E R  2

Installing the Sun Studio 10 Software

This chapter gives you instructions for installing your Suntrademark Studio 10 software and serial number.


Supporting Previous Sun Studio Releases

If you installed any other release of the Sun Studio software on your system, then install the Sun Studio 10 software software in a different directory. If you have Sun Studio 10 Early Access software or Sun Studio 10 Customer Acceptance software installed, be sure to uninstall this software before installing the Sun Studio 10 software.

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.


Upgrading From Try and Buy Software

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:


% su
Password: root-password

3. Use the snit command to enter your serial number by typing:


% /install-directory/sunstudio10/bin/snit -i serial-number -f /install-directory/sunstudio10/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.


Installing From Electronic Download Files

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.


Choosing an Installation Method

There are three ways to install the Sun Studio 10 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/java.




Using the Graphical User Interface Installer

These instructions describe how to install the Sun Studio 10 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 rpm 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:


% su
Password: root-password



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.

The product installer starts.

If the installer does not start, use one of the following methods to start the installer:

The Welcome page opens.

4. (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:


# ./installer

The Welcome page opens.

5. Click Next in the Welcome page.

The Initializing page appears, and when initialization is complete, the Binary Code License Agreement page appears.

6. In the Binary Code License Agreement page, click Accept.

If you choose Decline, you cannot continue with the installation.

7. Click Next to proceed to the Select Component page.

8. In the Select Component page, select the type of installation you want for each product.

9. Click Next to proceed to the Select Install Directory page.

10. In the Select Install Directory page, you can choose the default directory or another directory in which to install the product. Click Next when you are finished.

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 10 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:


# xhost - source-computer-name

21. Exit from superuser privileges on the source computer by typing:


# exit

22. To set up your access to the Sun Studio 10 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.


Using the Command-Line Installer

These instructions describe how to install the Sun Studio 10 software and serial number using the command-line interface.



Note - Do not use the rpm 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:


% su
Password: root-password



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:


# /cdrom/studio_10_sol_linux/installer -nodisplay

(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:


# /download-directory/installer -nodisplay

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 10 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:


# xhost - source-computer-name

9. Exit from superuser privileges on the source computer by typing:


# exit

10. To set up your access to the Sun Studio 10 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.


Using the Batch Installer

The batch installer requires minimal user interaction and can be run from a single command. Follow these instructions to use the batch installer:



Note - Do not use the rpm 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:


% su
Password: root-password

3. Use the following command to run the batch installer:


batch_installer [-s serial number] [-d dirname] [-h] 

(Optional for electronic download) Use the following command to run the batch installer:


batch_installer_component-name [-s serial number] [-d dirname] [-h] 

See TABLE 2-1 for the options that are available for the batch_installer command.


TABLE 2-1 batch_installer Options and Option Descriptions

Option Name

Option Description

-s serial number

Installs the permanent serial number. Without this option, a 60-day trial serial number is generated by default.

-d dirname

Installs in directory dirname.

-h

Displays usage information for the batch_installer command.


The batch_installer command and the options can be used in the scenarios shown in TABLE 2-2


TABLE 2-2 Installation Scenarios Using the batch_installer Command and Options

Scenario

Command Typed at the Prompt

Install in the default directory and generate a 60-day trial serial number by default

#./batch_installer

Install in the default directory with the permanent serial number

#./batch_installer -s serial number

Install in a directory other than the default directory

#./batch_installer -d /dirname


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:


# /cdrom/studio_10_sol_linux/batch_installer -d /dirname

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:


# /download-directory/install-directory/batch_installer -d /dirname

5. (Optional) If you performed the installation using a remote display, on the display computer, disable client access by typing the following:


% xhost - source-machine-name

6. Exit from superuser privileges on the source computer by typing:


# exit

7. Set your PATH and MANPATH variables. See Setting Up Access to the Developer Tools and Man Pages.


Installing the J2SE Platform

The Sun Studio 10 Integrated Development Environment (IDE) supports the Javatrademark 2 Platform, Standard Edition technology (the J2SEtrademark technology).

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:


Verifying a Successful Installation

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:


% cd /var/opt/sun/install/logs

b. View the file by typing:


% more Sun_Studio_Software_install.A03200125

The file extension varies for each log file.


Setting Up Access to the Developer Tools and Man Pages

Because the Sun Studio 10 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 10 software.



Note - The paths shown in this section assume that Sun Studio 10 packages are installed in the /opt/sun directory. If you installed the software in a different directory, replace /opt/sun in the examples with that directory name.



Setting Your PATH Environment Variable So You Can Access Sun Studio 10 Tools

To use the Sun Studio 10 software commands, your PATH environment variable must contain the path /opt/sun/sunstudio10/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:


% echo $PATH

2. Review the output for a string of paths that contain /opt/sun/sunstudio10.

3. Add the path /opt/sun/sunstudio10/bin to your PATH environment variable.

Setting Your MANPATH Environment Variable So You Can Access Sun Studio 10 Man Pages

To access Sun Studio 10 software man pages with the man command, your MANPATH environment variable must contain the path /opt/sun/sunstudio10/man. To determine whether you need to set your MANPATH environment variable, follow these steps:

1. Request the dbx(1) man page by typing:


% man dbx

2. Review the output, if any.

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/sun/sunstudio10/man/ to your MANPATH environment variable.

Adding the Changes to the Appropriate Environment Variable

The following procedure lets you permanently add the paths for the Sun Studio 10 software tools and man pages to the appropriate environment variables so that all Sun Studio 10 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 10 software to your PATH and MANPATH variables.



Note - The PATH and MANPATH variables must be set to include Sun Studio 10 software in each user's environment, which allows each user to use the installed software.



a. Determine if your MANPATH variable is already set. At a shell prompt, type the command:


% echo $MANPATH

If the response is an empty line, the MANPATH variable is not set. If paths to one or more man directories are displayed, the variable is set.

b. Edit the environment file in your home directory. For example, if you are using the GNU Bourne-Again shell environment, add the following lines to your environment file:


PATH=/opt/sun/sunstudio10/bin${PATH:+:}${PATH}
MANPATH=/opt/sun/sunstudio10/man:${MANPATH:=/usr/share/man}

Do not type any spaces in these two lines.

2. Save the environment file that you modified in Step 1.

3. Reinitialize your shell.