Red Hat Enterprise Linux

Drupal 7, PHP 5.4 and MySQL via Software Collections

In order to test out the new Red Hat Software Collections (RHSCL, announcement) version of PHP 5.4, I decided to build out a Drupal 7 install using the php54 collection and the mysql55 collection.

Overall, the activity was pretty much like a normal Drupal install. However, to use software collections you have to do a few things differently. Also, if you haven’t used a software collection for a “service” (e.g. MySQL) before, the service setup is also a little different than the native versions.

First and foremost, add the channels for RHSCL either via subscription manager or rhn. The name of the channel (for the beta) is rhel-server-rhscl-6-beta-rpms. After that, you need to install the software collections. So, something like:

#yum install php54 mysql55

You could also just install all the dependencies in the same line, but I wanted to pull them out to be able to comment on them a little bit more. I also tend to install some of the semi-optional components because I think Drupal works better that way.

First off, the easiest thing to install, which is also not really related to software collections, is gd (not called “GIF Draw” 🙂 ). Very simple, just install gd from the normal RHEL repositories.

#yum install gd

Next, we need the “driver” libraries for php to various other things. All the ones we need are included in the “php54 Software Collection” but are not installed by the simple install of the php54 package as they are not required for basic php. php54-php-gd is the connection from php to the gd library. php54-php-mbstring is a library for unicode, technically not a “driver” but an optional library. Finally, we need to connect to mysql so we install php54-php-mysqlnd.

#yum install php54-php-gd php54-php-mbstring php54-php-mysqlnd

Last but not least, we need to install the php “driver” for httpd. Now, I call this one out

Continue reading “Drupal 7, PHP 5.4 and MySQL via Software Collections”

Share

Managing OpenStack with The Foreman

OpenStack is picking up a lot of steam these days, but getting it installed can be a hassle. Lots of puppet-based installers have popped up to automate this arduous task. Using Foreman, however, administrators can not only configure and install OpenStack using puppet, but provision & add new compute nodes at their fancy.

The Foreman is a Ruby on Rails application that does configuration management with puppet and provisioning. We’ll use both of these features to make using & administering OpenStack easier. Our installer leverages PackStack, which includes great puppet modules for setting up OpenStack. Combining these to setup and manage OpenStack Grizzly is a breeze!

Requirements

  1. At least three machines running RHEL 6.4 with an active subscription to RHEL OpenStack Platform or Red Hat Cloud Infrastructure.. We recommend your OpenStack Compute & Controller nodes run on bare metal.
  2. Each machine needs to have a resolvable FQDN
  3. Each machine needs to be subscribed to a proper RHEL subscription
  4. The Foreman server should have its firewall configured to allow inbound network traffic on TCP ports 80, 443 and 8140 for Foreman and Puppet to function correctly
  5. The host running Foreman may be running selinux in Enforcing mode, but you must first install the ruby193-foreman-selinux package. Both the OpenStack controller and compute nodes can also run in enforcing mode if you install the openstack-selinux package. You must also manually set a boolean on the controller node: setsebool -P httpd_can_network_connect on

Continue reading “Managing OpenStack with The Foreman”

Share

Red Hat Software Collections 1.0 Beta Now Available

You may have seen references to “software collections” in this blog, but this is different.  “Red Hat Software Collections”, now in beta for the first time, is a collection of refreshed and supported web/dynamic languages and databases for Red Hat Enterprise Linux.   Now you can have two versions of software on one OS, or refresh these languages and databases more frequently.  See this list below!

Continue reading Red Hat Software Collections 1.0 Beta Now Available

Share

Dive deeper in NUMA systems

A common performance related issue we are seeing is how certain instructions
are causing bottlenecks.  Sometimes it just doesn’t make sense.  Especially
when it involves lots of threads or shared memory on NUMA systems.

For quite awhile a bunch of us have been writing tools to help exploit features
of the CPU to provide us insight to not only the instruction of the bottleneck
but the data address too.

See, the instruction is only half the picture.  Having the data address allows
you to see two distinct functions operating on what looks like distinct data,
but yet are intertwined on a cache-line.  Thus these functions are tugging
memory back and forth causing huge latency spikes.

Sometimes the answer is to separate the data onto different cache-lines, other
times (in the case of locks) perhaps change the granularity to reduce
contention.

