Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi
Showing posts with label Red Hat. Show all posts
Showing posts with label Red Hat. Show all posts

Monday, July 26, 2010

LDAP Authentication in Apache2 on Ubuntu

Today I needed to help a co-worker setup a development server that mirrored the setup of our production server as close as possible.  Our production server is Red Hat based, and the laptops that we use for development are running Ubuntu, for the most part.  On Red Hat, I custom compiled the apache installation so that we could get things exactly how we wanted them.  On Ubuntu, I wanted to just use the default apache installation, but needed to get the LDAP authentication working for the .htaccess files.  After much looking through synaptic, and browsing the internet, I stumbled upon something that pointed me in the direction of using a2enmod.  After issuing the following command:
sudo a2enmod authnz_ldap
and restarting the server, my authentication began to work perfectly.  I was very happy to find this, and I think it's a great method of enabling optional modules for certain tools.

Wednesday, January 27, 2010

Compiling New GCC on Old RHEL 4

We're trying to run some new software that requires a fairly new version (4.4.2) of the gcc compiler, but we're on RHEL4. Solution? Compiling it myself. Usually, this isn't too much of a problem. Today I ran into a few snags. I thought I would post this quick and dirty solution to the problem in hopes of making it a little easier for somebody else if they ran into the same issue.
First, the new version of gcc requires mpfr and gmp. I had those installed from some previous work, so I pointed to them with the --with-gmp= and --with-mpfr= configure options. Configure seemed to work OK, but then it would bomb during the make with an error:
checking for suffix of object files... configure: error: in `/$HOME/gcc-4.4.2/i686-pc-linux-gnu/libgcc':
I was dumbfounded. After some looking, and several articles that appeared to be talking about something totally different, I decided to experiment with LD_LIBRARY_PATH, my old friend / nemesis. It seems that if I set LD_LIBRARY_PATH to the lib directories where I installed gmp and mpfr, the make works fine. For some reason, it wasn't enough to pass them as arguments to configure. Happily, this solved my problems. Go (con)figure!

Wednesday, January 13, 2010

Installing Firefox 3.5 in Red Hat Enterprise Linux 4

I've been struggling with this problem for quite a while now. Every time I decide it's time to do it, there's just enough pain and other things to make me decide to turn back. Today, it was time to plow through it and get things working. One of the things that made me decide is that I found rpm files for firefox 3.0, and I figured it couldn't be too much different.

To install the firefox 3.0 rpm, I needed the following rpms to be installed:

rpm -Uvh evolution28-glib2-2.12.3-6.el4.i386.rpm
rpm -Uvh evolution28-atk-1.12.2-4.el4.i386.rpm
rpm -Uvh evolution28-cairo-1.2.4-6.el4.i386.rpm
rpm -e seamonkey-nss
rpm -e seamonkey-nspr
rpm -Uvh nspr-4.7.3-1.el4.i386.rpm
rpm -Uvh nss-3.12.2.0-4.el4.centos.i386.rpm
rpm -Uvh evolution28-pango-1.14.9-7.el4.i386.rpm
rpm -Uvh evolution28-gtk2-2.10.4-25.el4.i386.rpm
rpm -Uvh firefox-3.0.7-3.el4.centos.i386.rpm

The first thing I found was that I needed to explicitly set my LD_LIBRARY PATH.

setenv LD_LIBRARY_PATH /usr/evolution28/lib:$LD_LIBRARY_PATH

Then, it was still giving me errors about some libdbus libraries, but it was just the wrong version. I tried an old trick, making soft links with the new names to the old libraries. For a moment, I thought I had won. However, after running once, if you shut down firefox, it will not start on subsequent invocations.
To get past this, I decided to install my own dbus library. I wanted to install it somewhere inconsequential, so that it would not interfere with any other tools.
I downloaded dbus-1.2.16.tar.gz, then extracted it.

./configure --prefix=/path/to/dbus/
make
make install
setenv LD_LIBRARY_PATH /path/to/dbus/:$LD_LIBRARY_PATH


This seems to have tamed the beast which is firefox 3.5 on Red Hat Enterprise 4 (RHEL4).
I will try to keep this post updated if I find other requirements.

Thursday, October 09, 2008

Creating a list of machines on your NIS domain

If you're on a Linux machine that authenticates via NIS, you can very easily generate a list of all the Linux/Unix machines that are using that NIS server to authenticate. The command is:
ypcat hosts
You can also list the users that are authenticating against this server:
ypcat passwd
One situation in which this becomes very useful is if you have a heterogeneous network and people are running different shells. Part of the output of this second command is to tell you what shell people have as their default login shell. If these are set differently, you could be getting different environment settings and behavior.

kwin --replace

Many users at work have been reporting problems with our new Red Hat Enterprise Linux 4 (RHEL4) installation when running KDE. The problem manifests itself when they cannot move or resize their windows in their current session. This makes the system very unusable. Luckily, the fix is very easy. Simply type "kwin --replace" into a terminal window in the session that's not responding. This has been effective in resolving this problem in most instances. If I understand correctly, what it does is replace the current window manager with a new instance of the kwin window manager that KDE uses. Hope this is helpful if you run into the same problems that we've had.

Thursday, August 28, 2008

Finding multiple files with the find command on Linux

After fighting with the find command for quite a while yesterday, and trying to figure out it's regular expression parsing engine, one of my co-workers just let me in on a very useful function of find. You can specify multiple "-name" options on a command line if you seperate them with a "-o". For example, if you want to find all the files on your system named kids.txt and money.txt, you could issue the following command,
find / -name kids.txt -o -name money.txt
Pretty handy. Hope this helps you out if you are ever in this situation!

Wednesday, May 28, 2008

KDE Can't Move Windows

At work we just upgraded to Red Hat Enterprise Linux 4 on all the workstations. People have been having some issues with it. One of the major issues is that some people can't move their windows. The problem seems somewhat intermittent. You can be using your desktop normally, then after some period of time, you stop being able to move the windows. This has been hitting many of our users. After some searching on the web and through some forums, I found a way to restart KDE without restarting your X session. If you do this, it seems to keep all your windows up and fixes the problem where you can't move your windows.

The other problem that we're having is that when you run a vnc server on :0 with the vnc module in the xorg.conf, it doesn't redraw unless you move the mouse. This makes it very difficult to do much real work on it. I heard one report of a lady who was working at home over the vnc connection, and had to have one of her co-workers log in to the same box and consistently move his mouse so that her screen would refresh while she typed. If anybody has any information on how to fix this, I'd be extremely grateful.