Wednesday, May 23, 2012

Upgrade to CentOS 6.2 from CentOS 6.1 or CentOS 6.0

1. Change to root User

su -
## OR ##
sudo -i

2. Backup all important data

  • Backup /etc diretory
  • Backup important logs /var/log
  • Backup web server configs and sites
  • Dump MySQL databases
  • Dump PostgreSQL databases
  • Backup all what you need if something goes wrong

3. Check list of packages that are going to be updated

yum list updates

4. Upgrade with yum update

Official way to do upgrade:
yum update
Another way to do update is first clean all, second update glibc, yum, rpm and python packages and then update other packages like following:
yum clean all
yum update glibc* yum* rpm* python*
yum update

5. Reboot

reboot

6. Check CentOS 6.2 (Final) release info and Check your entire system

cat /etc/redhat-release
## Output ##
CentOS release 6.2 (Final)
Following needs redhat-lsb package
lsb_release -a
## Output ##
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.2 (Final)
Release:        6.2
Codename:       Final
Check that your system is working normally and test every services.

Tuesday, May 15, 2012

SLES / SLED 11 - Multimedia VLC How-To


 To be able to use VLC player in SLES / SLED 11, it is needed to switch to openSuSE repos, in this case to  version 11.1. Do following:

zypper ar -f http://packman.unixheads.com/suse/11.1/ Packman && zypper refresh Packman

zypper ar -f http://download.videolan.org/pub/vlc/SuSE/11.1 vlc && zypper refresh vlc && zypper in vlc

If it still won't install try adding these two repos and try installing vlc again:

zypper ar -f http://download.opensuse.org/repositories/multimedia:/libs/SLE_11/ multimedia-libs && zypper refresh multimedia-libs

zypper ar -f http://download.opensuse.org/repositories/multimedia:/xine/SLE_11 multimedia-xine && zypper refresh multimedia-xine

That's is all folks :)

Tuesday, April 17, 2012

Reconfigure iLo network settings using HPONCFG


I recently found myself in a situation where I had rebuilt and shipped a server to a remote office but forgotten to configure the iLo settings. Normally this wouldn't be to big an issue - except A) The IP address and default gateway were pointing to a subnet which no longer existed and B) The HP System Management Homepage wasn't connecting to the agents correctly.


Fortunately the HPONCFG utility came to my rescue. This little tool is installed as part of the ProLiant Support Pack and can be used to make config changes to iLo without the need to reboot. Default install directory = C:\Program Files\HP\hponcfg.


To write the current iLo configuration simply open a cmd prompt and execute the following command:


C:\Program Files\HP\hponcfg>hponcfg /w iLoConfig.xml


To change settings you need to create an xml file containing the parameters you want to change, formatted using the RIBCL language. RIBCL allows you to write XML scripts to configure and manage iLO config settings.


To modify the network settings I created the following script:






NOTE: The USER_LOGIN and PASSWORD tags are required, and must contain data, although any data is accepted.


And then run the script like so:


C:\Program Files\HP\hponcfg>hponcfg /f your_script_name.xml

Thursday, April 12, 2012

Troubleshooting HP Systems Insight Manager (HPSIM) High CPU Usage

Scenario:


A service provider monitoring 750+ systems on a single HP SIM box, experiences high (near to 100% or 3GHz) CPU utilization – mainly due to the processes sqlservr.exe and mxdomainmgr.exe. The HP SIM box is in a VMware environment, has 1 vCPU, and – as in all good environments – they don't want to just chuck resource at it - especially as it is only a monitoring box and otherwise works fine albeit a bit slow - but see if some performance optimization can be done.


Resolution:


Optimize the HP SIM Scheduled tasks


1: Log in to HP SIM https://HPSIM Server:50000 with an authorized account
2: From the menu bar → Tasks & Logs → View All Scheduled Tasks...







3: Enable the 'Delete Events Older Than 90 Days' task (by default runs once a week and this is fine)





4: Configure the task 'Hardware Status Polling for non Servers' to poll using the schedule guidelines below


Number of systems -> Hardware Status Polling for non Servers


Less than 250 --> Use default of 30 minutes
250 to 500   --> Change to 1 hour
501 to 2000   -->  Change to 2 hours
2001 to 5000   -->  Change to 4 hours or greater


5: Configure the task 'Hardware Status Polling for Servers' to poll using the schedule guidelines below


Numbers of systems -> Hardware Status Polling for Servers


Less than 250 -> Use default of 5 minutes
250 to 500 -> Change to 15 minutes
501 to 2000 -> Change to 30 minutes
2001 to 5000 -> Change to 1 hour


*These are based on the suggested polling intervals from HP


