Tuesday, October 12, 2010

xlcip or How to copy past from the command line to x-windows

Brain Ashburn, my colleague in the Atlanta Red Hat office, introduced me to the xclip utility today. It copies output from the command line and puts it into x-windows.

For example, to copy the current directory :
 pwd | xclip -i -sel "clip"

There are of course more useful things that can be piped to it. To try it out create a file, add some text and :
cat newfile | xclip -i -sel "clip"

Its available through yum :
sudo yum install xclip

Tuesday, October 5, 2010

Installing MySQL with Yum

A quick note on installing mysql with yum in case anyone else is lazy (like me) and runs :

sudo yum install mysql

That only installs half of what's needed. nixCraft sums it up nicely for RHEL. It also works for Fedora :

$ sudo yum install mysql
$ sudo yum install mysql-server

To start it up and set the root user/password :

$ sudo yum install mysql
$ sudo chkconfig mysqld on
$ sudo /etc/init.d/mysqld start
$ mysqladmin -u root password PASSWORD
$ mysql -u root -p

H2 Connections in Eclipse

H2 is a great database for prototyping and local work. Eclipse does not come with a default driver definition though.

Dan Allen has a nice tutorial on Google code illustrating how to set one up.

Friday, October 1, 2010

You don't have permission to access / on this server.

More fun with Apache.

There was a time when I could configure Apache without the help of Google. Alas, that time was years ago.

I wanted several versions of Apache on my machine so that I could test different mod_cluster configurations side by side.

I downloaded the Apache source, built it and put in "/examples" under my home directory. After I started it I got :
You don't have permission to access / on this server.


I immediately checked the directory permissions. They looked okay. I spent some time monkeying with the SELinux security settings.

The problem was simple: Apache needs execute permissions all the way up to the root directory.

Simply moving my "examples" directory to the root fixed it.