The every day things from Thalamus' life.

Thalamus' Blog

26 June, 2012

Perl modules as non root user.

Filed under: ComputerStuff_en — Thalamus @ 07:41

I’ve already talked about the awsome perlbrew, but, sometime you don’t want to go this way. It might be that you only need a couple of modules but want to keep them privately installed and not globally. It is pretty simply really.

$ cd /path/to/unpacked/module
$ perl Makefile.PL PREFIX=/path/to/home/usr/local
$ make
$ make test
$ make install

This will install the module privately in your home folder.

Then, after this, you need to make perl search your newly installed modules … you could set PERL5LIB env in eg .bashrc or .bash_profile, but, anoter alternative is in your code … early, lets say after the ‘use strict’ ….

use lib qw ( /path/to/home/usr/local/lib/perl5/site_perl /path/to/home/usr/local/lib64/perl5/site_perl );
• • •
 

12 June, 2012

Cloned RHEL6 machines and udev persistent-net.rules

Filed under: ComputerStuff_en — Thalamus @ 08:09

From time to time, it has happened that we move a HP Blade server Generation X from lets say G1 to G6 as an upgrade simply by swapping the internal OS disks. This of course changes the hardware it is running on. And the result may be that you struggle a bit with getting the NICs up and running on lets say eth0 and eth1. They suddenly are eth2 and eth3. Why ? Well, it is because of this file

/etc/udev/rules.d/70-persistent-net.rules

Which contains something like this ….

 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
 
# PCI device 0x14e4:0x1650 (bnx2x) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:b3:a8:78:54", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
 
# PCI device 0x14e4:0x1650 (bnx2x) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:b3:a8:78:50", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

if you look at the top of the file, you may pick up the clue that this is dynamically generated. So, delete the file and reboot … and now the NIC will come up as eth0 and eth1.

• • •
 

5 June, 2012

How to fix “Windows Update cannot currently check for updates, because the service is not running”

Filed under: ComputerStuff_en — Thalamus @ 09:30

run : services.msc – stop windows update.
delete : %windir%\softwaredistribution
start: : windows update.

• • •