|
|||
1. Solaris Management Tools (Road Map) 2. Working With the Solaris Management Console (Tasks) 3. Working With the Sun Java Web Console (Tasks) 4. Managing User Accounts and Groups (Overview) 5. Managing User Accounts and Groups (Tasks) 6. Managing Client-Server Support (Overview) 7. Managing Diskless Clients (Tasks) 8. Introduction to Shutting Down and Booting a System 9. Shutting Down and Booting a System (Overview) 10. Shutting Down a System (Tasks) 11. Modifying Solaris Boot Behavior (Tasks) 12. Booting a Solaris System (Tasks) 13. Troubleshooting Booting a Solaris System (Tasks) 14. Managing the Solaris Boot Archives (Tasks) 15. x86: GRUB Based Booting (Reference) 16. Managing Services (Overview) 18. Managing Software (Overview) 19. Managing Software With Solaris System Administration Tools (Tasks) 20. Managing Software by Using Package Commands (Tasks) Adding and Removing Signed Packages by Using the pkgadd Command (Task Map) Managing Software Packages by Using Package Commands (Task Map) Using Package Commands to Manage Software Packages 21. Managing Solaris Patches by Using the patchadd Command (Tasks) |
Adding and Removing Signed Packages by Using the pkgadd CommandThe following procedures explain how to add and remove signed packages by using the pkgadd command. How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert)
Example 20-1 Importing a Trusted Certificate From the Java KeystoreThe following example shows how to import a trusted certificate. In this example, Sun's root CA certificate is imported from the Java keystore into the package keystore by using the keytool command. # keytool -export -storepass changeit -alias verisignclass2g2ca \ -keystore /usr/java/jre/lib/security/cacerts -file /tmp/root.crt Certificate stored in file </tmp/root.crt> # pkgadm addcert -t -f der /tmp/root.crt Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D Are you sure you want to trust this certificate? yes Trusting certificate </C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O> Type a Keystore protection Password. xxxxxx Press ENTER for no protection password (not recommended): For Verification: Type a Keystore protection Password. Press ENTER for no protection password (not recommended): Certificate(s) from </tmp/root.crt> are now trusted How to Display Certificate Information (pkgadm listcert)
Example 20-2 Displaying Certificate InformationThe following example shows how to display the details of a locally stored certificate. # pkgadm listcert -P pass:test123 Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D How to Remove a Certificate (pkgadm removecert)
Example 20-3 Removing a CertificateThe following example shows how to remove a certificate. # pkgadm listcert Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D # pkgadm removecert -n "/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O" Enter Keystore Password: storepass Successfully removed Certificate(s) with alias \ </C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O> How to Set Up a Proxy Server (pkgadd)If your system is behind a firewall with a proxy, you will need to set up a proxy server before you can add a package from an HTTP server by using the pkgadd command.
How to Add a Signed Package (pkgadd)This procedure assumes that you have imported Sun's root CA certificate. For more information, see How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert).
Example 20-4 Adding a Signed PackageThe following example shows how to add a signed package that is stored on the system. # # pkgadd -d /tmp/signed_pppd The following packages are available: 1 SUNWpppd Solaris PPP Device Drivers (sparc) 11.10.0,REV=2003.05.08.12.24 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: all Enter keystore password: ## Verifying signature for signer <User Cert 0> . . . The following example shows how to install a signed package using an HTTP URL as the device name. The URL must point to a stream-formatted package. # pkgadd -d http://install/signed-video.pkg ## Downloading... ..............25%..............50%..............75%..............100% ## Download Complete . . . |
||
|