此内容没有您所选择的语言版本。

Chapter 4. Specifics of Individual Software Collections


This chapter is focused on the specifics of certain Software Collections and provides additional details concerning these components.

4.1. Red Hat Developer Toolset

Red Hat Developer Toolset is designed for developers working on the Red Hat Enterprise Linux platform. Red Hat Developer Toolset provides current versions of the GNU Compiler Collection, GNU Debugger, Eclipse development platform, and other development, debugging, and performance monitoring tools. Similarly to other Software Collections, an additional set of tools is installed into the /opt/ directory. These tools are enabled by the user on demand using the supplied scl utility. Similarly to other Software Collections, these do not replace the Red Hat Enterprise Linux system versions of these tools, nor will they be used in preference to those system versions unless explicitly invoked using the scl utility.
For an overview of features, refer to the Main Features section of the Red Hat Developer Toolset Release Notes.
For a complete list of components, see the Red Hat Developer Toolset Components table in the Red Hat Developer Toolset User Guide.
Note that since Red Hat Developer Toolset 3.1, Red Hat Developer Toolset requires the rh-java-common Software Collection.

4.2. Thermostat 1

The Thermostat Software Collection provides a monitoring and instrumentation tool for the OpenJDK HotSpot JVM, with support for monitoring multiple JVM instances. The system is made up of two components: an Agent, which collects data, and a Client, which allows users to visualize collected data. These components communicate via a storage layer: either directly via MongoDB or indirectly via a Web layer for increased security. A pluggable agent and GUI framework allows for collection and visualization of performance data beyond what is included out of the box.
To install the thermostat1 collection, type the following command as root:
yum install thermostat1
Note that since Red Hat Software Collections 2.0, the thermostat1 Software Collection requires the rh-java-common Collection.
To enable the thermostat1 collection, type the following command at a shell prompt:
scl enable thermostat1 bash
For more information, refer to the Thermostat User Guide. In order to deploy Thermostat securely, see the Configuration and Administration Guide.

4.3. Ruby on Rails 4.2

Red Hat Software Collections 2.2 adds the rh-ruby23 Software Collection together with the rh-ror42 Collection.
To install Ruby on Rails 4.2, type the following command as root:
yum install rh-ror42
Installing any package from the rh-ror42 Software Collection automatically pulls in rh-ruby23 and rh-nodejs4 as dependencies.
The rh-nodejs4 Collection is used by certain gems in an asset pipeline to post-process web resources, for example, sass or coffee-script source files. To run the rails s command without requiring rh-nodejs4, disable the coffee-rails and uglifier gems in the Gemfile.
The Ruby on Rails Collection can be enabled by the following command, which will automatically enable rh-ruby23:
scl enable rh-ror42 bash
These two Collections are supported together and available only for Red Hat Enterprise Linux 7. On Red Hat Enterprise Linux 6, use the rh-ruby22 and rh-ror41 Software Collections.

4.4. MongoDB 3.2

To install the rh-mongodb32 collection, which is available for Red Hat Enterprise Linux 7, type the following command as root:
yum install rh-mongodb32
Note that the rh-mongodb32 Software Collection requires the rh-java-common Collection.
To run the MongoDB shell utility, type the following command:
scl enable rh-mongodb32 'mongo'
To start the MongoDB daemon, type the following command as root:
systemctl start rh-mongodb32-mongod.service
To start the MongoDB daemon on boot, type this command as root:
systemctl enable rh-mongodb32-mongod.service
To start the MongoDB sharding server, type the following command as root:
systemctl start rh-mongodb32-mongos.service
To start the MongoDB sharding server on boot, type this command as root:
systemctl enable rh-mongodb32-mongos.service
Note that the MongoDB sharding server does not work unless the user starts at least one configuration server and specifies it in the mongos.conf file.

4.5. DevAssistant

DevAssistant is a tool designed to assist developers with creating and setting up basic projects in various programming languages, installing dependencies, setting up a development environment, and working with source control. The devassist09 Software Collection supports several programming languages, namely C, C++, Java, and Python. Additionally, DevAssistant is able to support working with any other language, framework, or tool due to its modular architecture.
DevAssistant is a framework that runs plug-ins called assistants. Each assistant can have several subassistants.

4.5.1. Getting Started with DevAssistant

To install the devassist09 Software Collection, type the following command as root:
yum install devassist09
To enable this collection, type the following command at a shell prompt:
scl enable devassist09 bash
To get help for DevAssistant, use the following command:
devassistant --help
or the shorter variant of the same command:
da -h
It is advisable to use the --help option on each level to list your possible next steps, until you reach the level of an executable subassistant (see Example 4.1, “Creating a New Python Library Project”).
To access the graphical user interface, type this command at a shell prompt:
devassistant-gui
or the shortened variant:
da-gui
Please note that the GUI is available only if you install the devassist09 Software Collection on Red Hat Enterprise Linux 7. The functionalities and procedures are the same as when using the command line interface.
Note that the devassistant and da commands are equal. Further in the text, we will use only the shorter variant, the da command.

4.5.2. Running Assistants

DevAssistant provides the following functionalities: create, modify, prepare, and task. To run an assistant, use the following command:
da [--debug] {create,modify,prepare,task} [assistant [arguments]] ...
The four basic commands and descriptions related to these functionalities are listed in the following table:
Table 4.1. Functionalities of DevAssistant
Command Shortened Command Description
da create da crt Creating a new project from scratch
da modify da mod Working with an existing project
da prepare da prep Preparing a development environment for an upstream project
da task Performing a custom task not related to a specific project
The devassist09 Software Collection does not include any assistants for the modify, prepare, and task functionalities. These categories are available for users who want to create their own assistants.

