Archive for the ‘Admin’ Category

WordPress comment response time

Because spammer suck, and spam assassin is a product, not a person, comments only get posted after they go through moderation. Of course, that means that I have to know someone’s posted a comment. This used to work great, but when I switched to having mail running on a separate machine, wordpress stopped telling me that a comment has been posted. Until now.

It turns out that a few months ago, no doubt in a moment of “why the fuck is this running?” I turned off the postfix service. Oops. Turned it back on and watched the stream of emails show up in my inbox. Without fail, comment response and moderation time should be a lot better now.

This is why I don’t maintain production systems.

  • Share/Bookmark

rsync and SVN: A poor man’s distributed version control

I probably have too many computers. Often, this leads me to need some version of some source code on one box, that only exists on another. I used to check into a temporary branch, then check out from that branch, but that often leads to unpleasant merge problems. Another thing I’ve tried is just using scp to transfer files, but that can be time consuming with a slow connection or a lot of source. I can’t believe it took me this long to think of it, but the most sensible solution is to use rsync.

To pull the files from the computer with current source to older source navigate to your source directory and type:
rsync -avuz new.source.machine:workspacedir/sourcedir . (don’t forget the .)

To put new changes back, it’s just:
rsync -avuz . new.source.machine:workspacedir/sourcedir

You also might want to add the --delete option if you’ve been doing a lot of refactoring.

Another thing I ran into is that Eclipse doesn’t really like adding new projects directly to the workspace. The work around I’ve found is to make sure the project exists within Eclipse on the machine you want to work on before attempting to rsync.

  • Share/Bookmark

Vijedi is a disaster

It might not look it on the surface, but vijedi.net is a disaster. It’s come a long way from the days it was hosted on a abandoned Dell with 48 MB of RAM and a PII-233 processor. I’ve got a blog, a photo gallery, virtual hosts, source repositories, and until 2 days ago, email services all running on this box. Which is fine. Unless you have 18GB of storage. Right no, Vijedi.net needs 70GB, most of this resides on an external USB drive sitting on top of the server box. Adding to the infrastructure WTF, is that I wanted to do more with the box, and Patrick Vokerding, doesn’t publish Slackware releases often enough. Therefore, I have a bunch of core web-libraries compiled from source. Which makes them very hard to upgrade. Also, since I ran out of disk space, there all in very strange locations, which makes it hard, well to do anything at all really.

Most of the reason I haven’t fixed any of this in the last year is that vijedi.net is our primary mail box. However, since we’ve migrated all of that off onto a Zimbra install, I’ve finally got the time to take the whole thing down for a while and get it sorted out. Which is what I’m going to do. This is the last vijedi.net blog post for a while (not that I post that often anyway). I’m not sure how long it will take, there’s a ton of stuff to backup, restore and reconfigured. But itll be sane this time. Which of course, will make me very happy.

Later all, and see you in a few weeks!

  • Share/Bookmark

Zimbra Collaboration Suite

I finally bit the bullet, bought another box and started running mail functions for vijedi.net through Zimbra. Our reasons for this were pretty standard. Nobody wanted to use the webclient because it wasn’t responsive and felt very clunky. It was a webmail client that felt like a webmail client. Which made the client and it’s shared functions almost useless, since nobody used it, except in case of emergency.

Zimbra, on the other hand, fucking rocks (to borrow a phrase from a former colleague). The interface is Snazzy (capital S intended). It feels like a high quality desktop client. It’s responsive on an adequately powered machine, it’s clean looking, has really nifty threading support, and is easy to administer for basic tasks. It even has a lite client for access from slower machines. The lite client has all the same functionality, but without the Web 2.0 goodness like drag and drop adn no page refresh. You can’t ask for much more from a web mail client.

Zimbra, on the other hand, is built from the ground up to be Web 2.0. Using the web client feels a lot like using Mail.app and iCal.app on the Mac. It’s that simple.

