• No results found

Guide to Red Hat Enterprise Linux 6 Software Collections

N/A
N/A
Protected

Academic year: 2021

Share "Guide to Red Hat Enterprise Linux 6 Software Collections"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)

Red Hat Enterprise Linux 6

Software Collections Guide

A guide to Software Collections for Red Hat Enterprise Linux

(2)

Software Collections Guide Draft

Red Hat Enterprise Linux 6 Software Collections Guide

A guide to Software Collections for Red Hat Enterprise Linux

Edition 0

Author Petr Kovář pkovar@redhat.com

Copyright © 2012 Red Hat, Inc.

The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.

Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries.

Java® is a registered trademark of Oracle and/or its affiliates.

XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.

MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.

All other trademarks are the property of their respective owners. 1801 Varsity Drive

Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701

The Software Collections Guide provides an explanation of Software Collections and details how to build and package them. Developers and system administrators who have a basic understanding of software packaging with RPM packages, but who are new to the concept of Software Collections, can use this Guide to get started with Software Collections.

Note: This document is under development, is subject to substantial change, and is provided only as a preview. The included information and instructions should not be considered complete, and should be used with caution.

(3)

Draft Draft

Preface v

1. Document Conventions ... v

1.1. Typographic Conventions ... v

1.2. Pull-quote Conventions ... vi

1.3. Notes and Warnings ... vii

2. Getting Help and Giving Feedback ... vii

2.1. Do You Need Help? ... vii

2.2. We Need Feedback! ... viii

3. Acknowledgments ... viii

1. Ruby 1.9.3 Software Collection 1

1.1. What is the Ruby 1.9.3 Software Collection ... 1

1.2. Main Features of the Ruby 1.9.3 Software Collection ... 1

1.3. Installing the Ruby 1.9.3 Software Collection ... 1

1.4. Uninstalling the Ruby 1.9.3 Software Collection ... 1

1.5. Using the Ruby 1.9.3 Software Collection ... 2

1.5.1. Using the Ruby Itself ... 2

1.5.2. Using the Included Tools ... 2

1.5.3. Using the Ruby on Rails Stack ... 3

2. Getting More Information 5

(4)
(5)

Draft Draft

Preface

1. Document Conventions

This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information.

In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts1

set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not,

alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the Liberation Fonts set by default.

1.1. Typographic Conventions

Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows.

Mono-spaced Bold

Used to highlight system input, including shell commands, file names and paths. Also used to highlight keycaps and key combinations. For example:

To see the contents of the file my_next_bestselling_novel in your current working directory, enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command.

The above includes a file name, a shell command and a keycap, all presented in mono-spaced bold and all distinguishable thanks to context.

Key combinations can be distinguished from keycaps by the hyphen connecting each part of a key combination. For example:

Press Enter to execute the command.

Press Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 to return to your X-Windows session.

The first paragraph highlights the particular keycap to press. The second highlights two key combinations (each a set of three keycaps with each set pressed simultaneously).

If source code is discussed, class names, methods, functions, variable names and returned values mentioned within a paragraph will be presented as above, in mono-spaced bold. For example:

File-related classes include filesystem for file systems, file for files, and dir for directories. Each class has its own associated set of permissions.

Proportional Bold

This denotes words or phrases encountered on a system, including application names; dialog box text; labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:

Choose System → Preferences → Mouse from the main menu bar to launch Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click

(6)

Preface Draft Close to switch the primary mouse button from the left to the right (making the mouse

suitable for use in the left hand).

To insert a special character into a gedit file, choose Applications → Accessories → Character Map from the main menu bar. Next, choose Search → Find… from the Character Map menu bar, type the name of the character in the Search field and click Next. The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the Copy button. Now switch back to your document and choose Edit → Paste from the gedit menu bar.

The above text includes application names; system-wide menu names and items; application-specific menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all distinguishable by context.

Mono-spaced Bold Italic or Proportional Bold Italic

Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable text. Italics denotes text you do not input literally or displayed text that changes depending on circumstance. For example:

To connect to a remote machine using ssh, type ssh username@domain.name at a shell prompt. If the remote machine is example.com and your username on that machine is john, type ssh john@example.com.

The mount -o remount file-system command remounts the named file system. For example, to remount the /home file system, the command is mount -o remount /home.

To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release.

Note the words in bold italics above — username, domain.name, file-system, package, version and release. Each word is a placeholder, either for text you enter when issuing a command or for text displayed by the system.

Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example:

Publican is a DocBook publishing system.

1.2. Pull-quote Conventions

Terminal output and source code listings are set off visually from the surrounding text. Output sent to a terminal is set in mono-spaced roman and presented thus:

books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs

Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:

package org.jboss.book.jca.ex1;

(7)

Draft Notes and Warnings

