Sun Studio 12 Quick Installation (English, Japanese, Simplified Chinese)

Chapter 2 Installing the Sun Studio 12 Software

This chapter includes information about the following:

Installing on a Single-User System

You can install the Sun Studio 12 software and the prerequisite software on a single-user system.

The simplest way to install the software on a single-user system is to use the batch installer. However, the batch installer installs all components of the Sun Studio 12 software. If you want to choose which components of the software to install, you must use the graphical user interface installer or command-line installer.

ProcedureUsing the Batch Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the batch_installer command, run the command to view the software license agreement:


    ./batch_installer --show-sla
    
  3. Do one of the following:

    • Run the system preparation tool once to check your system for the prerequisite software and again, if necessary, to install any missing software. Then run the batch installer to accept the software license agreement and install the Sun Studio 12 software.


      ./prepare_system -C 
      ./prepare_system -s missing_software_name,missing_software_name,...
      ./batch_installer --accept-sla
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

    • Run the batch installer to check for the required prerequisite software and install any missing software, accept the software license agreement, and install the Sun Studio 12 software.


      ./batch_installer -p all --accept-sla 
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

  4. Type the following to determine whether you need to set up your access to the Sun Studio 12 software tools and man pages:


    /usr/bin/version
    
    1. If you receive the message /usr/bin/version: not found or the command reports an earlier version of Sun Studio software, see Setting Up Access to the Developer Tools and Man Pages for information on setting your PATH and MANPATH to point to the Sun Studio 12 software.

    2. If the command reports Sun Studio 12 software, you do not need to set your PATH and MANPATH.

ProcedureUsing the Graphical User Interface Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer &
    
  3. On the Software License Agreement page, click Yes (Accept License).

  4. On the Locale Selection page, click the Japanese checkbox or the Chinese checkbox if you want to install the localized Sun Studio 12 software in either of these languages.

  5. On the Select Components page, click the checkbox to delete the check mark for any component you do not want to install. If you want to install only selected subcomponents of the Sun Studio 12 Compilers and Tools component, click the + icon to expand the component, and click the checkbox for any subcomponent you do not want to install.

  6. On the Select Options page:

    1. If the Missing prerequisites field lists any missing prerequisite software, the installer will install the missing software unless you click the Update checkbox to delete the check mark.

    2. To install the Sun Studio 12 software in a directory other than /opt, type the directory name in the Installation directory field. If you have previously installed some components of the Sun Studio 12 software, the Installation directory field displays that installation directory, and the installer will install additional components in the same directory.

  7. Proceed to the Ready to Install page to install the software, and to the remaining pages to complete the installation.

  8. Type the following to determine whether you need to set up your access to the Sun Studio 12 software tools and man pages:


    /usr/bin/version
    
    1. If you receive the message /usr/bin/version: not found or the command reports an earlier version of Sun Studio software, see Setting Up Access to the Developer Tools and Man Pages for information on setting your PATH and MANPATH to point to the Sun Studio 12 software.

    2. If the command reports Sun Studio 12 software, you do not need to set yourPATH and MANPATH.

ProcedureUsing the Command-Line Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer -nodisplay
    
  3. Read the Software License Agreement and accept it by typing yes.

  4. Deselect any software component or subcomponent you do not want to install.

  5. Select the Chinese locale or the Japanese locale if you want to install the localized Sun Studio 12 software in either of these languages.

  6. If the installer reports that any prerequisite software is missing, install the missing software by choosing Update All Prerequisites.

  7. If you have previously installed some components of the Sun Studio 12 software, the installer will install additional components in the same directory. If you have not previously installed any components of the software, and you want to install the Sun Studio 12 software in a directory other than /opt, specify the installation directory.

  8. Select Skip advanced options.

  9. Follow the installer instructions to complete the installation.

  10. If you installed the Sun Studio 12 software on a single-user system, type the following to determine whether you need to set up your access to the Sun Studio 12 software tools and man pages:


    /usr/bin/version
    
    1. If you receive the message /usr/bin/version: not found or the command reports an earlier version of Sun Studio software, see Setting Up Access to the Developer Tools and Man Pages for information on setting your PATH and MANPATH to point to the Sun Studio 12 software.

    2. If the command reports Sun Studio 12 software, you do not need to set yourPATH and MANPATH.

