Guide to Red Hat Enterprise Linux 6 Software Collections

Similar documents
Red Hat Enterprise Linux 6 Cluster Suite Overview. Overview of the High Availability Add- On for Red Hat Enterprise Linux 6

JBoss Developer Studio 3.0

JBoss Developer Studio 3.0

Fuse ESB Enterprise 7.0 Installation Guide

JBoss Developer Studio 3.0

Red Hat Enterprise Virtualization 3.0 User Portal Guide. Accessing and Using Virtual Machines from the User Portal Edition 1

JBoss Developer Studio 6.0

Discovery, Reporting, Capacity and Utilization Edition 1. ManageIQ Documentation Team

Red Hat JBoss Developer Studio 7.0 User Guide

Red Hat Enterprise Linux 6 Logical Volume Manager Administration. LVM Administrator Guide

Fedora 20 Networking Guide

JBoss Enterprise SOA Platform 5.2 Rule Flow Component Guide. for Business Rules Developers

Fedora 22 Networking Guide

JBoss Communications Platform 5.0 SIP Presence Service User Guide

Red Hat JBoss Core Services Apache HTTP Server 2.4 Apache HTTP Server Installation Guide

JBoss Enterprise SOA Platform 5 ESB Tools Reference Guide. This guide is for developers Edition 5.3.1

Red Hat Developer Toolset 1.1

ovirt 3.0 Installation Guide

JBoss Enterprise Data Services 5 Teiid Designer User Guide. for Developers Edition 5.3.1

JBoss Enterprise Application Platform 5 HTTP Connectors Load Balancing Guide

JBoss Communications Platform 1.2 Platform Installation Guide

Fedora 20 Installation Guide

JBoss Enterprise BRMS Platform 5 BRMS Business Process Management Guide

Red Hat Developer Toolset 1.1

Red Hat Enterprise Linux OpenStack Platform 7 OpenStack Data Processing

Red Hat Enterprise Linux 6 Load Balancer Administration. Load Balancer Add-on for Red Hat Enterprise Linux

freeipa Administration Guide IPA Solutions from the IPA Experts

Red Hat Subscription Management All Subscription Docs Quick Registration for RHEL

Red Hat Subscription Asset Manager 1.2 Installation Guide. Installing and Using Red Hat Subscription Asset Manager Edition 3

JBoss Enterprise Application Platform 5 Negotiation User Guide. for JBoss Enterprise Application Platform 5 Edition 5.2.0

Fedora 22 Virtualization Getting Started Guide

Red Hat Enterprise Virtualization 3.2 Administration Guide

Red Hat Enterprise Linux 6 Virtualization Guide. Guide to Virtualization on Red Hat Enterprise Linux 6

JBoss Enterprise Application Platform 6.2 Administration and Configuration Guide

Red Hat Enterprise Linux 6 Security Guide. A Guide to Securing Red Hat Enterprise Linux

JBoss Enterprise Application Platform 4.3 Common Criteria Configuration Guide

Fedora 16 Security Guide

Fedora 19. Fedora Documentation Project

freeipa Installation and Deployment Guide IPA Solutions from the IPA Experts

Counter-Strike Game Server Management Module

Plesk 8.0 for Linux/UNIX Backup and Restore Utilities

Red Hat Directory Server 8.2 Using the Directory Server Console

JBoss Communications Platform 5.1 SIP Load Balancer User Guide

JBoss Enterprise Application Platform 6

Fedora 13 Managing Confined Services. Scott Radvan

Fedora 19 Security Guide

SWsoft Plesk 8.2 for Linux/Unix Backup and Restore Utilities. Administrator's Guide

SWsoft, Inc. Plesk Firewall. Administrator's Guide

Red Hat Enterprise Virtualization 3.0 Quick Start Guide

TIBCO Fulfillment Provisioning Session Layer for FTP Installation

Red Hat Enterprise Linux 6 Storage Administration Guide

JBoss Developer Studio 4.1

TIBCO Hawk SNMP Adapter Installation

SWsoft Plesk 8.3 for Linux/Unix Backup and Restore Utilities

VERITAS NetBackup Microsoft Windows User s Guide

QNX Software Development Platform 6.6. Installation Guide

Yosemite Server Backup Installation Guide

Red Hat JBoss Web Framework Kit 2 Getting Started With HTML5 Mobile Web Development

JBoss Enterprise Application Platform 5 Performance Tuning Guide

SWsoft, Inc. Plesk VPN. Administrator's Guide. Plesk 7.5 Reloaded

Red Hat Enterprise Virtualization 3.2 Installation Guide

SWsoft, Inc. Plesk File Server. Administrator's Guide. Plesk 7.5 Reloaded

Extreme Control Center, NAC, and Purview Virtual Appliance Installation Guide

Parallels Panel. Parallels Small Business Panel 10.2: User's Guide. Revision 1.0

JBoss Enterprise Application Platform 6.1 Development Guide

VERITAS NetBackup 6.0

WebApp S/MIME Manual. Release Zarafa BV

Plesk 8.3 for Linux/Unix Acronis True Image Server Module Administrator's Guide

Oracle Virtual Desktop Client. Release Notes for Release 3.2

Red Hat CloudForms 3.2 NetApp Storage Integration Guide

Red Hat Enterprise Linux 7 High Availability Add-On Administration. Configuring and Managing the High Availability Add-On

Parallels Virtual Automation 6.1

Getting Started using the SQuirreL SQL Client

JBoss Enterprise Application Platform 5

Cisco UCS Director Payment Gateway Integration Guide, Release 4.1

Plesk 8.3 for Linux/Unix System Monitoring Module Administrator's Guide

Red Hat JBoss Developer Studio 4.1 Smooks Developer Tools Reference Guide

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide

JAMF Software Server Installation Guide for Linux. Version 8.6

Firewall Security Toolbox User s Guide

Attix5 Pro Server Edition

For Introduction to Java Programming, 5E By Y. Daniel Liang

DiskPulse DISK CHANGE MONITOR

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

Managing Linux Servers with System Center 2012 R2

Red Hat Customer Portal Current Customer Portal Subscription Management

HP ARCHIVING SOFTWARE FOR EXCHANGE

JAMF Software Server Installation Guide for Windows. Version 8.6

Wakanda Studio Features

JBoss Enterprise Application Platform 6.2 Development Guide

BarTender Web Print Server

TIBCO Runtime Agent Authentication API User s Guide. Software Release November 2012

LAMP Quickstart for Red Hat Enterprise Linux 4

webmethods Certificate Toolkit

Transcription:

Red Hat Enterprise Linux 6 Software Collections Guide A guide to Software Collections for Red Hat Enterprise Linux Petr Kovář

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.

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 A. Revision History 7 iii

iv

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 Fonts 1 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 1 https://fedorahosted.org/liberation-fonts/ v

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; import javax.naming.initialcontext; vi

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). vii

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. viii

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: 1

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: 2 scl enable ruby193 - << \EOF command1 --with_parameters command2 --with_parameters... commandn --with_parameters

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. 3

4

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 Guide 1 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 Guide 2 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 Guide 3 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 Guide 4 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 Guide 5 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 5

6

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 Initial creation of book. 7

8