public class ExClient {

public static void main(String args[]) throws Exception

{

InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref;

Echo echo = home.create(); System.out.println("Created Echo");

System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); }

}

1.3. Notes and Warnings

Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.

Note

Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier.

Important

Important boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled 'Important' will not cause data loss but may cause irritation and frustration.

Warning

Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

2. Getting Help and Giving Feedback

2.1. Do You Need Help?

If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer Portal at http://access.redhat.com. Through the customer portal, you can:

• search or browse through a knowledgebase of technical support articles about Red Hat products. • submit a support case to Red Hat Global Support Services (GSS).

(8)

Preface Draft • access other product documentation.

Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/ listinfo. Click on the name of any mailing list to subscribe to that list or to access the list archives.

2.2. We Need Feedback!

If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http://bugzilla.redhat.com/

against the product Red Hat Developer Toolset.

When submitting a bug report, be sure to mention the manual's identifier:

doc-Software_Collections_Guide

If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.

3. Acknowledgments

The author of this book would like to thank the following people for their valuable contributions: Jindřich Nový, Marcela Mašláňová, Bohuslav Kabrda, Florian Nadge, Stephen Wadeley, Douglas Silas, and Vít Ondruch, among many others.

(9)

Draft Chapter 1. Draft

Ruby 1.9.3 Software Collection

This chapter discusses the Ruby 1.9.3 Software Collection.

1.1. What is the Ruby 1.9.3 Software Collection

The Ruby 1.9.3 Software Collection contains the whole Ruby on Rails stack version 3.2.3. While the primary focus of the Ruby 1.9.3 Software Collection is development and testing, you can also use it as a deployment platform. Thanks to the design of Software Collections, the Ruby 1.9.3 Software Collection does not replace the system version of Ruby or Gems. Instead, the Ruby 1.9.3 Software Collection is installed in parallel with the system version, allowing the users to choose which version they want to use.

1.2. Main Features of the Ruby 1.9.3 Software Collection

The Ruby 1.9.3 Software Collection is distributed as a group of packages that contain: • Matz's Ruby Interpreter (MRI Ruby) version 1.9.3;

• Ruby on Rails stack version 3.2.3 with all its dependencies; • included asset management packages;

• included JavaScript runtime engine (Mozilla SpiderMonkey);

• frequently used Ruby testing tools, for example Minitest and RSpec. Some of the advantages of the Ruby 1.9.3 Software Collection are: • ease of use;

• installation of the whole Ruby on Rails 3.2.3 stack in a single step;

• installation in parallel with the system versions of Ruby and Ruby on Rails.

1.3. Installing the Ruby 1.9.3 Software Collection

To install the Ruby 1.9.3 Software Collection, type the following at a shell prompt as root:

yum install ruby193

This installs all the packages needed for runtime of a basic Ruby on Rails application written for Ruby on Rails 3.2.3. Note that if you want to install the debuginfo or documentation packages, you need to install them separately because these packages are not installed automatically.

To install the debuginfo or documentation packages, run the following command:

yum install package_name

where package_name is ,for example, ruby193-rubygem-uglifier-doc, which installs documentation for the uglifier Gem.

1.4. Uninstalling the Ruby 1.9.3 Software Collection

To completely uninstall the Ruby 1.9.3 Software Collection, type the following at a shell prompt as root:

(10)

Chapter 1. Ruby 1.9.3 Software Collection Draft

yum remove ruby193\*

The command above removes all the packages that are part of the Ruby 1.9.3 Software Collection.

1.5. Using the Ruby 1.9.3 Software Collection

All Ruby-specific commands run in the Ruby 1.9.3 Software Collection are identical to those run with the system version. The only difference is that you need to add scl enable ruby193 at the beginning of each of the Ruby-specific commands that you wish to run in the Ruby 1.9.3 Software Collection. The examples below detail how to run the Ruby-specific commands in the Ruby 1.9.3 Software Collection.

1.5.1. Using the Ruby Itself

To run a script named script.rb using the MRI Ruby interpreter included in the Ruby 1.9.3 Software Collection, run the following command:

scl enable ruby193 "ruby script.rb"

To run an interactive Ruby session (IRB), run the following command:

scl enable ruby193 irb

1.5.2. Using the Included Tools

The Ruby 1.9.3 Software Collection includes many helpful tools, for example testing libraries. The examples below detail how to run the included tools in the Ruby 1.9.3 Software Collection. For example, where you would normally run the following:

RUBYOPT="-Ilib" rspec spec

execute the following command to do the same in the Ruby 1.9.3 Software Collection:

scl enable ruby193 - << \EOF RUBYOPT="-Ilib" rspec spec EOF

Note the difference between the usage of the scl enable ruby193 command in Section 1.5.2, “Using the Included Tools” and in Section 1.5.1, “Using the Ruby Itself”.