Note: The tasks should be configured so there is no crossover - don't have both running at the same time
The chart below shows CPU usage before and after the changes.







Postscript:


i: Even though this was for HP SIM 5.3, this similarly applies to other versions of HP SIM – HP SIM 5.X, HP SIM 6.X ….


ii: The service provider in question runs 5 Insight boxes, managed by different internal teams, monitoring over 2500 systems.


iii: Semi-related - if operators report the web ui is slow, try disabling script scanning from the workstations anti-virus (at least for the internet browser process)

Saturday, February 11, 2012

RPM Fusion configuration for RHEL / CENTOS / FEDORA

Installing Free and Nonfree Repositories

We have two separate software repositories:
  • free for Open Source Software (as defined by the Fedora Licensing Guidelines) which the Fedora project cannot ship due to other reasons
  • nonfree for redistributable software that is not Open Source Software (as defined by the Fedora Licensing Guidelines); this includes software with publicly available source-code that has "no commercial use"-like restrictions
Installation can be done either using a web browser, or via the command line.

Graphical Setup via Firefox web browser

  1. First enable access to the free repository. For users of gpk (gnome package kit) or kpackagekit in Fedora that is easy and basically only one step: just click on one of the following files, depending on what distribution you use and then follow the default options that Firefox and Package Kit offer by clicking Enter a few times (¹):
  2. Once that succeeds, you can enable access to the nonfree repositories by clicking on one of the following files, depending on what distribution you use and then follow the default options that Firefox and Package Kit offer by clicking Enter a few times(¹):
(¹) Once you clicked on above link Firefox will ask you how to Open the file. Here you can simply use the default and open the file with the default application Package Installer. Then Firefox will call Package Kit, which asks Do you want to install this file ?. Click OK to begin install; Package Kit then will complain about a Missing security signature; once you tell Package Kit to install the package nevertheless it will move on and install it. That's all.

Command Line Setup using rpm

To enable access to both the free and the nonfree repository use the following command:
  • Fedora 15 and 16:
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
  • Fedora Rawhide and what will become Fedora 17 (Alpha, Beta and snapshots):
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm'
  • RHEL 5 or compatible like CentOS:
    su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm'
  • RHEL 6 or compatible like CentOS:
    su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/6/i386/rpmfusion-free-release-6-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/6/i386/rpmfusion-nonfree-release-6-0.1.noarch.rpm'

Important notes

  • You need to enable EPEL on RHEL 5 & 6 or compatible distributions like CentOS before you enable RPM Fusion for EL. See the fedoraproject wiki for instruction how to enable EPEL.
  • The RPM Fusion for EL repositories are still in the early testing stages; hence you (for now) need to enable epel-testing as well, as some of the RPM Fusion packages depend on packages that are currently in epel-testing.
  • All users that used Freshrpms or Livna installed properly (e.g. by installing one of their foo-release packages) got RPM Fusion free and nonfree repositories enabled automatically.

Friday, February 3, 2012

2 Computers via 1 Keyboard & Mouse

Do you have multiple computers on your desk? Is one of them a laptop that is sat off to the side a bit? Have you ever wished that you could get rid of all but one of the keyboard / mouse combos that clutter your desk or that your laptop was easier to control? If so then Synergy is the answer to your woes.

Synergy (synergy2.sf.net ) allows you to use the keyboard and mouse of your primary computer to control all the other computers around you. Best of all, it is free, works with Linux, OS X, and Windows. There is one pitfall though... Synergy has not been updated since 2006 but have no fear because it has been forked to a new project called Synergy+ (http://code.google.com/p/synergy-plus) and they are working to squash the bugs that have arisen plus add new functionality. Below is an explanation of Synergy (taken from the Synergy+ home page):

Synergy+ (synergy-plus) lets you easily share a single mouse and keyboard between multiple computers with different operating systems, without special hardware. All you need is a LAN connection. It's intended for users with multiple computers, where each system uses its own display. It's a little like having a 2nd or a 3rd desktop...




In the above picture you could just as easily substitute a laptop for any one of these machines. Client computers can be to the left, right, top, or bottom of the server's screen or any other clients screen. For example, imagine a shelf just above the monitors in the above picture that holds your laptop and monitors for two other computers. Then imagine a shelf above that with a bank of 5 more monitors...

As a side note, if you run a dual monitor setup then the "screen" is the combined real estate of both monitors. Synergy supports mapping a certain percentage of the screen to be aligned with a percentage of another screen. The means that if your dual monitor setup uses matching monitor resolutions you could have 50% of the screen's top edge (one monitor's worth) mapped to the edge of one client and the other 50% (the second monitor) to another client.