The Zimbra install was surprisingly easy, as long as you pay attention to the directions and don’t try to install on OpenSUSE. All it takes is an clean install RHEL 4 or a clone. Vijedi.net uses Centos 4 instead of RedHat. Follow this with a download of Zimbra, un-pack, run the install script, and you’re good to go. The instructions are that solid and easy to follow.

Getting it running in production for me was a simple matter of updating my MX records. From start to finish, it was about 4 hours, including transforming the parts from Newegg into a computer.

We were able to migrate our old mailboxes with the imapsync utility. This was the second most difficult part of the process, since finding the right parameters took a bit of futzing. The most annoying part has been calendar migration. The wiki page for importing through the REST api is clear enough, but there’s no guidance on what to do if something goes wrong. Apparently, our old collaboration suite (Horde) exporting an iCal entry that Zimbra did not like. Now, according to my wife’s calendar, it’s her cousin’s anniversary every day of the year. And not only that, he got married in 0 AD! I couldn’t find a way to delete either the entry (that threw an error) or the default calendar. I posted to the Zimbra forums, so we’ll see how good the community support is. Otherwise, I might just have to grab the source and figure it out myself. Thankfully, java stack traces are pretty clear things.

Overall, I’ve been extremely pleased. It’s rare to have an install go as smoothly as this one and it’s a definite upgrade. I installed the open-source version of Zimbra. They have different versions with differing levels of pricing and features. You can’t really complain about the business model. The technology components that are based on open source or open standards are free. Things like Outlook integration and Blackberry integration are not. If you’re looking for an Exchange like solution, Zimbra is a far superior alternative.

  • Share/Bookmark

OpenSUSE NFS Configuration Tutorial

In a heterogeneous OS environment, the network file system of choice is clearly SMB/CIFS, mostly since heterogeneous implies the existence of windows machines. Lately though, I’ve been getting a little annoyed with some of the quirks of a file-system from the single user Windows world. I also don’t have any Windows machines left. Therefore, when it came time to share one resource to multiple machines, I decided to give NFS a try.

The resources for NFS are out there, but there wasn’t anything specific for openSUSE and some level of translation was required. The two docs I used to get this working where:
RedHat’s and Linux Help’s. If you’re trying to configure nfs on something besides openSUSE, that’s probably a better place to look.

The first step on openSUSE is to open up Yast2 and enter the software management section. Filter on packages with a name containing ‘nfs’ and you should see something like this:
Install NFS
Since this is a server box, I only have the console version of Yast installed. The X version will look similar. Note that the nfs-server package is not installed. This is recommended, since the kernel support for NFS is superior to the userland version. Packages you should have installed are portmap, and yast2-nfs-server. Having NTP installed running is also a good idea, otherwise you might encounter errors about files that only exist in the future.

Once you’ve installed the required packages, it’s time to open the NFS configuration wizard.
configure nfs

This wizard is pretty straight-forward. The first screen asks if you want to start the NFS server (you should say yes), followed by a screen that allows you to configure directories to share (or ‘exports’ in nfs lingo).
Start Server

Add directories

The directory must be an absolute path. You can also specify options such as read-write permissions and how to treat root clients on this screen. After you’ve added a few directories, that’s it. You’re done configuring the server. Yast2 will restart the daemons for you.

You can make sure nfs is running properly on your box by entering the command rpcinfo -p. You should see multiple entries for nfs with both udp and tcp sockets.

verify if nfs is working

Now that the server is functional, it’s time to configure the client. The steps are similar. You need to make sure that you have yast2-nfs-client installed on the machine. The dependencies for this package include everything you need. If you don’t want to use yast, you can just mount the resources manually:
mount server.domain.com:/path/to/resource /where/to/mount
Or if you want to do it the SUSE way, you can open Yast2 on the client, and enter the same information on the NFS Client screen. This will also configure the correct fstab entries for you.

Configure Client

If everything went right, your files will be available at /where/to/mount on the client machine. If it didn’t, then take a look at this troubleshooting guide.

  • Share/Bookmark
Return top

About

This is my blog about programming. For random stuff, checkout my Twitter or Tumblr