Installing on a Server For Use by Clients With the Same Architecture

You can install the Sun Studio 12 software and the prerequisite software on a server for use by client systems with the same architecture. You can also copy the prerequisite software to the server so that the system preparation tool can be used to install it on each client system.


Note –

For information on installing on a server for use by clients with a different architecture, see Installing on a Solaris Server for Use by Clients With a Different Architecture in Sun Studio 12 Installation Reference Guide (English, Japanese, Simplified Chinese)


The simplest way to install the software on a server is to use the batch installer. However, the batch installer installs all components of the Sun Studio 12 software. If you want to choose which components of the software to install, you must use the graphical user interface installer or command-line installer.

ProcedureUsing the Batch Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the batch_installer command, run the command to view the software license agreement:


    ./batch_installer --show-sla
    
  3. Do one of the following:

    • Run the system preparation tool once to check your system for the prerequisite software and again, if necessary, to install any missing software. Then run the batch installer to accept the software license agreement, install the Sun Studio 12 software, and copy the system prerequisite software to the server.


      ./prepare_system -C 
      ./prepare_system -s missing_software_name,missing_software_name,...
      ./batch_installer --accept-sla --copy-prerequisites
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

    • Run the batch installer to check for the required prerequisite software and install any missing software, accept the software license agreement, install the Sun Studio 12 software.


      ./batch_installer -p all --accept-sla --copy-prerequisites
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

  4. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  5. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  6. On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

ProcedureUsing the Graphical User Interface Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer &
    
  3. On the Software License Agreement page, click Yes (Accept License).

  4. On the Locale Selection page, click the Japanese checkbox or the Chinese checkbox if you want to install the localized Sun Studio 12 software in either of these languages.

  5. On the Select Components page, click the checkbox to delete the check mark for any component you do not want to install. If you want to install only selected subcomponents of the Sun Studio 12 Compilers and Tools component, click the + icon to expand the component, and click the checkbox for any subcomponent you do not want to install.

  6. On the Select Options page:

    1. If the Missing prerequisites field lists any missing prerequisite software, the installer will install the missing software unless you click the Update checkbox to delete the check mark.

    2. To install the Sun Studio 12 software in a directory other than /opt, type the directory name in the Installation directory field. If you have previously installed some components of the Sun Studio 12 software, the Installation directory field displays that installation directory, and the installer will install additional components in the same directory.

    3. Click the Advanced options tab, and select the Copy system prerequisites checkbox.

  7. Proceed to the Ready to Install page to install the software, and to the remaining pages to complete the installation on the server.

  8. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  9. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  10. On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.

    On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

ProcedureUsing the Command-Line Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer -nodisplay
    
  3. Read the Software License Agreement and accept it by typing yes.

  4. Select the Chinese locale or the Japanese locale if you want to install the localized Sun Studio 12 software in either of these languages.

  5. Deselect any software component or subcomponent you do not want to install.

  6. If the installer reports that any prerequisite software is missing, install the missing software by choosing Update All Prerequisites.

  7. If you have previously installed some components of the Sun Studio 12 software, the installer will install additional components in the same directory. If you have not previously installed any components of the software, and you want to install the Sun Studio 12 software in a directory other than /opt, specify the installation directory.

  8. Select Continue to advanced options, and select Copy system prerequisites.

  9. Follow the installer instructions to complete the installation.

  10. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  11. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  12. On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

Installing on a Solaris 10 1/06 OS Server With Zones

You can install the Sun Studio 12 software in one or more zones on a server running the Solaris 10 1/06 OS for use by client systems. The operating system patches must be installed in the global zone. The remaining prerequisite software can be installed in local zones and must be installed on the client systems.


Note –

