Category Archives: fedora

Boinc client: No usable GPUs

The first thing I had to do to get this to work was to obtain the updates for GPUs, for ubuntu this was boinc-amd-opencl.

Then I had to add into /etc/init.d/boinc-client the xhost command, which would give access to the GPU to the boinc username.

The information on the web was wrong about this. The command I had to add was:

xhost si:localuser:boinc

si means server interpreted, and the kinds of strings accepted are described in man xsecurity. Localuser implies a local username. The web articles I found claimed one needed to do xhost local:boinc, but the description of xhost:local is that it doesn’t take a username, and it makes LOCAL connections available. Which sounds good, but didn’t work. After doing xhost local:boinc it was the same as if I had just done xhost local, and I got an entry “LOCAL” when I did xhost, but it didn’t work.

Apache Configuration Issues

Trying to set up a new Zend Framework (ZF) website, I struggled once again with getting the setup correct. I learned some lessons, and this post is supposed to help me remember them.

First, the requirements.

1) ZF websites need rewrite rules to force all the urls through index.php so the can be picked apart. Also, ZF websites using the ZF config mechanisms need an APPLICATION_ENV php variable set somewhere in the site configuration, so the website can figure out where it is running and make hosting specific decisions (like, e.g. where the database will be, whether to turn on debugging, etc.).

2) I want to keep the website in a repository, and check it out onto different web-hosts  for testing, development, production. So any configuration stuff which is web-host specific should not be in the repository but in the host configuration files.

3) Although the urls for the ZF website need to be rewritten to index.php, there may be other urls (like phpmyadmin) that should not be rewritten. So the configuration has to allow for this. In particular on some websites (like wmbuck.net) the website itself redirects non-logged in users to the blog (this blog) with a redirect to /blog/. The rules need to allow normal handling of this url (to select /blog/index.php) in the normal way.

The rewrite rules and application environment stuff can be put in an .htaccess file within the DocumentRoot. Most ZF documentation describes doing it this way. But for me, at least the application environment variable can’t be here because everything under DocumentRoot is in the repository. So I want APPLICATION_ENV oregano on one box, APPLICATION_ENV tarragon on another box, and if I put this in .htaccess, and .htaccess is in the repository the file can only have one or the other setting.
Continue reading Apache Configuration Issues

New disk layout using btrfs

Preparatory to doing an upgrade of Fedora on one of my linux boxes, I decided it was time to revise the disk layouts. Specifically, I finally got around to building a separate partition for /home. After doing a little reading, it looked to me like a good way to do this was to use btrfs. Initially I also made a separate /var, but decided that was both unneeded and error prone, and went another way. The main objective of this work was to reduce the drag in upgrading Fedora.

Root is on a small (64GB) SSD, LUKS encrypted which has /boot and an LVM VG for / and swap. / is ext4. I built a 2GB mdadm raid-1 mirror with LUKS encryption on top of it, and then layered a btrfs file system on that called oreganodata. The root of oreganodata is not typically mounted, but has the following subvolumes automounted at boot time:

  1. /home -> oreganodata/home
  2. /mail->oreganodata/mail,  /var/lib/imap and /var/spool/imap symlink to the /mail/lib and /mail/spool directories.
  3. /var/lib/mysql->oreganodata/maria
  4. /usr/local/bin->oreganodata/bin
  5. /etc/pki/mycerts->oreganodata/certs
  6. /var/webdata->oreganodata/webdata (websites have symlinks to /var/webdata as needed)

Continue reading New disk layout using btrfs

Getting tomcat running again

It has been a hell of a struggle to upgrade the server (which hosts this site) from Fedora 13 to Fedora 17. The last step was to get my flying apps running in Tomcat again. I confess I don’t track what happens in the java world very closely. And it is a very active world – lots of stuff happening. So it is no surprise I suppose that when you jump four releases there are some adjustments to be made.

To get tomcat running I had to make the following adjustments, in addition to the obvious stuff of adding the FlightPlan war file to /usr/share/tomcat/webapps, installing the mysql jdbc connector, and updating /etc/tomcat/tomcat-users.xml.