Intel CPUs have support for providing data addresses for load and stores (along
with latency times for loads) through its performance counters.  Userspace
exploits this feature with a tool called ‘perf’.

Latest perf can be run with:

Continue reading “Dive deeper in NUMA systems”

Share

How Long Does It Take to …

One common idiom in performance monitoring is how long did it take for a program to do something. For example you may want to know the time taken for database queries in PostgreSQL or just-in-time translations in a Java Virtual Machine. SystemTap and user-space markers in Linux packages make it much easier to determine the duration of those operations.

The user-space markers compiled into Linux packages mark key points in the code where particular actions occur. The user-space markers also provide arguments that provide additional information about the action. For example, the markers and the available arguments in PostgreSQL can be listed using using the SystemTap command:

$ stap -L 'process("postgres").mark("*")'

The two user-space markers related to the start and completion of a query are:

Continue reading “How Long Does It Take to …”

Share

Red Hat at the ISO C++ Standards Meeting, Bristol, UK

Red Hat has actively participated in the ISO group defining the C++ standard for many years, and continues to make a significant contribution. The Red Hat toolchain team was well-represented at the spring meeting of the standardization committee (technically JTC1/SC22/WG21) in Bristol, UK, last month: we had three people there for the full week, with one other visiting a couple of times during the week. In this article, Jason Merrill summarizes the main highlights and developments of interest to Red Hat’s customers and partners:

Continue reading Red Hat at the ISO C++ Standards Meeting, Bristol, UK

Share

The Security Benefits of RPM Packaging

RPM Package Manager (RPM) was created to deliver software to workstations and servers. Besides being an efficient software delivery mechanism, RPM also provides security features that assist system administrators with managing their software and trusting the code that is going into their infrastructure.

What is an RPM?

RPM is a package management system that bundles software source code or binaries together for easy installation on a computer. These files are tracked and allow for easy installation, upgrading, and removal. Since the RPMs have been built specifically for the operating system and platform they are installed on, the software is expected to operate in a predictable and consistent manner.

RPMs not only make it easy for the user to install software on their computer but also for the developer to deliver the software. RPMs makes it easy to pull in dependencies, other bits of code needed by the software to function properly, and to provide updates to the software in question. The ability to apply patches for security fixes makes RPMs an especially good tool for maintaining secure computer environments as code fixes can easily be verified by system administrators prior to installation.

Continue reading “The Security Benefits of RPM Packaging”

Share

Starting with SystemTap

As I stare at this blank screen to start writing my first blog entry I have that same feeling that so many developers have when starting with an unfamiliar programming language or application.  The developers in our group realize that it is not easy starting from nothing and we strive to make it easier to productively use SystemTap to investigate performance problems.

Continue reading Starting with SystemTap

Share

Getting Started with RPMs

Unfortunately, not every application is packaged for every distribution. What do you do when you can’t find it packaged for Red Hat Enterprise Linux? If you are like most people, you give up or attempt to install it from source. What happens when installing from source goes badly? If you are like most people, you definitely give up. How do you keep up with application improvements or, perhaps more importantly, security fixes? If you are like most people, you periodically try and check on the application status (especially when your version stops working 🙂 ), and then try and rebuild it. What is the solution to all of these issues? Proper packaging. Well, this post is meant to help you get started.

Continue reading “Getting Started with RPMs”

Share

Array allocation in C++

This technical article covers a subtlety in C++ array allocation and how we changed the GNU C++ compiler to deal with it properly. When a programmer writes

T *p = new T[3];

the C++ compiler allocates room for at least three copies of objects of type T on the heap. These objects require 3 * sizeof(T) bytes. For this example, assume sizeof(T) is 12, then it is straightforward to allocate 36 bytes (for example, using malloc). But what happens if the array length is 3937053355 (or 16909515400900422315 on a 64-bit architecture)? Then 47244640260 bytes are required. This number cannot be expressed in 32-bits, so if 32-bit arithmetic is used to perform the multiplication, the result is a mere 4. Unless special care is taken, a C++ implementation will provide a pointer to a heap area that is much too small for holding the requested number of objects (4 bytes instead of 47244640260 bytes).

Continue reading “Array allocation in C++”

Share