Solution to Invalid command 'PubcookieAppID'
When setting up Pubcookie, you may encounter an "Internal Server Error" in your browser and the following error in /var/log/httpd/ssl_error_log (or wherever you're keeping your SSL error log):
[alert] [client] /var/www/html/foo/bar/baz/.htaccess: Invalid command 'PubcookieAppID', perhaps misspelled or defined by a module not included in the server configuration
This might be a headscratcher for a while, since you've probably been working hard to make sure that your Pubcookie configuration is nice and tidy and your .htaccess file is set up with PubcookieAppID, like this:
AuthType NetID
PubcookieAppID fribble
require valid-user
In fact, Apache is telling you exactly what you need to know: it can't make sense of the PubcookieAppID directive because the module that interprets that directive is not loading and thus is "not included in the server configuration."
To solve this, make sure that a line like this is actually somewhere in your configuration, normally somewhere like /etc/httpd/conf.d/pubcookie.conf:
LoadModule pubcookie_module modules/mod_pubcookie.so
In my case, I had commented it out while getting SSL to work. Duh.
Installing rpy and rpy2 on RHEL6
I wanted to install rpy and rpy2 on Red Hat Enterprise Linux 6. Here's how I did it. There have been several fixes in the rpy SVN repository that have not shown up in the version downloadable from SourceForge. Hopefully that's been fixed by now, but here's how I installed it by retrieving rpy directly from the repository.
First I made sure that the python-devel package was installed to avoid the error src/RPy.h:63:20: error: Python.h: No such file or directory:
yum install python-devel
Then I installed R and R-devel from EPEL:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
yum install R R-devel
Then I downloaded rpy and extracted it:
curl http://rpy.svn.sourceforge.net/viewvc/rpy/trunk/rpy/?view=tar > rpy.tar.gz
tar xvzf rpy.tar.gz
cd rpy
python setup.py install
Lo and behold, it imports without error:
python -c "import rpy"
Yay!
Besides R and R-devel, rpy2 requires that the readline-devel package be installed, otherwise installation fails with ./rpy/rinterface/_rinterface.c:79:31: error: readline/readline.h: No such file or directory.
yum install readline-devel
After that, rpy2 installs easily:
curl http://pypi.python.org/packages/source/r/rpy2/rpy2-2.2.0.tar.gz#md5=a42a7f1e6ddb10dc3a1886c2f4309fab > rpy2-2.2.0.tar.gz
tar xvzf rpy2-2.2.0.tar.gz
cd rpy2-2.2.0
python setup.py install
Solution to scp missing on Minimal RHEL6 Install
If you choose the minimal installation of Red Hat Enterprise Linux 6, you do indeed get a minimal install. It's so minimal that things like wget and scp are missing. It's pretty obvious that yum install wget will get you wget but if you want scp:
yum install openssh-clients
Red Hat Enterprise Linux 5 on Dell OptiPlex 990 Initial Impressions
I received a Dell OptiPlex 990 and installed RHEL5 on it. Some preliminary observations:
- I wanted a RAID 1, so I reached for a trusty 3ware 8006-2LP, which is a 64-bit-capable SATA RAID PCI card that I typically run in a 32-bit PCI slot. But the OptiPlex 990 has placed a heatsink directly behind the PCI slot. The card can't physically fit in the slot because the heatsink is in the way. That led to my next adventure.
- I've tried several times over the years to run software RAID on OptiPlex systems both with FreeBSD and Linux. Everything would set up fine but under load the computer would reboot and rebuild. I suspect that the SATA controllers on the motherboard were to blame. But I thought hey, this whole Sandy Bridge thing might have improved things -- let's try again. So I put in the Red Hat installer. That led to my next adventure.
- The onboard Sandy Bridge video is not compatible with the installer. After X tries to start the result is a black screen. Not too surprising, really. Fortunately the installer offers a handy VNC option which worked fine.
- I created two RAID partitions, mirrored them, and assigned the /boot mountpoint to the mirror. Then I created a large LVM volume group and created logical volumes for the rest of my mountpoints. A brief summary of operations:
Create RAID partition of 100MB on /dev/sda
Create RAID partition of 100MB on /dev/sdb
Create RAID device on /dev/md0 using the above two partitions in RAID1. Mount point is /boot.
Create RAID partition of 80G on /dev/sda2
Create RAID partition of 80G on /dev/sdb2
Create RAID device on /dev/md1 of type LVM physical volume
Click LVM button and create logical volumes for swap, /var/log, and /. Results:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol01
65G 2.3G 59G 4% /
/dev/mapper/VolGroup00-LogVol02
9.5G 152M 8.9G 2% /var/log
/dev/md0 99M 13M 82M 14% /boot
tmpfs 902M 0 902M 0% /dev/shm
Now on to test whether the onboard SATA controllers would fall down. I ran two simultaneous instances of bonnie++, one in /var/bonnie and one in /var/log/bonnie (separate logical volumes, if you've been paying attention and haven't fallen asleep yet). No rebooting. I was impressed.
My final observation: the onboard NIC is an Intel 82579LM which does not seem to have an onboard TCP offload engine. Though the 82577LM does in this matrix so I'm not sure. Let's see what ethtool has to say:
# ethtool -k eth0
Offload parameters for eth0:
Cannot get device udp large send offload settings: Operation not supported
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: off
generic-receive-offload: off
Update 2011-06-15: The 990 is definitely noisier than the 980 or the 7xx series due to fan placement and lack of hooded airflow internally. Also, with RHEL6 and BIOS A03 the OptiPlex 990 will shut down but will hang when restarted. In order for it to reboot cleanly it is necessary to add reboot=pci to the kernel options in /etc/grub.conf.
Compiling and Installing Pubcookie on 64-bit RHEL6
Before attempting compilation, make sure you have the following prerequisites installed (and Apache of course):
yum install gcc mod_ssl openssl-devel httpd-devel
Then you're ready:
curl -O http://www.pubcookie.org/downloads/pubcookie-3.3.4a.tar.gz
tar xzvf pubcookie-3.3.4a.tar.gz
cd pubcookie-3.3.4a
./configure
make top_builddir=/usr/lib64/httpd top_srcdir=/usr/lib64/httpd
Then with sudo or as root:
make top_builddir=/usr/lib64/httpd top_srcdir=/usr/lib64/httpd install
You'll need to tell Apache to load pubcookie. In /etc/httpd/conf/httpd.conf or /etc/httpd/conf.d/pubcookie.conf:
LoadModule pubcookie_module modules/mod_pubcookie.so
Reference: ...Red Hat felt the need to mess with the Apache2 build environment
Installing php-mbstring on RHEL6
I wanted to install the mbstring PHP extension on Red Hat Enterprise Linux 6. But to my surprise, it wasn't there:
# yum install php-mbstring
Loaded plugins: rhnplugin
Setting up Install Process
No package php-mbstring available.
Error: Nothing to doThat's because the package is in the RHEL Server Optional repository.
I went into RHN and enabled the repository:

After doing yum update I could do yum install php-mbstring with no problems.
SSH Key-Based Authentication on RHEL6
You've set up your new Red Hat Enterprise Linux 6 box and you can ssh in using passwords with no problem.
But now you want to stop using passwords and start using keys. So you install your keys:
scp .ssh/id_dsa.pub me@example.com:.ssh/authorized_keys
But the system keeps prompting you for a password! The keys don't seem to work at all.
That might be because SELinux is preventing it because the proper attributes are not on the authorized_keys file. Or possibly you have permissions wrong on your .ssh directory. The solution:
cd /home/me
chmod go-rwx .ssh
restorecon -R -v /path/to/.ssh
Restorecon will respond with
restorecon reset /home/me/.ssh context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/me/.ssh/authorized_keys context unconfined_u:object_r:user_home_t:s0->unconfined_u:object_r:ssh_home_t:s0
It's always SELinux, isn't it?
Reference: RHEL6 SSH key