ProcedureUsing the Batch Installer

  1. In the global zone, if you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. To install in all zones:

    1. Run the system preparation tool to install the prerequisite operating system patches:


      ./prepare_system -s patches
      
    2. In the directory that contains the batch_installer command, run the command to view the software license agreement:


      ./batch_installer --show-sla
      
    3. Run the batch_installer command to accept the software license agreement, install the Sun Studio 12 software, and copy the prerequisite software to the server.


      ./batch_installer --accept-sla --zone=all --copy-prerequisites
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

  3. To install in the global zone only or in a local zone:

    1. In the global zone, run the system preparation tool to install the prerequisite operating system patches:


      ./prepare_system -s patches
      
    2. In the zone where you want to install the Sun Studio 12 software, run the batch_installer command to view the software license agreement:


      ./batch_installer --show-sla
      
    3. In the same zone, run the batch_installer command to accept the software license agreement, install the Sun Studio 12 software, and copy the prerequisite software to the server.


      ./batch_installer --accept-sla --zone=this --copy-prerequisites
      

      To install the Sun Studio 12 software in a directory other than /opt, specify the installation directory with the -d option.

      The available recommended product patches are installed by default. If you do not want to install these patches, specify the --no-prodpatch option.

  4. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  5. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  6. Run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

ProcedureUsing the Graphical User Interface Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer &
    
  3. On the Software License Agreement page, click Yes (Accept License).

  4. On the Locale Selection page, click the Japanese checkbox or the Chinese checkbox if you want to install the localized Sun Studio 12 software in either of these languages.

  5. On the Select Components page, click the checkbox to delete the check mark for any component you do not want to install. If you want to install only selected subcomponents of the Sun Studio 12 Compilers and Tools component, click the + icon to expand the component, and click the checkbox for any subcomponent you do not want to install.

  6. On the Select Options page:

    1. If the Missing prerequisites field lists any missing prerequisite software, the installer will install the missing software unless you click the Update checkbox to delete the check mark.

    2. To install the Sun Studio 12 software in a directory other than /opt, type the directory name in the Installation directory field. If you have previously installed some components of the Sun Studio 12 software, the Installation directory field displays that installation directory, and the installer will install additional components in the same directory.

    3. Click the Advanced options tab.

      If you are running the installer in the global zone, you can select the appropriate radio button to install the software in this zone or in all zones. If you are running the installer in a local zone, the software will be installed only in that zone.

      Select the Copy system prerequisites checkbox.

  7. Proceed to the Ready to Install page to install the software, and to the remaining pages to complete the installation on the server.

  8. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  9. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  10. On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

ProcedureUsing the Command-Line Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer -nodisplay
    
  3. Read and accept the Software License Agreement.

  4. Select the Chinese locale or the Japanese locale if you want to install the localized Sun Studio 12 software in either of these languages.

  5. Deselect any software component or subcomponent you do not want to install.

  6. If the installer reports that any prerequisite software is missing, install the missing software by choosing Update All Prerequisites.

  7. If you have previously installed some components of the Sun Studio 12 software, the installer will install additional components in the same directory. If you have not previously installed any components of the software, and you want to install the Sun Studio 12 software in a directory other than /opt, specify the installation directory.

  8. Select Continue to advanced options.

    If you are running the installer in the global zone, you can choose to install the software in this zone or in all zones. If you are running the installer in a local zone, you can install the software only in that zone.

    Select Copy system prerequisites.

  9. Follow the installer instructions to complete the installation.

  10. On each client system, set the PATH and MANPATH to access the Sun Studio 12 software and man pages on the server (see Setting Up Access to the Developer Tools and Man Pages).

  11. On each client system, mount the directory on the server in which you installed the Sun Studio 12 software.


    mount server:filesystem installation_directory
    
  12. On each client system, run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


    prepare_system -C
    prepare_system -s missing_software_name,missing_software_name,...
    

Updating an Installation of the English-only Release

You can use the installer to update an installation of the English-only release of the Sun Studio 12 software in two ways:

Updating NetBeans C/C++ Development Pack and Installing Product Patches

ProcedureUsing the Graphical User Interface Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer &
    
  3. On the Software License Agreement page, click Yes (Accept License).

  4. On the Locale Selection page, click Next.

  5. On the Select Components page, deselect any selected components that you do not want to install and click Next.

  6. On the Select Options page:

    1. If you are updating an installation on a single-user system, click Next.

    2. If you are updating an installation on a server, click the Advanced Tab and select the Copy system prerequisites checkbox.

  7. On the Ready to Install page, click Install Now.

  8. On the Post-Installation Setup page, click Setup Now.

  9. If you updated an installation on a server, then on each client system:

    1. Mount the directory on the server in which you installed the Sun Studio 12 software.


      mount server:filesystem installation_directory
      
    2. Run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


      prepare_system -C
      prepare_system -s missing_software_name,missing_software_name,...
      

