For OpenMPI's libraries
$ sudo /bin/sh -c 'echo "/usr/lib64/openmpi/lib" >> /etc/ld.so.conf.d/openmpi-64.conf' $ sudo ldconfig
For OpenMPI's binaries
$ sudo echo 'export PATH=/usr/lib64/openmpi/bin:${PATH}' >> /etc/profile.d/openmpi.sh $ sudo echo 'set path = ( /usr/lib64/openmpi/bin ${path} )' >> /etc/profile.d/openmpi.csh
Exit your terminal screen and open it again to activate the new settings.
Done!
@10/Jul/2013: I have made a minor change in title and change the double quote to single quote of the echo command to keep ${PATH} from auto-expansion.