- 1 Developing Software in OpenSolaris OS
- 2 C/C++/Fortran Development
- 3 Setting Up Your Build Environment
- 4 Java Development
- 5 PHP Development
- 5.1 More Information
- 6 Python Development
- 7 Perl Development
- 8 Ruby/Rails Development
- 9 Application Servers
- 10 MySQL DB
- 11 Using NetBeans IDE
- 11.1 Installing NetBeans IDE From the IPS Repository
- 11.2 Available NetBeans Packages
- 11.3 More Information
- 12 Application Development-Quick Reference
Developing Software in OpenSolaris OS
OpenSolaris OS provides a flexible and scalable platform for developing applications targeting multiple platforms. It also enables developers to build applications and solutions in a variety of programming languages including C/C++, Java, PHP, and Ruby.
The tools that enable you to build web, server-side or stand-alone applications are available through the following channels:
- Official IPS Repository - If the tools are not already bundled with the OS, you can download and configure them directly from the OpenSolaris IPS repository. (Recommended)
- Product Sites - If a software is not available from the IPS repository, you can download the software directly from the product site. For instance, you can directly download the NetBeans IDE from the NetBeans product site.
- Source Repository - If an IPS or SVR package is not available for your preferred application, you can obtain the source for the application and build them using the build tools available for OpenSolaris OS.
For more information, refer to the section on available applications for OpenSolaris OS.
For information on Image Packaging System, read the IPS Guide
This document shows you how you can set up your development environment for the OpenSolaris 2008.11 release, through additional software packages available in the official IPS repository.
Complete Web Development Stack
OpenSolaris OS offers complete support for developing and deploying applications for the web. Some of the most commonly used open source applications/servers and frameworks are bundled and made available for the OS. These applications comprise the Web Stack and includes several open source applications that are optimized for the OpenSolaris OS.
What do you get from Web Stack?
- Server Software - Apache Web Server, Squid Proxy Server.
- DB Software - MySQL Server, PostgreSQL Server.
- Programming Environment - PHP, Perl, Ruby, and Python.
- Caching Software - Memcached.
| Note Web Stack is not bundled with OpenSolaris OS. You need to download the package separately from the IPS repository. |
For more information on getting this stack, refer to the following document:
C/C++/Fortran Development
Sun Studio Express 11/08 delivers high-performance, optimizing C, C, and Fortran compilers for the OpenSolaris OS. Sun Studio's optimizing C, C and Fortran compilers, combined with the NetBeans-based IDE, deliver outstanding performance and productivity for single and multi-threaded application development.
The Sun Studio IDE delivers an integrated tool chain with advanced graphical code and memory debuggers, performance analysis tools, and optimized libraries. With compiler auto-parallelization, OpenMP v3.0 support, multithreaded debugging, and thread debugging and analysis, developers can more easily create, debug, and tune their applications to take advantage of the newest multicore architectures.
Sun Studio Express 11/08
The Sun Studio Express 11/08 release is a fully functional release that focuses on new features in the Sun Studio product. This express release is based on the Sun Studio Express November 2008 build, and is tailored for use and distribution in the OpenSolaris environment.
The features that have been added or changed since the Sun Studio 12 release are described in the Sun Studio Express November 2008 page.
The Sun Studio Express 11/08 release is available for download and installation as a single package in the Open Solaris Binary Repository. It is also part of a cluster of packages, called ss-dev, which includes gmake and Java Development Kit. For a complete list of packages in the ss-dev package, see the Sun Studio Express 11/08 Packages table.
| Warning The sunstudio package in the repository points to the sunstudioexpress package. |
To install the Sun Studio Express package, execute the following command:
$ pfexec pkg install sunstudioexpress
After you have installed the Sun Studio Express 11/08 release, the Sun Studio software is available in /usr/bin and the Sun Studio man pages are available in /usr/man. If necessary, update your PATH and MANPATH environment variables respectively to include these paths.
To view documentation for Sun Studio 12 software, the latest official release of the Sun Studio product, see the Sun Studio Information Center.
Sign on to the Sun Studio User Forums to post questions to Sun engineering and the community. Be sure to state that you are using the Sun Studio Express 11/08 release.
Sun Studio Express 11/08 Packages
Sun Studio Express 11/08 is available as an individual package (sunstudioexpress) and also as part of a larger cluster of packages(ss-dev). The following table lists the components of the ss-dev package:
| Component Name | Package Name | Version | Description |
|---|---|---|---|
| Sun Studio Express | sunstudioexpress | 0.2008.11 | Sun Studio Express: C, C++, and Fortran compilers and tools |
| SUNWj6dmo | 1.6.0_04 | JDK 6.0 Demo Programs | |
| SUNWj6cfg | 1.6.0_04 | JDK 6.0 Host Configuration | |
| SUNWj6rtx | 1.6.0_04 | JDK 6.0 64-bit Runtime Environment | |
| SUNWj6rt | 1.6.0_04 | JDK 6.0 Runtime Environment | |
| SUNWj6man | 1.6.0_04 | JDK 6.0 Man Pages | |
| SUNWj6dvx | 1.6.0_04 | JDK 6.0 Dev Tools | |
| SUNWj6dev | 1.6.0_04 | JDK 6.0 64-bit Dev Tools | |
| SUNWj6dmx | 1.6.0_04 | JDK 6.0 64-bit Demo Programs | |
| automake | SUNWgnu-automake-19 | 1.9.6 | GNU Automake 1.9.6 |
| SUNWgnu-automake-110 | 1.10 | GNU Automake 1.10 | |
| libtool | SUNWlibtool | 1.5.22 | libtool-GNU libtool utility |
| flex | SUNWflexlex | 2.5.33 | Flex Lexer |
| bison | SUNWbison | 2.3 | bison — A YACC Replacement |
| make | SUNWsprot | Solaris bundled tools | |
| gmake | SUNWgmake | 3.8.1 | gmake-GNU make |
| cvs | SUNWcvs | 1.12.13 | The CVS version control system |
Using GNU gcc tools
gcc compilers are available from the official IPS repository for installation. To install the gcc-dev package, execute the following command:
$ pfexec pkg install gcc-dev
Setting Up Your Build Environment
In OpenSolaris OS, you can setup a complete build environment for C/C++/Java type of applications without performing any complex task. You just need to install the relevant packages and alter your PATH environment variable.
Before you begin getting the relevant packages, you need to make sure that your software catalog is updated:
$ pfexec pkg refresh --full
Then you may need to install the necessary development/build tools like gcc, flex, bison by installing the IPS packages:
$ pfexec pkg install gcc-dev amp-dev java-dev ss-dev SUNWscp SUNWgnu-idn SUNWlibevent SUNWugenu SUNWbison SUNWflexruntime SUNWflexlex SUNWtoo SUNWgmake SUNWaconf SUNWlibtool SUNWgm4 SUNWgnu-automake-110
You may need to install additional development packages based your build requirement.
If you need to build your applications using the earlier Sun Studio 11 compilers, you can manually download the install images . You can also install the Sun Studio Express 11/08 packages by executing the following command:
$ pfexec pkg install sunstudioexpress
Java Development
The Java Runtime Environment (JRE) is already bundled with OpenSolaris OS. But for Java development, you need to download and install the Java Development Kit either form http://java.sun.com or from the official IPS repository. To enable Java development support, execute the following command:
$ pkg install java-dev
| Note If you have already downloaded and configured NetBeans IDE, chances are that you already have the Java Development Kit. To test your environment, execute the command javac -version to get the version number of the Java Development Kit. |
Where is Java Installed?
When you download and install the java-dev package, the binaries will be available from /usr/bin.
PHP Development
OpenSolaris OS supports PHP development through Web Stack software. When you download and configure the PHP engine available through Web Stack, you can use any IDE like NetBeans IDE to build PHP based web applications.
More Information
For more information, refer to:
- PHP Support in OpenSolaris OS
- Where is PHP installed?
- Bundled PHP Extensions
- Managing PHP Extensions
- Using the Web Stack GUI for PHP Configuration
PHP environment can also be configured for OpenSolaris OS by downloading and installing the CoolStack packages.
Python Development
Python 2.4.4 is already installed in this release. You do not need to install any additional packages.
Perl Development
Perl is available under /usr/perl5/5.8.4.
Ruby/Rails Development
Rails is a full-stack framework for developing database-backed web applications. Rails provide a pure-Ruby development environment. Ruby gems is the standard Ruby package manager. If you have successfully installed the ruby-dev package, ruby gems are already loaded.
For more information, refer to the following link:
Application Servers
OpenSolaris OS supports most of the widely used web application servers including Apache Web Server (through Web Stack software) and GlassFish Application Server (Open Source Java EE based application server).
Apache Web Server
Apache Web Server can be obtained by downloading and installing the Web Stack bundle. For more information, refer to the following links:
- Setting Up Your Server Environment
- Where is Apache Web Server Installed
- Administering Apache Web Server
- Information on Apache Web Server Files
- Setting Up a Secure Website
GlassFish Application Server
GlassFish Application Server is available through the IPS repository. To install GlassFish Application Server v2, execute the following command:
$ pfexec pkg install glassfishv2
Tomcat Web Container
Web Stack comes with Tomcat 6.0 Servlet container for deploying your JSP based web applications.
For more information, refer to the Web Stack Getting Started Guide
MySQL DB
MySQL server is the most widely used relational database server and hence MySQL package is available for download from the IPS repository. For more information, refer to the following links:
Using NetBeans IDE
The NetBeans IDE 6.5 release provides several new features and enhancements, such as a new IDE-wide QuickSearch shortcut, more user-friendly interface, and automatic Compile on Save. In addition to full support of all Java editions (Java SE, Java EE, Java ME), the NetBeans IDE is the ideal tool for software development with PHP, C/C++, Groovy and Grails, Ruby and Rails, Ajax and JavaScript. The 6.5 release also includes enhanced support for web frameworks (Hibernate, Spring, JSF, JPA), the GlassFish application server, and databases.
The changes since the NetBeans IDE 6.5 release are described in the NetBeans IDE 6.5 Release Notes .
The NetBeans IDE 6.5 release is available for downloading and installation as a single package in the OpenSolaris Binary Repository. The {{netbeans}}package includes 26 components and each package can also be installed individually. For a list of all the packages that are contained in the {{netbeans}}package, see the NetBeans Packages .
Installing NetBeans IDE From the IPS Repository
Use the following command to install the NetBeans package from the IPS repository.
$ pfexec pkg install netbeans
For NetBeans IDE 6.5 documentation, see the NetBeans Documentation,Training & Support page. Join the NetBeans community, where you can subscribe to mailing lists, search the mailing list archives, and check the NetBeans User FAQs.
Available NetBeans Packages
This table lists all the NetBeans packages that are available in the http://pkg.opensolaris.org:80 repository. The {{netbeans}}package is a super-set of all the packages listed in the table below.
| Package Name | Description |
|---|---|
| netbeans-desktop | NetBeans Gnome desktop integration |
| netbeans-ide | Base NetBeans package |
| netbeans-java | NetBeans Web & Java EE distribution |
| netbeans-javase | NetBeans Java SE distribution |
| netbeans-full | Full NetBeans distribution |
| netbeans-php | NetBeans PHP distribution |
| netbeans-ruby | NetBeans Ruby distribution |
| netbeans-cpp | NetBeans C/C++ distribution |
| libnb-apisupport | NetBeans cluster API support |
| libnb-cnd | NetBeans C/C++ support |
| libnb-enterprise | NetBeans Java EE support. |
| libnb-groovy | NetBeans Groovy support |
| libnb-gsf | NetBeans Common Scripting Language support |
| libnb-ide | NetBeans cluster IDE |
| libnb-identity | NetBeans cluster identity |
| libnb-java | NetBeans Java support |
| libnb-php | NetBeans PHP support |
| libnb-platform | NetBeans platform |
| libnb-profiler | NetBeans profiler |
| libnb-ruby | NetBeans Ruby support |
| libnb-soa | NetBeans SOA support |
| libnb-uml | NetBeans UML support |
| libnb-visualweb | NetBeans Web support |
| libnb-webcommon | NetBeans cluster webcommon |
| libnb-websvccommon | NetBeans cluster websvccommon |
| libnb-xml | NetBeans XML support |
More Information
For more information, refer to the following links:
- NetBeans IDE as a Development Environment
- Where is NetBeans IDE Installed
- Configuring Tomcat Server with NetBeans IDE
- Configuring WEBrick Server with NetBeans IDE
- Languages and Applications Support in NetBeans IDE
- NetBeans IDE for PHP Development
Application Development-Quick Reference
The following table provides you some information on the software available in OpenSolaris OS:
| Category | Available Software | Available Location |
|---|---|---|
| Text Editor | gedit | Bundled, IPS Repository |
| HTML Editor | Bluefish | IPS Repository |
| Development IDE (Java, Ruby/Rails, PHP development) | NetBeans IDE | IPS Repository, NetBeans Site |
| Web Server | Apache Web Server | IPS Repository (through Web Stack software) |
| Application Server | GlassFish Application Server | IPS Repository, GlassFish Site |
| Database Server | MySQL DB | IPS Repository (through Web Stack software), MySQL Site |
| C/C++ Compilers | Sun Studio Compilers, GNU gcc tools | IPS Repository] |
| PHP Engine | PHP (Web Stack) | IPS Repository (through Web Stack software) |
| Java Development Kit (JDK) | Sun Java SE Development Kit | IPS Repository |
| Perl | Perl Runtime | Bundled |
| Python | Python Interpreter | Bundled |
| Build Tools | make [Solaris), make(GNU) | IPS Repository |

