sysadmin

Packaging Perl CPAN modules as RPM with cpanspec

Posted in sysadmin on February 17th, 2010 by Pedro Padron – 1 Comment

If you happen to use some CPAN module that is not already available in any repo (always check EPEL), you might consider packaging it yourself. It can really be a pain if you try to do it from scratch, that’s why you should consider using cpanspec. It’s a simple tool that will generate a specfile given a CPAN package name or package file.

read more »

How to install Ruby 1.8.6 RPM package on RHEL3

Posted in sysadmin on October 28th, 2009 by Pedro Padron – 1 Comment

I have to manage a few RHEL3 servers (i386), and since I’m using Puppet in my environment, it would be great to use it in those servers also. However, Puppet requires ruby >= 1.8.1, and RHEL3 ships ruby 1.6.8.

Instead of compiling ruby on the server (quick and dirty), I rebuilt the RPM based on the specs from Fedora 11. The only change I had to make was in the list of build dependencies. Here’s my note in the %changelog section of the specfile:

* Tue Oct 27 2009 Pedro Padron <ppadron@w3p.com.br> - 1.8.6.369-2
- build-deps: XFree86-devel instead of libX11-devel to build in RHEL3

Here’s the source RPM package:

ruby-1.8.6.369-2.src.rpm

To rebuild it:

$ rpmbuild --rebuild --define 'dist .el3' ruby-1.8.6.369-2.src.rpm

Here’s the list of packages that will be generated:

ruby-1.8.6.369-2.el3.i386.rpm
ruby-devel-1.8.6.369-2.el3.i386.rpm
ruby-docs-1.8.6.369-2.el3.i386.rpm
ruby-irb-1.8.6.369-2.el3.i386.rpm
ruby-libs-1.8.6.369-2.el3.i386.rpm
ruby-mode-1.8.6.369-2.el3.i386.rpm
ruby-rdoc-1.8.6.369-2.el3.i386.rpm
ruby-ri-1.8.6.369-2.el3.i386.rpm
ruby-tcltk-1.8.6.369-2.el3.i386.rpm

If you are interested in installing puppet as well, you will also need augeas and it’s ruby bindings:

augeas-0.5.0-2.src.rpm
ruby-augeas-0.3.0-1.src.rpm

And again:

$ rpmbuild --rebuild --define 'dist .el3' augeas-0.5.0-2.src.rpm
$ rpmbuild --rebuild --define 'dist .el3' ruby-augeas-0.3.0-1.src.rpm

Rebuilding Webalizer RPM to change the default language

Posted in sysadmin on October 13th, 2009 by Pedro Padron – Be the first to comment

Quoting the official Webalizer website:

The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser.

By default, the reports generated by Webalizer are in English, and there is no way to change this after it is installed. This is because the language files are statically linked in it’s source code, therefore you need to recompile it if you want to change it’s language.

However, if you installed Webalizer from an RPM package, it’s lame to just recompile it and copy the webalizer binary (if you use Plesk, it is what Parallels suggests) since it would break package verification with rpm -V webalizer. Wouldn’t it be better if your RPM package already provided the software in the desired state? Let’s see how this could be done…

read more »

Facter + Puppet: Writing custom facts to manage Plesk servers

Posted in sysadmin on September 25th, 2009 by Pedro Padron – Be the first to comment

What I’ll describe here is the process of writing some custom facts to retrieve useful information from Parallels Plesk servers, so that you can use them in your Puppet recipes.

For those of you who don’t know what Facter is, I’ll quote the manufacturer’s description:

Reductive’s analysis tool for reporting system configuration and status, used to parametrize Puppet configurations

If you don’t know what Puppet is all about also, check it out right now or this article won’t make sense to you.

read more »

(Português) ProFTPd: o arquivo de scoreboard e informações sobre sessões ativas (ftpwho, ftptop e ftpcount)

Posted in sysadmin on September 24th, 2009 by Pedro Padron – Be the first to comment

Sorry, this entry is only available in Português.