ProcedureUsing the Command Line Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer -nodisplay
    
  3. Read the Software License Agreement and accept it by typing yes.

  4. For locale selection, type 0.

  5. For component selection, deselect any selected components that you do not want to install.

  6. If the installer reports that any prerequisite software is missing, type 2 for Update All Prerequisites.

  7. If you are updating an installation on a single-user system, skip advanced options. If you are updating an installation on a server, continue to advanced options and select the Copy system prerequisites.

  8. If you updated an installation on a server, then on each client system:

    1. Mount the directory on the server in which you installed the Sun Studio 12 software.


      mount server:filesystem installation_directory
      
    2. Run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


      prepare_system -C
      prepare_system -s missing_software_name,missing_software_name,...
      

Localizing an English-only Installation of Sun Studio 12 Software

ProcedureUsing the Graphical User Interface Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer &
    
  3. On the Software License Agreement page, click Yes (Accept License).

  4. On the Locale Selection page, click the checkbox for Chinese or Japanese.

  5. On the Select Components page, deselect any selected components that you do not want to install and click Next.

  6. On the Select Options page:

    1. If you are updating an installation on a single-user system, click Next.

    2. If you are updating an installation on a server, click the Advanced Tab and select the Copy system prerequisites checkbox.

  7. On the Ready to Install page, click Install Now.

  8. On the Post-Installation Setup page, click Setup Now.

  9. If you updated an installation on a server, then on each client system:

    1. Mount the directory on the server in which you installed the Sun Studio 12 software.


      mount server:filesystem installation_directory
      
    2. Run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


      prepare_system -C
      prepare_system -s missing_software_name,missing_software_name,...
      

ProcedureUsing the Command-Line Installer

  1. If you are not currently superuser (root), become superuser by typing:


    su
    Password: root-password
    
  2. In the directory that contains the installer, start the installer by typing:


    ./installer -nodisplay
    
  3. Read the Software License Agreement and accept it by typing yes.

  4. Select the Chinese locale or the Japanese locale.

  5. For component selection, deselect any selected components that you do not want to install.

  6. If the installer reports that any prerequisite software is missing, type 2 for Update All Prerequisites.

  7. If you are updating an installation on a single-user system, skip advanced options. If you are updating an installation on a server, continue to advanced options and select the Copy system prerequisites.

  8. If you updated an installation on a server, then on each client system:

    1. Mount the directory on the server in which you installed the Sun Studio 12 software.


      mount server:filesystem installation_directory
      
    2. Run the system preparation tool on the server to check the client system for the prerequisite software and again, if necessary, to install any missing software. If the client system has NetBeans C/C++ Development Pack 5.5.1 installed, netbeans is reported as missing. Specify netbeans with the prepare_system -s command to upgrade to the required NetBeans C/C++ Development Pack 5.5.1 update 1.


      prepare_system -C
      prepare_system -s missing_software_name,missing_software_name,...
      

Setting Up Access to the Developer Tools and Man Pages

Because the Sun Studio 12 software product components and man pages are not installed into the system directories /usr/bin/ and /usr/share/man, you might need to change your PATH and MANPATH environment variables to enable use of the Sun Studio 12 software. You do not need to change your paths if:

On Solaris platforms, add the path /installation_directory/SUNWspro/bin to your PATH environment variable. On Linux platforms, add the path /installation_directory/sunstudio12/bin to your PATH environment variable. Be sure to add the Sun Studio software path before the /usr/ucb path. If you have previous versions of Sun Studio, Sun ONE Studio, or Forte Developer software installed, add the path before the paths of the previous installations.

On Solaris platforms, add the path /installation_directory/SUNWspro/man/ to your MANPATH environment variable. On Linux platforms, add the path /installation_directory/sunstudio12/man/ to your MANPATH environment variable.

Starting the Sun Studio 12 IDE

Once you have the Sun Studio 12 software and its software prerequisites installed, and added the software installation directory to your path, you can start using the software. To start the product, type the following:


sunstudio &

Note –

The full path to the command is /installation_directory/SUNWspro/bin/sunstudio on Solaris systems, and /installation_directory/sunstudio12/bin/sunstudio on Linux platforms.