C H A P T E R  2

Installing the Sun Studio 11 Software

This chapter gives you instructions for installing your Suntrademark Studio 11 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 11 software in a different directory. If you have Sun Studio 10 update 1 Early Access software installed, be sure to uninstall this software before installing the Sun Studio 11 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.


Installing From Electronic Download Files

If you obtained your Sun Studio 11 software through electronic download, you can find complete instructions for downloading the software file, extracting the file contents, and starting the installer 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 11 software:


Using the Graphical User Interface Installer

These instructions describe how to install the Sun Studio 11 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, start the installer by typing:


# /path_to_CDROM/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 uncompressing the tar file and extracting the contents.

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 Software License Agreement page appears.

6. In the Software 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.

The installer checks for adequate disk space, and the Ready to Install page appears.

11. 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.

12. 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.

13. If you want to view the installation log file for a product, click the Details button for that product in the Installation Summary page.

14. In the Registration page, read the information about registering the product and click Next.

15. In the After Installation page, read the information about the log files and how to run the product.

16. Click Exit to finish the Sun Studio 11 software installation.

17. Remove the CD-ROM from the CD-ROM drive.

18. (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

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


# exit

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

21. If you use a proxy server to access the Internet, set the ALL_PROXY environment variable to your proxy settings so that you can use the Update Notification feature of the Sun Studio 11 software. For information about setting your proxy and about the Update Notification feature, see Setting Your Proxy Information for Using the Update Notification Feature

 


Using the Command-Line Installer

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


# /path_to_CDROM/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 uncompressing the tar file and extracting the contents.

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 Software License Agreement text is displayed.



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 11 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.

11. If you use a proxy server to access the Internet, set the ALL_PROXY environment variable to your proxy settings so that you can use the Update Notification feature of the Sun Studio 11 software. For information about setting your proxy and about the Update Notification feature, see Setting Your Proxy Information for Using the Update Notification Feature


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 [-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

-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

#./batch_installer

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/./batch_installer -d /dirname

The Software License Agreement is displayed, 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.

8. If you use a proxy server to access the Internet, set the ALL_PROXY environment variable to your proxy settings so that you can use the Update Notification feature of the Sun Studio 11 software. For information about setting your proxy and about the Update Notification feature, see Setting Your Proxy Information for Using the Update Notification Feature


Installing the J2SE Platform

The Sun Studio 11 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 11 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 11 software.



Note - The paths shown in this section assume that Sun Studio 11 software 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 11 Software Tools

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

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

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

To access Sun Studio 11 man pages with the man command, your MANPATH environment variable must contain the path /opt/sun/sunstudio11/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/sunstudio11/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 11 software tools and man pages to the appropriate environment variables so that all Sun Studio 11 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 11 software to your PATH and MANPATH variables.



Note - The PATH and MANPATH variables must be set to include Sun Studio 11 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/sunstudio11/bin${PATH:+:}${PATH}
MANPATH=/opt/sun/sunstudio11/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.


Setting Your Proxy Information for Using the Update Notification Feature

The Update Notification feature periodically checks www.sun.com and communicates available changes related to your Sun Studio software, including patches and major software updates.

You can view the current contents of the update file from the IDE by choosing Help right arrow View update information.

To initiate contact with the server and get updated information, choose Helpright arrow Check now for updates.

From the command line, you can view the update file at ~/.sunstudio/user_info/latest_updates.html.

If Update Notification is not able to check for updates and your system is on a network with a proxy server, you can set proxy server information by doing the following:

1. Choose Tools right arrow Setup Wizard.

2. In the wizard, select the Use HTTP Proxy Server checkbox.

3. Type the proxy host name in the Proxy Server Name field and the port number in the Port field.

4. Click Finish.

You can also set the proxy server information using the ALL_PROXY environment variable; for example:


setenv ALL_PROXY myproxy:8080



Note - You must exit and restart the IDE for the proxy server information to be recognized by the IDE.



To disable Update Notification, set the SUNW_NO_UPDATE_NOTIFY environment variable to any value other than false.

Usage information is communicated during the Update Notification process. This information is used by Sun Microsystems to improve future Sun Studio software releases. This information is anonymous and cannot be associated to any individual or organization.