0

How to rollback YUM UPDATES

Once in a while you might have problems after running “yum update.” There is an intermediate solution by rollback feature included in YUM. THIS OPTION IS NOT ENABLED BY DEFAULT. 1. To enable rollback edit /etc/yum.conf and add tsflags=repackage 2. Add the following line into /etc/rpm/macros file if it doesn’t exist and add %_repackage_all_erasures 1 now you are all set and can use the following examples to rollback rpm -Uvh –rollback ’22:00′ rpm -Uvh –rollback ‘3 hours ago’ rpm -Uvh –rollback ‘june 13’ rpm -Uvh –rollback ‘yesterday’ All previous repackaged software will be stored onto /var/spool/repackage

0

hponcfg with selinux

Today I went to run hponcfg and found the following error # hponcfg HP Lights-Out Online Configuration utility Version 4.0.0 Date 12/08/2011 (c) Hewlett-Packard Company, 2011 Error opening libcpqci.so: libcpqci.so: cannot open shared object file: No such file or directory Problem running hponcfg on the machine Run hponcfg after doing one of the following Temporarily disable enforcement on a running system by /usr/sbin/setenforce 0 OR Permanently disable enforcement during a system startup change “enforcing” to “disabled” in “/etc/selinux/config” and reboot Error Loading the library libcpqci.so or libhponcfg.so quick google search did not return much so dug in deeper and found… Continue Reading

0

whose using my ports ?

When troubleshooting applications you will sometimes need to find out what process is using your ports so that you can isolate it or kill it or readjust it so that it will work better with other applications on the same server. lsof is always the best method to see what is running on various ports however there is also an alternative. lets do lsof first lets say you want to find out what is running on port 8400 since it states that the port is open via netstat netstat -an | grep 8400 tcp 0 0 0.0.0.0:8400 0.0.0.0:* LISTEN so… Continue Reading

0

Dell OMSA 101 – mirroring and bootstraping

If you have a environment that has a lot of dell servers and want to get storage and chassis information OMSA is the way to do it. If your machines have access to the internet you can easily download it from linux.dell.com and install it however if you have a good number of servers and/or do not have access to the internet via your servers you will most likely want to mirror the repository so that you can install it from your trusted host. In this post we will assume that we have a trusted host that has access to… Continue Reading

0

SSH Keys 101

If you have a centralized server where you manage many remote servers on you will most likely want to setup ssh keys so that you would not have to type in your password everytime. ssh comes with many utilities to generate handle and manage keys. this article will talk mainly about ssh-keygen, ssh-agent, ssh-copy-id, and ssh-add. Lets say you want to generate your keys you will issue ssh-keygen which will default to rsa or you can specify dsa by typing ssh-keygen -t dsa. It will prompt you for a passphrase to use. You will always want to select a passphase… Continue Reading

0

Cool AWK trick – remove duplicate lines without sort

I always do something like cat file | sort -n | uniq to get a unique listing of a file to remove duplicates. the only problem with this is that it sorts the list so the ordering of the file is lost.. found a cool trick with AWK today of removing duplicate lines without destroying the order and yet its just a one liner! awk ‘!a[$0]++’ file lets take an example $ cat abc ddd bbb eee fff aaa ccc bbb kkk aaa zzz xxx yyy now : $ awk ‘!a[$0]++’ abc ddd bbb eee fff aaa ccc kkk zzz… Continue Reading

0

DNSMASQ – home network changes

Desided to make some changes to the home network using dnsmasq. dnsmasq is a light weight dns cache/dhcp/tftp server that is easy to configure and manage and does not require a large footprint as far as memory or cpu. In my home network I have a main router which acted as a wireless access point and dhcp server which plugs into my MOCA network and to the gigE switch for the wired machines. I have another wireless AP on the MOCA network to extend my wireless footprint. dnsmasq pretty much works right out of the box however I wanted to… Continue Reading

0

Find deleted open files

When your disk usage does not match the usage summary or when you have a full filesystem yet you’ve removed the files you are most likely dealing with open files. To find open files use lsof +L1 and kill the PID so that the space will be freedup

0

Troubleshooting with the multipathd Interactive Console

The multipathd -k command is an interactive interface to the multipathd daemon. Entering this command brings up an interactive multipath console. After entering this command, you can enter help to get a list of available commands, you can enter a interactive command, or you can enter CTRL-D to quit. The multipathd interactive console can be used to troubleshoot problems you may be having with your system. For example, the following command sequence displays the multipath configuration, including the defaults, before exiting the console. # multipathd -k > > show config > > CTRL-D The following command sequence ensures that multipath has picked up any changes… Continue Reading

0

Prevent yum from updating RHEL to a new release

Sometimes you will run into a scenario where you need to keep an OS at certain version due to vendor support. Such as EMC/IBM SAN powerpath etc.. You might also want to remain at a certain version due to change management policies. In this example I like to use yum to keep my RHEL guest current with security and bug fixes. The problem I ran into is that Red Hat has released a new minor version of it’s Enterprise Linux 5.x, and so yum wants to update to it. Well have no fear, as there is one line you need… Continue Reading