Tomcat was unable to find org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory. I had to add:  JAVA_OPTS=”$JAVA_OPTS -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory” in /etc/sysconfig/tomcat. It may be that this is a problem of my own making somehow. In an earlier post I commented about the ongoing evolution in the methods available to connect java apps/servlets with databases. My servlets now use java Datasources, which I think are the “latest thing”, and I’m a little surprised that I have to make special provision for finding the classes. This makes me think it probable that if I understood this better, and did things according to “best practice” in the java world, I wouldn’t have this problem. But as I said before, catching up with all the advancements in java over 7 years is a tall order.

Then Tomcat was unable to find apache-commons-pool.jar, so I had to add a symlink: commons-pool.jar -> /usr/share/java/apache-commons-pool.jar in /usr/share/tomcat/lib. This is less surprising I think. The reference to this part of apache commons is coming from the previous (BasicDataSourceFactory) classes. If the former aren’t there, we don’t need this.

The flying apps seem to be running properly now.

Authentication, LDAP, phpMyAdmin

I’ve had a long standing problem. Every time I rebuild my main server (which contains my websites, my mail, my ldap directory, etc), I get myself wrapped around the axle with authentication. I particularly seem to get into trouble with authenticating access to phpMyAdmin. I use ldap for basic authentication in apache. This morning I figured out some obvious things (they are always obvious once you figure them out). I write this down so that the next time I make the same mistake, I’ll have someplace to look to trigger my memory. If it should happen that anyone else who suffers from the same density could get any help from this, so much the better.

Continue reading Authentication, LDAP, phpMyAdmin

Self-inflicted disaster

The blog portion of my website is wordpress, the remainder (that the public can’t see) is php built with Zend framework. The whole thing sits upon a linux box, running fedora, which is in a facility on the other side of the nation from me. The server was 4 releases behind, hadn’t been upgraded in 2 years, and hadn’t even been rebooted in 288 days. I was hosting not only my own website, but 8-10 others for other people – friends and acquaintances who for whatever reason don’t have or can’t afford a hosting service. Obviously things were going entirely too well.

 

So, a few days ago I decided to upgrade to a new release of Fedora (or, put another way, I decided to shoot myself in the foot).

Continue reading Self-inflicted disaster

Vino, Vinagre, VNC

Another bit of lore that I don’t use often, manage to forget, and end up having to figure out again from time to time:

Vinagre is obsolete. This was the name of the previous built in remote viewing client in gnome (and therefore, for my purposes, in both Ubuntu and Fedora). It will operate as a VNC client (i.e. enable opening windows to VNC servers), but also an RDP client and will even pop up a terminal window for an SSH session. .

Remmina is the new remote viewing client, replacing Vinagre.

Vino is the name of the built in VNC server. This is launched when you invoke the “desktop sharing” preference and enable “allow other users to view your desktop”. Your gnome instance sprouts a vino server listening on 5900, giving (possibly password protected) access to the existing desktop to any vnc client that can reach port 5900. A remote user attached in this way is sharing the desktop with the user seated at the “console”. When either moves the mouse, both will see the cursor move on the the display.

Realvnc, Tightvnc, Tigervnc, Ultravnc are all different forks of the original VNC. Realvnc was the first, from the original devlopers. Tightvnc developed improvements in the encoding (tight encoding) if both ends are tightvnc. Tigervnc seems to be a Fedora fork of tightvnc. All will work with other, but some improvements only kick in if both ends share the improvement.

Xvnc in linux (as installed with the tigervnc package) is a little different animal. It is really a two-headed server, with an X server on one side and a vnc server on the other. The X server is an entirely separate virtual display than the console. There is no physical monitor anywhere, but applications can be started which open that X server and display upon it. On the other side, VNC clients are able to view and control the applications which are displaying on the X server. When the X server is launched, any X applications wanted can also be launched — including an entire gnome desktop environment (entirely independent of the gnome environment which might be running on the “console”, if there is one). Multiple users can have different desktop environments open, albeit using different network ports for each. VNC ports normally start at 5900, which vino attempts to use if it is enabled. So different remote users can use 5901, 5902, 5903…  Continue reading Vino, Vinagre, VNC

Starting Services

There is no great insight in this post, it is only to help me remember how to start services in Fedora and Ubuntu as I have both.  I used Fedora long enough to get used to the old chkconfig stuff, but now thats gone. Ubuntu never did that anyway. They are different, and I get confused about which new syntax to use on which system.

If somebody other than me ever reads this, be careful to check dates and versions before you believe anything I write. It will probably change. This is as of Fedora 16 and Ubuntu 12.04. Continue reading Starting Services