Posts Tagged ‘PostgreSQL’

I am so not cut out to be a sysadmin.

by Pace on November 25th, 2007 @ 9:12 pm in Off-Topic
Tags: , , , , , ,

Yay! I got my shiny new Rimuhosting VPS. They had pre-installed some packages at my request, like Ruby, Rails, emacs, and Postgres. My first order of business was to get my Ruby on Rails test application moved over from my Windows laptop to my shiny new Rimu Linux server. First step, create a user account. Whoa, I have no idea what I’m doing. I google some basic sysadmin tutorial stuff and learn how to tweak the /etc/passwd file. I try that, but then I don’t know the password to use when I try to log in as myself. FAILED.

Eventually I discover the useradd script, which lets me set an initial password for the new user. SUCCESS.

I zip the directory tree and upload it to usualerror.com (just for temporary storage). I try to use scp to download it. It just hangs. FAILED.

I try ftp. Command not found (!). FAILED.

I think, “Aha, I can just use lynx to navigate to the page and download it that way!” Command not found. FAILED.

I try to figure out how to download ftp. I had thought it would be standard in any Linux distro, but apparently lots of things I expected to be installed weren’t installed. But I can’t think of any way to download things without using scp, ftp, or lynx. FAILED.

Eventually I dig around hard enough to stumble upon sftp. ftp isn’t installed, but sftp is. So I try that but it hangs just like scp. Google tells me that Lunarpages (where usualerror.com is hosted) doesn’t work with sftp. FAILED.

Finally I find lftp. I think I found it by doing rpm -qa. Sigh. All this pain caused by one missing l. lftp has some small amount of success — I can connect to usualerror.com and navigate the directory tree, but as soon as I try to do an ls or download a file, it hangs. FAILED.

Luckily, I remember a similar problem I had about 6 years ago. It had something to do with passive mode. I dig around and find that you can turn off passive mode in lftp by the “set ftp:passive-mode false” command. I do that and download the file! SUCCESS.

The file was zipped on Windows, but I decided to be optimistic and try to unzip it on Linux. And to my astonishment, it worked! SUCCESS.

Next, to start up a MySQL server. (I’m planning on ditching MySQL as soon as possible, I was just using it for testing.) Where is MySQL? It’s not in /usr/local/bin. It’s not in /opt/local anywhere. It’s not in anywhere I’m familiar with on a Linux system. I dig around for about a half hour and still can’t find it. FAILED.

Eventually, I think by interminable googling, I find it in /usr/libexec. I had never even seen that directory before. I start it up. But I can’t do anything because the permissions on some directory are set wrong. FAILED.

I figure out what directory is flummoxed and set the permissions. SUCCESS.

I start up my Rails app and it works perfectly fine! SUCCESS!

I had a similar debacle trying to figure out where to put the ruby-mode files for emacs. Fortunately, by this time I had figured out to just use find . | grep emacs, so that saved some time.

And after that began the PostgreSQL wrangling. After 3 hours, I finally got postgres to work on its own, but Rails still can’t hook up to it. It keeps giving me the error message FATAL C28000 Mno PostgreSQL user name specified in startup packet Fpostmaster.c L1540 RProcessStartupPacket. Sigh. I am so not cut out to be a sysadmin. Debugging code is so much more fun than debugging installation issues.