The swinstall command is used for software installation. Depending on the type of terminal you are using, the command starts in either text or graphic interface. If you are using a text-based terminal, you will see a message on your screen as shown in Figure 15-1. It is similar to the message screen you have seen while using SAM in Chapter 12.
After this message, the TUI appears as shown in Figure 15-2.
First of all, a subwindow appears that shows some basic information. The Source Depot Type is Local CD-ROM , showing that software is going to be installed from a CD-ROM device. Source Host Name shows the name of the host that is being used as the source of the software depot. If you are on a network, you can change this source. Source Depot Path shows the path of the directory where the software depot resides. In this case, it is the directory where the CD-ROM is mounted. By default, the CD-ROM mount directory is /SD_CDROM , where the swinstall command looks for a software depot. With HP-UX version 10.20 and earlier, the system administrator needs to manually create a mount point and then manually mount the CD-ROM before using the swinstall command. With HP-UX 11.00 and later, SD-UX will automatically mount the CD-ROM via the swinstall command.
You can use the key to change any of these options. After pressing the button, the subwindow disappears and you see a window like the one shown in Figure 15-3, which lists the software packages present on the CD-ROM.
Only the software listed is compatible with your system.
If you are using GUI, Figure 15-2 will look like Figure 15-4, and Figure 15-3 will be replaced by Figure 15-5. From a functionality standpoint, these are the same windows .
If you want to install from a particular software depot, you can also mention the software source at the command line with the help of the -s switch. For example, to install software from a tape drive, use this command.
swinstall -s /dev/rmt/0m
To install software from a CD-ROM, with HP-UX 10.20 and earlier, mount the CD-ROM on /SD_CDROM with the help of the mount command and then use the following command. (For HP-UX 11.00, you don't need to use the mount command.)
swinstall -s /SD_CDROM
The software installation process is completed in only a few steps. In the first step, you initiate the swinstall command and select the software source depot. Once you get the list of software in that depot, you mark the software you want to install. To mark the software, first you need to highlight the software using the and spacebar keys. After highlighting, you can go to the Actions menu and select Mark for Install . If you just want to upgrade the existing software, you can go to the Actions menu and select the option Match What Target Has , and the selection will be made for you automatically.
Once all of the software is marked , go to the Actions menu and select the Install (Analysis)... option. When you select this option, the second phase of software installation starts the analysis phase. During this phase, all software dependencies and disk space requirements are checked. If the analysis phase succeeds, you will see a dialog box where you can see the results of the analysis. In case of any error, you can modify your software selection. If there are no errors, you can go to the actual installation phase where files are copied to the disk.
During the installation phase, all files from the selected software are copied to the disk. If a fileset is already installed, it is not reinstalled. However, to forcibly reinstall already installed software, you can go to the Options menu and select Change Options to force the reinstallation of already-installed files.
The last part of the software installation is the configuration and cleanup, where configuration scripts are run and temporary files are deleted. Temporary files are created during the installation process.
All activities of the swinstall command are logged in the /var/adm/sw/swinstall.log file. A sample of entries in this log file is shown here.
======= 06/23/99 12:25:57 EDT BEGIN swinstall SESSION (interactive) NOTE: The interactive UI was invoked, since no software was specified. Session started for user "root@myhp". agent_auto_exit false agent_timeout_minutes 10000 allow_downdate false allow_incompatible false allow_multiple_versions false autoreboot false autorecover_product false autoremove_job false autoselect_dependencies true autoselect_reference_bundles true compress_files false control_lang C create_target_path true defer_configure false enforce_dependencies true enforce_dsa true enforce_kernbld_failure true enforce_scripts true follow_controller false job_polling_interval 30 log_msgid 0 logdetail false logdetail false loglevel 1 match_target false mount_all_filesystems true polling_interval 2 register_new_root true reinstall false reinstall_files true reinstall_files_use_cksum true retry_rpc 1 rpc_binding_info ncacn_ip_tcp:[2121] ncadg_ip_udp:[2121] rpc_timeout 5 select_local true software_view all_bundles source_cdrom /SD_CDROM source_type directory source_directory hp1:/var/spool/sw use_alternate_source false verbose 1 write_remote_files false * Source: myhp:/var/spool/sw * Targets: myhp:/ * Software selections: * Software selections: PHCO_16964.PHCO_16964,r=B.10.00.00.AA,a=HP-HX_B.10.20_700/800,v=HP PHCO_17075.PHCO_17075,r=B.10.00.00.AA,a=HP-UX_B.10.20_700/800,v=HP PHCO_17240.PHCO_17240,r=B.10.00.00.AA,a=HP-UX_B.10.01_700/800,v=HP PHCO_17552.PHCO_17552,r=B.10.00.00.AA,a=HP-UX_B.10.20_700/800,v=HP PHCO_17630.PHCO_17630,r=B.10.00.00.AA,a=HP-UX_B.10.20_700/800,v=HP PHNE_16692.PHNE_16692,r=B.10.00.00.AA,a=HP-UX_B.10.20_700/800,v=HP PatchText.Y2K-1020S800,r=B.10.20.B0315,a=HP-UX_B.10.20_800,v=HP Y2KDocs.Y2K-1020S800,r=B.10.20.B0315,a=HP-UX_B.10.20_800,v=HP * A "+" indicates an automatic selection due to dependency or the automatic selection of a reference bundle. * Beginning Analysis * The analysis phase succeeded for "myhp:/". * Ending Analysis * Beginning Task Execution * Proceeding with Task Execution on the following targets: * myhp:/
You can use this log file to view any complications occurring during the software installation process.
This log file contains some labels, which are explained next .
======== | Indicates start or end of a task. |
ERROR | Indicates a serious problem so that installation is not possible. |
WARNING | Shows that although the installation is performed, there may be a problem. Read the warning message to see what action you need to take for this problem. |
NOTE | Any information is placed under this label. It may or may not require action. Most of the time you may ignore these messages. |
If you receive protected software from HP, you will also receive your customer ID and codeword. A codeword is generated using the part number of the medium on which the software is shipped, your customer ID, and the product ID. Codewords are confidential, and it is your responsibility to protect them.
When you start software installation from a CD-ROM that contains protected software, the swinstall command will show you a message that the CD-ROM contains protected software. In that case, you need to go to the Actions menu and select Add New Codeword . You will see a window like the one shown in Figure 15-6, where you enter your customer ID and codeword.
You need to enter a codeword only once on your machine. It is then stored in the /var/adm/sw/.codewords file for future use.
Usually one codeword is used for one CD-ROM. Every time you purchase new software, you will receive a new codeword with it.
The software installation process is controlled by the daemon swagentd . If this daemon is not running, you can't start the software installation process. When you give the swinstall command, it connects to the swagentd daemon. The daemon starts the software agent named swagent whenever required. If the software depot is located on another machine on the network, the swagentd daemon connects to the daemon running on that host and initiates communication between the two hosts .
The SD-UX agent swagent is responsible for software management tasks . It is started by the swagentd daemon and terminates after the task is completed.
The SD-UX daemon is started at runlevel 2. So if you are in single-user mode, you can't install software. However, you can start the daemon manually in single-user mode using the following command.
/sbin/init.d/swagentd start
It can be stopped by the command:
/sbin/init.d/swagentd stop
HP-UX maintains a database of all installed software, the installed product database (IPD). During the analysis phase, the swinstall command uses this database to check the software already installed. The swlist command queries this database to list the installed software. Similarly, when the software is removed using the swremove command, this database is updated to reflect the removed software.
The SD-UX commands are responsible to maintain this database, which is stored in the /var/adm/sw/products directory structure.
Top |