Synergy does have some shortcomings when it comes to security but they are easily overcome. Quoting the Synergy2 site:

Synergy does not do any authentication or encryption. Any computer can connect to the synergy server if it provides a screen name known to the server, and all data is transferred between the server and the clients unencrypted which means that anyone can, say, extract the key presses used to type a password. Therefore, synergy should not be used on untrusted networks.

However, there are tools that can add authentication and encryption to synergy without modifying either those tools or synergy. One such tool is SSH (which stands for secure shell). A free implementation of SSH is called OpenSSH and runs on Linux, many Unixes, and Windows (in combination with Cygwin).

So, to secure Synergy you can either tunnel it through SSH or do like I do and configure a private VPN between your computers using OpenVPN and run Synergy over it. OpenVPN is available in most Linux distributions or you can download it directly from their site.

As a final tip, be sure to set your clients to run Synergy (and OpenVPN if used) automatically so that you can login without having to break out the spare keyboard and mouse again. This is particularly easy in Gnome. At the end of /etc/gdm/Init/Default, just before the line that says exit 0 add the following:

/usr/bin/killall synergyc

while [ $(pgrep -x synergyc) ]; do sleep 0.1; done

/usr/bin/synergyc

Now, go clear those extra keyboards off your desk!

Wednesday, February 1, 2012

How to Install Mozilla Thunderbird 9 on Centos, Red Hat (RHEL) 6.2 / 6.1 / 6, Fedora 16 / 15


Introduction

Mozilla Thunderbird is a free, open source, cross-platform e-mail and news client developed by the Mozilla Foundation. The project strategy is modeled after Mozilla Firefox, a project aimed at creating a web browser. On December 7, 2004, version 1.0 was released, and received over 500,000 downloads in its first three days of release, and 1,000,000 in 10 days.

Mozilla Thunderbird 9 is released on 20 December and today we discuss about it in this tutorial. This tutorial allows you to install Thunderbird 9 on Fedora 16/15/14/13, CentOS 6.2/6.1/6 and Red Hat (RHEL) 6.2/6.1/6 using YUM command. Fedora 16 and Fedora 15 users found Thunderbird 9 on their updates repos, they don't have to install the Remi Repositories as other previous versions of Fedora do. So older Fedora users can also install Thunderbird 9 on their desktop by installing the Remi Dependencies. So just follow the instructions given below.

What's New in Thunderbird
Thunderbird is based on the new Mozilla Gecko 9 engine
New opt-in system for users to send performance and usability data back to Mozilla to improve future versions of Thunderbird
Additional support for Personas in the compose and address book windows
Better keyboard handling for attachments
Windows users can hide the menu bar (and show it with the "alt" key)
Several user interface fixes and improvements

You also check out more features ans other details at the Thunderbird Release Notes.

Installing Mozilla Thunderbird 9 on Fedora, CentOS, and Red Hat (RHEL)

Step 1 : Before beginning the Installation you must log on as Root User and now Open the terminal and enter the following command to enter as a Root user : -

$ su

Alternatively, you can also use

$ sudo -i

Step 2 : Now Install the Remi Repository on the Older versions of Fedora and on CentOS or RHEL. Type the following commands to install the Remi Repository. The Remi Repository are needed on the previous versions of Fedora such as Fedora 12 / 13 /14.

Remi Dependency for Fedora 14


$ rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

$ rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Remi Repository for Fedora 14

$ rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm

Remi Repository for Fedora 13

$ rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm

Remi Repository for CentOS / Red Hat (RHEL)

Remi Dependency for CentOS 6 and RHEL 6

$ rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm

Remi Repository for CentOS 6 and Red Hat 6

$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Step 3 : Check Available Thunderbird Versions for Fedora, CentOS and Red Hat and install it with the help of YUM on terminal

For Fedora 16 / 15

$ yum list thunderbird

For CentOS 6 and Red Hat (RHEL) 6

$ yum --enablerepo=remi list thunderbird

Step 4 : Now, Update and Install the Thunderbird 9 with the help of YUM on Terminal

For Fedora 16 / 15

For updating type the following command : -

$ yum update thunderbird

For Installing type the following command : -


$ yum install thunderbird


For CentOS 6 and Red Hat (RHEL) 6




For updating type the following command : -


$ yum --enablerepo=remi update thunderbird

For Installing type the following command : -


$ yum --enablerepo=remi install thunderbird

Step 5 : Finally, you can start the Thunderbird 9 on your Fedora, CentOS and RHEL Desktops with the help of terminal. Start Thunderbird with the help of following command on the terminal : -


$ thunderbird

Alternatively, You can also use Thunderbird (9) launcher and launch the Thunderbird on your desktop.

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...