1 Introduction to Setting Up an Application Development Environment in Oracle Solaris 11

Setting up an application development environment involves activities such as installing developer tools, installing and configuring web servers, installing databases and so on. Oracle Solaris 11 provides various packages and tools that enable you to develop applications. This guide covers the following topics:

Installing Software Useful for Application Development

The Oracle Solaris 11 OS provides various software packages that enable you to develop, debug, and maintain applications. The following packages are likely to be helpful when developing applications on the Oracle Solaris operating system.
  • developer/build/ant installs Apache Ant
  • developer/build/automake installs a makefile generator
  • developer/build/gnu-make installs a utility for directing compilation
  • developer/build/meson installs the Meson build configuration tool
  • developer/build/pkg-config installs a software configuration query tool
  • developer/dtrace/toolkit installs a collection of useful documented DTrace scripts
  • developer/debug/gdb installs the GNU project debugger
  • developer/debug/mdb installs the Solaris Modular Debugger, see Debugging Applications
  • developer/debug/valgrind installs the Valgrind memory debugging tool (x86 platforms only)
  • developer/gcc installs the GNU Compiler Collection, including compilers for C, C++, Objective C, Fortran, and Go
  • developer/java/jdk-8 installs the Java Platform Standard Edition Development Kit
  • developer/lexer/flex installs the Flex lexical analyzer
  • developer/llvm/clang installs the LLVM compilers for C and C++
  • developer/rust/rustc installs the Rust compiler
  • developer/ui-designer/glade installs the GNOME UI designer
  • developer/vala installs the Vala programming language
  • developer/versioning/git installs the Git version control system
  • developer/versioning/mercurial installs the Mercurial version control system
  • developer/versioning/subversion installs the Subversion version control system
  • group/feature/amp installs the AMP (Apache, MySQL, PHP) Deployment Kit for Oracle Solaris
  • group/feature/developer-gnu installs the GNU Development Tools
  • library/libmemcached installs an open source C/C++ client library and tools for the memcached server
  • runtime/perl-538 installs Perl
  • runtime/ruby installs Ruby & RubyGems
  • runtime/tcl-8 installs Tcl, a portable scripting environment
  • web/java-servlet/tomcat-9 installs the Tomcat Servlet/JSP Container
  • web/php installs the PHP server
  • web/proxy/squid installs the Squid web proxy cache
  • web/server/lighttpd-14 installs the Lighttpd web server

Tip:

To view a comprehensive list of packages useful for development, type pkg list -as 'developer/*' in a terminal window.

Use the pkg command to install or update a software. For example, to install Ruby, you would run the following command:

$ pkg install runtime/ruby

For information about the pkg command, see pkg(1) and Updating Systems and Adding Software in Oracle Solaris 11.4 .

Installing Oracle Developer Studio

Oracle Developer Studio consists of two suites of tools: a compiler suite and an analysis suite. The tools of each suite are designed to work together to provide an optimized development environment for the development of single, multithreaded, and distributed applications.

Oracle Developer Studio provides everything you need to develop C, C++, and Fortran applications to run in Oracle Solaris 10 or Oracle Solaris 11 on SPARC or x86 and x64 platforms, or in Oracle Linux on x86 and x64 platforms. The compilers and analysis tools are engineered to make your applications run optimally on Oracle Solaris systems.

The components of Oracle Developer Studio include:
  • IDE – An integrated development environment for application development in a graphical environment. The Oracle Developer Studio IDE integrates several other Oracle Developer Studio tools and uses Oracle Solaris technologies such as DTrace.
  • C compiler – Includes a C compiler, incremental link editor, and lint program.
  • C++ compiler – Includes a full-featured C++ compiler and interval arithmetic library.
  • Fortran compiler – Includes a full-featured environment and libraries for both f95 and f77.
  • dbx debugger – An interactive, source-level, command-line debugging tool.
  • dmake make tool – A command-line tool for building targets in distributed, parallel, or serial mode.
  • Math libraries – A floating-point environment that is supported by software and hardware on SPARC and x86 system that run the Oracle Solaris OS.
  • OpenMP – A portable, pragma-based parallel programming model for shared memory multiprocessor architectures. It is natively accepted and compiled by all three Oracle Developer Studio compilers.
  • Performance Analyzer – A GUI and command-line tool for collecting and analyzing performance data.
  • Thread Analyzer – A GUI and command-line tool for analyzing the execution of multithreaded programs and checking for a variety of multithreaded programming errors.
  • Oracle Performance Library – A library of Oracle-specific extensions and features for using optimized, high-speed mathematical subroutines for solving linear algebra and other numerically intensive problems.

Oracle Developer Studio is freely available for production use on Oracle Solaris and Linux operating systems. It is available both as an IPS package and a tar file. You can download Oracle Developer Studio from the Oracle Developer Studio web site.

Note:

To download the software you must have an Oracle web account. If you do not have an Oracle web account, you can sign up for free.

To install Oracle Developer Studio IPS packages, you must have a key and a certificate. Visit the Oracle Package Repositories site and follow the instructions to install the key and certificate.

Installing Web and Application Servers

As a developer, you might need an application server to test your programs, deploy your applications, and run test scenarios. This section describes the servers that you can install.

By default, the Apache web server package (web/server/apache-24) is included in solaris-minimal-server installation package.

Apache HTTP Server