4.5.3. Creating Projects with DevAssistant

The devassist09 Software Collection includes the following assistants for creating projects:
Table 4.2. Assistants for Creating Projects
Assistant Subassistant Description
c app An application in C
lib A dynamically linked library in C
cpp app An application in C++
lib A dynamically linked library in C++
java maven A simple project using Maven
python lib A simple library for Python
The following example demonstrates creating a new Python library project by following instructions displayed by the --help option.

Example 4.1. Creating a New Python Library Project

To create a new Python library project, complete the following steps:
  1. Enable the devassist09 Software Collection by running this command:
    ~]$ scl enable devassist09 bash
  2. Display help about DevAssistant by using the --help option:
    ~]$ da --help
    You can either run assistants with:
    da [--debug] {create,modify,prepare,task} [ASSISTANT [ARGUMENTS]] ...
    
    Where:
    create   used for creating new projects
    modify   used for working with existing projects
    prepare  used for preparing environment for upstream projects
    task     used for performing custom tasks not related to a specific project
    You can shorten "create" to "crt", "modify" to "mod" and "prepare" to "prep".
    
    Or you can run a custom action:
    da [--debug] [ACTION] [ARGUMENTS]
    
    Available actions:
    help     Print detailed help
    version  Print version
  3. List the possible next steps for creating a project by typing:
    ~]$ da create --help
    usage:  create [-h] [--deps-only] {c,cpp,java,python} ...
    
    Kickstart new projects easily with DevAssistant.
    
    optional arguments:
      -h, --help           show this help message and exit
      --deps-only          Only install dependencies
    
    subassistants:
      Following subassistants will help you with setting up your project.
    
      {c,cpp,java,python}
  4. Display help on the python assistant by typing at a shell prompt:
    ~]$ da create python --help
    usage: create python [-h] {lib} ...
    
    This is a base Python assistant, you have to select a subassistant.
    
    optional arguments:
      -h, --help  show this help message and exit
    
    subassistants:
      Following subassistants will help you with setting up your project.
    
      {lib}
    
  5. List your choices for the only python subassistant, lib, by running this command:
    ~]$ da create python lib --help
    usage: create python lib [-h] [-e [ECLIPSE]] -n NAME
    
    Scaffolds a simple Python library project.
    
    optional arguments:
      -h, --help            show this help message and exit
      -e [ECLIPSE], --eclipse [ECLIPSE]
                            Configure as Eclipse project (uses ~/workspace or
                            specified directory)
      -n NAME, --name NAME  Name of project to create
  6. Run the assistant to create your new Python library project named mypythonlib by using the following command:
    ~]$ da create python lib -n mypythonlib
To get more information about the upstream version of DevAssistant, refer to the DevAssistant User Documentation. Please note that though the basic concept of the upstream application is the same as in the devassist09 Software Collection, individual plug-ins and their functionalities might differ.

4.5.4. Backward Compatibility in DevAssistant

The updated version of DevAssistant can cause incompatibility in assistants that have not been provided by the devassist09-devassistant-assistants-dts package, that is, in your own assistants.
  • Since DevAssistant 0.9.3, the variable names in the assistant files are no longer derived from the argument flags but from the argument names. In the following example, the $foo variable is initialized instead of the $bar variable:
    args:
       foo:
         ...
         flags: [-b, --bar]
         ...
    
  • Unknown attributes in the arguments section in the assistant file are no longer allowed. Since DevAssistant 0.9.3, an error message is returned in the following example because the unknown_attribute is not known to the parser:
    args:
       foo:
         ...
         unknown_attribute: foo bar baz
         ...
    

4.6. Maven

The rh-maven33 Software Collection provides a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting, and documentation from a central piece of information.
To install the rh-maven33 Collection, type the following command as root:
yum install rh-maven33
To enable this collection, type the following command at a shell prompt:
scl enable rh-maven33 bash
Global Maven settings, such as remote repositories or mirrors, can be customized by editing the /opt/rh/rh-maven33/root/etc/maven/settings.xml file.
For more information about using Maven, refer to the Maven documentation. Usage of plug-ins is described in this section; to find documentation regarding individual plug-ins, see the index of plug-ins.

4.7. Passenger

The rh-passenger40 Software Collection provides Phusion Passenger, a web and application server designed to be fast, robust and lightweight.
The rh-passenger40 Collection supports multiple versions of Ruby, particularly the ruby193, ruby200, and rh-ruby22 Software Collections together with Ruby on Rails using the ror40 or rh-ror41 Collections. Prior to using Passenger with any of the Ruby Software Collections, install the corresponding package from the rh-passenger40 Collection: the rh-passenger-ruby193, rh-passenger-ruby200, or rh-passenger-ruby22 package.
The rh-passenger40 Software Collection can also be used with Apache httpd from the httpd24 Software Collection. To do so, install the rh-passenger40-mod_passenger package. Refer to the default configuration file /opt/rh/httpd24/root/etc/httpd/conf.d/passenger.conf for an example of Apache httpd configuration, which shows how to use multiple Ruby versions in a single Apache httpd instance.
Additionally, the rh-passenger40 Software Collection can be used with the nginx 1.6 web server from the nginx16 Software Collection. To use nginx 1.6 with rh-passenger40, you can run Passenger in Standalone mode using the following command in the web appplication's directory:
scl enable nginx16 rh-passenger40 'passenger start'
Alternatively, edit the nginx16 configuration files as described in the upstream Passenger documentation.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.