HP-UX to Oracle Solaris Porting Guide Getting Started on the Move to Oracle Solaris
Total Page:16
File Type:pdf, Size:1020Kb
An Oracle White Paper October 2011 HP-UX to Oracle Solaris Porting Guide Getting Started on the Move to Oracle Solaris HP-UX to Oracle Solaris Porting Guide Chapter 1 Introduction...................................................................... 1 Oracle Solaris ................................................................................. 1 The Advantages of Porting to Oracle Solaris.................................. 2 Chapter 2 The Porting Process........................................................ 4 Infrastructure and Application Porting Assessment ........................ 4 Build Environment Deployment....................................................... 5 Data Integration .............................................................................. 5 Source Code Porting....................................................................... 6 Application Verification.................................................................... 6 Commercial Applications and Third-Party Products ....................... 6 Chapter 3 Operating System Considerations................................... 7 Processor Endianness .................................................................... 7 Data Alignment ............................................................................... 7 Read/Write Structures..................................................................... 8 Storage Order and Alignment ......................................................... 8 64-Bit Data Models ......................................................................... 8 Chapter 4 Runtime Environment.................................................... 11 Environment Variables.................................................................. 11 Permissions .................................................................................. 11 Process Resource and Runtime Limits......................................... 12 Application Programming Interfaces ............................................. 13 System Libraries ........................................................................... 14 Shells and Utilities......................................................................... 14 Scripts ........................................................................................... 15 Chapter 5 Devices.......................................................................... 16 Device Naming Conventions......................................................... 16 Device Driver Interface/Driver Kernel Interface ............................ 17 Greater Storage Device Support................................................... 18 Best Practices for Porting Device Drivers ..................................... 18 HP-UX to Oracle Solaris Porting Guide Chapter 6 Development Environment............................................ 21 Oracle Solaris Studio Components............................................... 22 Java Programming Tools .............................................................. 25 Other Programming Tools............................................................. 26 Developing Applications................................................................ 26 Building Applications..................................................................... 34 Debugging Applications ................................................................ 40 Optimizing Applications................................................................. 41 Chapter 7 Threads and Multiprocessing ........................................ 52 Threading Models ......................................................................... 52 Chapter 8 Distributing Applications................................................ 55 Using the Image Packaging System in Oracle Solaris 11............. 55 Using System V Packages in Oracle Solaris 10 ........................... 57 Chapter 9 Running Applications..................................................... 59 Oracle Solaris Service Management Facility ................................ 59 Continued Support for .rc Scripts.................................................. 63 Chapter 10 File Systems and Data ................................................ 64 File Systems ................................................................................. 64 Data Transformation ..................................................................... 69 Chapter 11 Virtualization................................................................ 71 Server Virtualization...................................................................... 71 Network Virtualization ................................................................... 75 HP-UX and Oracle Solaris Virtualization Comparision Summary . 76 Chapter 12 Clustering .................................................................... 78 Oracle Real Applications Cluster .................................................. 78 Oracle Solaris Cluster ................................................................... 78 Differences Between HP Serviceguard and Oracle Solaris Cluster ................................................................... 82 HP-UX to Oracle Solaris Porting Guide Chapter 13 Building Secure Applications....................................... 84 Security Interfaces for Developers................................................ 85 Chapter 14 Internationalization and Localization ........................... 91 Overview ....................................................................................... 91 Encoding Methods ........................................................................ 92 Input Methods ............................................................................... 94 Codeset Converters ...................................................................... 96 Locales.......................................................................................... 97 Message Catalogs ........................................................................ 97 X and Motif Applications ............................................................... 97 Appendix A C Library Mapping ...................................................... 98 Appendix B API Differences........................................................... 99 Appendix C Summary of Supported Locales ............................... 100 Appendix D Privileges Interfaces ................................................. 106 Appendix E Cryptographic Functions........................................... 107 Appendix F Command Comparison Summary ............................ 109 Appendix G Resources ................................................................ 113 Appendix H Glossary ................................................................... 115 HP-UX to Oracle Solaris Porting Guide Chapter 1 Introduction Today many IT organizations recognize the inability of legacy systems to respond to growing service and application demands. For many, HP systems running the HP-UX 11i operating system — particularly ® ® those based on Intel Itanium processors — are failing to keep pace. With the future of the platform uncertain, independent software vendor (ISV) support for these systems is waning. As enterprises look for alternatives, Oracle’s SPARC and x86 systems running the Oracle Solaris operating system emerge as an obvious, and safe, choice for porting critical business applications. HP-UX and Oracle Solaris share a common UNIX history—and are more alike than they are different—making application porting a straightforward task. Once applications are ported to Oracle Solaris, developers can focus on application enhancements rather than worrying about adherence to operating system updates. A binary application guarantee ensures that applications ported to the Oracle Solaris Application Binary Interface will run without modification on all updates to Oracle Solaris as well as later releases of the operating system. In addition, source code compatibility between platforms ensures applications ported to SPARC systems can be recompiled easily on x86 systems and vice versa. This guide serves as a porting roadmap, providing insight into the issues and best practices to consider when porting applications from HP-UX 11i v3 to the Oracle Solaris operating system. Included is an overview of the differences between the HP-UX 11i v3, Oracle Solaris 10, and Oracle Solaris 11 environments, development tools, virtualization and clustering technologies, and more. Additional sections describe some of the advanced features of Oracle Solaris that are unique in the industry and may be unfamiliar to developers new to the platform. References to more detailed information are provided throughout the document and in Appendix G. Oracle Solaris For over two decades, Oracle Solaris has been the platform of choice for enterprise developers and ISVs. Providing a rich environment for strategic applications, Oracle Solaris combines key computing elements—operating system, networking, storage management, and user environment—into a stable, high- quality foundation that developers can depend on for creating and deploying solutions. Many innovations, including built-in virtualization technology, support for SPARC and x86 processor-based systems, massive scalability, rich security capabilities, debugging and analysis tools and more, make Oracle Solaris the best platform for developing and deploying enterprise applications. Oracle Solaris 11 raises the bar on the innovation introduced in Oracle Solaris 10. A wide range