Apache is a widely used open-source web server. Apache HTTP Server version 2.4 is available as an IPS package for the Oracle Solaris 11 operating system. For more information on the Apache HTTP Server, see the Apache documentation.

Installing the Apache HTTP Server

  1. Type the following command:
    $ pkg install web/server/apache-24

    Tip:

    Alternatively, you can install the group/feature/amp package. This package contains Apache HTTP Server, MySQL database, and PHP.
  2. Enable the server so that it listens to the incoming HTTP requests.
    $ svcadm -v enable /network/http:apache24
  3. To verify that the web server works, open the http://localhost:80 link in a web browser.
    A valid web page should be displayed.

Oracle iPlanet Web Server

Oracle iPlanet Web Server is a high-performance web server that improves web security, enhances the end-user experience, and reduces the cost and complexity of deploying and managing web applications. It is available on the Oracle Solaris, Windows, HP-UX, AIX, and GNU/Linux platforms. It supports the JSP and Java Servlet technologies, PHP, NSAPI, CGI, and ColdFusion.

Oracle iPlanet Web Server is available for download at the Oracle iPlanet Web Server website.

For installation instructions, see How to Install Oracle iPlanet Web Server.

Oracle HTTP Server

Oracle HTTP Server is the web server component for Oracle Fusion Middleware. It provides a listener for Oracle WebLogic Server and the framework for hosting static pages, dynamic pages, and applications over the web.

Oracle HTTP Server serves static content directly or through standard interfaces such as the WebDAV standard. It provides features such as single sign-on, clustered deployment, and high availability. You can use it as a proxy server, both forward and reverse. A reverse proxy enables content served by different servers to appear as if coming from a single server.

For more information, see the Oracle HTTP Server website.

Installing a Version Control System

Oracle Solaris does not have a proprietary version control system. However, you can install and configure an open-source version control system. Some of the open-source version control systems that are available as IPS packages are the following:
  • Git - developer/versioning/git
  • Mercurial - developer/versioning/mercurial
  • SCCS - developer/versioning/sccs
  • Subversion - developer/versioning/subversion

Installing a Database

The Oracle Solaris operating system supports Oracle, MySQL, Berkeley DB, PostgreSQL, and SQLite databases. Open-source databases might not be available as an IPS package and you have to download these software from third party websites.

The following sections provide brief installation information about Oracle and MySQL databases.

Oracle Database

Oracle Database is available in different editions, which can scale from small to large single servers and clusters of servers. To know the high-level information about different Oracle Database options, see Latest Oracle Database. Documentation links are at the bottom of the page.

Oracle Instant Client enables applications to connect local or remote Oracle Databases for development and production. You can install Oracle Instant Client on Oracle Solaris 11.3 or later versions using the command:

$ pkg install database/oracle/instantclient

For more information, see Oracle Instant Client.

Note:

As a pre-requisite to install the Oracle Database on Oracle Solaris, you must install the group/prerequisite/oracle/oracle-rdbms-server-12-1-preinstall group package. This group package has all the required packages.

MySQL Database

The MySQL database is available as an IPS package. For information about using MySQL, see MySQL 8.4 Reference Manual.

How to install the MySQL IPS Package
  1. Type the following command:
    $ pkg install database/mysql-84
    After the installation is complete, you must start the database.
  2. Start the database:
    $ svcadm enable mysql
  3. Type mysql in a terminal window to access the mysql> prompt.
    For example:
    mysql> show databases;
    Database
    information_schema
    mysql
    test
    3 rows in set (0.01 sec)
    
    mysql> quit;
    Bye

    For more information about tuning ZFS for database, see "Tuning ZFS for Database Products" in the Oracle Solaris 11.4 Tunable Parameters Reference Manual .

Debugging Applications

When you are developing an application, debugging the application becomes an important part of application development. Debugging tools are available that enable you to debug complex software systems effortlessly. The commonly used debugging tools are as follows:

Creating IPS Packages

In the Oracle Solaris 11 operating system, you should deliver the software you develop as Image Package System (IPS) packages. IPS packages are installed and updated from IPS repositories.

IPS is a framework for complete software life cycle management including packaging, installing, upgrading, and removing software. You must deliver software as IPS packages to obtain the following benefits:
  • Automatically calculate sufficient correct dependencies on other software
  • Automatically install or update dependency software as needed
  • Automatically refresh or restart necessary system services to perform tasks such as software configuration and automatically starting other dependent services
  • Form a single package, automatically install only the components appropriate for the existing system architecture, or other variants
  • Make updates in a new boot environment without modifying the existing boot environment
  • Enable users to easily verify whether the software installation is correct

For more information about creating IPS packages, see Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.4.

Configuring Boot Environments

A boot environment is a bootable instance of the Oracle Solaris operating system image along with any other software packages installed in that image. You can maintain multiple boot environments on your systems, and each boot environment can have different software versions installed. You can backup the current boot environment, you can update software without any risk of loss of data or the system environment. You can also update a boot environment that is currently not active. Use the beadm(1M) utility to create and manage boot environments.

You can use zones which can help you to maintain multiple boot environments with different versions of software installed. Zones can be a huge advantage when you do not have to reboot the system to access another environment. You can also use kernel zones to maintain different versions of OS. Oracle Solaris allows you to have several non-global zones, several kernel zones, and non-global zones inside a kernel zone. You can easily ssh to one of the zones without rebooting the physical machine.

For more information about boot environments, see Creating and Administering Oracle Solaris 11.4 Boot Environments.