When running simple commands, use the following syntax:

scl enable ruby193 "simple_command --with_parameters"

To run multiple commands in a certain order (or to specify an environment variable for a command), you need to pass a heredoc to the scl enable ruby193 command as follows:

scl enable ruby193 - << \EOF command1 --with_parameters command2 --with_parameters

...

(11)

Draft Using the Ruby on Rails Stack

EOF

1.5.3. Using the Ruby on Rails Stack

Using the Ruby on Rails stack in the Ruby 1.9.3 Software Collection is as simple as using any other commands. To create a simple application, users usually use the following commands (assuming that Ruby on Rails and its dependencies are already installed):

rails new app cd app

rails s

The commands above launch the server so that you can the browse the server address

http://0.0.0.0:3000 in your browser to see the introduction page of the newly created Ruby on Rails application.

To do this with the Ruby 1.9.3 Software Collection, you can follow two different procedures.

The first procedure is to run every command that is specific to the Ruby 1.9.3 Software Collection with the prefix scl enable ruby193 as follows:

scl enable ruby193 "rails new app" cd app

scl enable ruby193 "rails s"

The second procedure is to run a new shell in the Ruby 1.9.3 Software Collection environment and then run all the commands in the new shell without the prefix scl enable ruby193, as follows:

scl enable ruby193 bash rails new app

cd app rails s

Note that the second procedure is much simpler and faster, as it only requires to run the shell in the Ruby 1.9.3 Software Collection environment and you do not have to use any prefixes specific to the Ruby 1.9.3 Software Collection when running commands in the shell.

(12)
(13)

Draft Chapter 2. Draft

Getting More Information

For more information on Software Collection packaging, refer to the resources listed below.

Installed Documentation

• scl(1) – The manual page for the scl tool for enabling Software Collections and running programs in Software Collection's environment.

• scl --help – General usage information for the scl tool for enabling Software Collections and running programs in Software Collection's environment.

• rpmbuild(8) – The manual page for the rpmbuild utility for building both binary and source packages.

Online Documentation

Red Hat Enterprise Linux 6 Developer Guide1 – The Developer Guide for Red Hat Enterprise Linux 6 provides detailed information on the Eclipse IDE, libraries and runtime support, compiling and building, debugging, and profiling.

Red Hat Enterprise Linux 6 Installation Guide2 – The Installation Guide for Red Hat Enterprise Linux 6 provides more details on getting, installing, and updating the system.

Red Hat Enterprise Linux 5 Installation Guide3 – The Installation Guide for Red Hat Enterprise Linux 5 provides more details on getting, installing, and updating the system.

Red Hat Enterprise Linux 6 Deployment Guide4 – The Deployment Guide for Red Hat Enterprise Linux 6 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 6.

Red Hat Enterprise Linux 5 Deployment Guide5 – The Deployment Guide for Red Hat Enterprise Linux 5 documents relevant information regarding the deployment, configuration, and administration of Red Hat Enterprise Linux 5.

1 https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/index.html 2 https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/index.html 3 https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/index.html 4 https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/index.html 5 https://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/index.html

(14)
(15)

Draft Draft

Appendix A. Revision History

Revision 0-2 Tue Apr 10 2012 Petr Kovář pkovar@redhat.com

Alpha-2 release of the Software Collections Guide.

Revision 0-1 Tue Mar 06 2012 Petr Kovář pkovar@redhat.com

Alpha-1 release of the Software Collections Guide.

Revision 0-0 Thu Feb 23 2012 Petr Kovář pkovar@redhat.com

(16)

References

Related documents

Manage Red Hat Enterprise Linux deployments Install a Red Hat Network Satellite Server.. Install a Red Hat Network Satellite Server and populate it with software

Red Hat Enterprise Linux (RHEL), 2 Sockets, Unlimited Guest, 3 Yr Subscription, No Media 3 Yr 24x7 Software Technical Support from HP included. BC323A Red Hat Enterprise Linux (RHEL),

This software collection gives developers on Red Hat Enterprise Linux 6 access to Ruby 1.9, which provides a number of new features and enhancements, including improved

These CPU cores were clustered so that each had equal access time to a local memory bank, and cache could be shared between the cores; however, each 'hop' across an interconnect

Finally, it is likely that the best solution will be a combination of large servers running large jobs (database servers are a classic example), dedicated servers running

• Manage Red Hat Enterprise Linux networking • Archive and copy files between systems • Install and update software packages • Access Linux file systems.. • Use

Red Hat Enterprise Linux Extended Life Cycle Support Subscriptions (“Red Hat Enterprise Linux ELS”) is an Add-On subscription to your active, standard

Red Hat Enterprise Linux Extended Life Cycle Support Subscriptions (“Red Hat Enterprise Linux ELS”) is an Add-On subscription to your active, standard Software Subscription per