I am so not cut out to be a sysadmin.
by Pace on November 25th, 2007 @ 9:12 pm in
Off-Topic
Tags: installation, linux sysadmin, linux system administration, PostgreSQL, Ruby on Rails, sysadmin, system administration
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.
No related posts.
9 Comments!
#2 Posted by
Bryce on November 25th, 2007 11:21 pm | link
Being an admin means trying to solve a weirdly complex puzzle, written by dozens of other people.
Coding means trying to solve a weirdly complex puzzle you create yourself.
#3 Posted by
Pace on November 26th, 2007 8:54 am | link
Rimu support comes through again!
The native postgresql gem was not installed. I had to install the postgresql development package in order to get that installed for you:apt-get install postgresql-devel
gem install postgresAfter doing that, the error is now gone. You will still receive an error until you setup your database.yml with a user which exists for your databases:
[root@cloudninestaffing argon]# gem install postgresBuilding native extensions. This could take a while…
Successfully installed postgres-0.7.1
[root@cloudninestaffing argon]# rake db:migrate
(in /home/pace/rails_apps/argon)
rake aborted!
FATAL: role “root” does not existIf you have any other questions, please let us know.
Thanks,
David
http://rimuhosting.com
#4 Posted by
yvesjmt on December 12th, 2007 9:08 am | link
Hi Pace,
This is Yves, from Rimuhosting staff :-).
To start MySQL (or any other service), try the scripts in /etc/init.d/. For example:
# /etc/init.d/mysqld start
also:
# /etc/init.d/mysqld stop
Next time you get stuck with something, open a support ticket and we’ll help you out. It could be better than losing a few hours of precious time :-)
#5 Posted by
Pace on December 12th, 2007 1:01 pm | link
Yves,
Well, hello there! Yes, I did eventually find /etc/init.d/, what a useful directory! It was just that at each point, I thought “surely I can fix this in less than an hour” so never opened a support ticket. I’ll think twice in the future. (; Thank you!
#7 Posted by
Steven G. Harms on January 2nd, 2008 2:55 pm | link
I guess late December is the time for everyone to dust off their Rails documentation and try to get databases up and running. I came across the Postgres error you mentioned and then I remembered:
Duh! Rails 2.0, when you use `rails -d postgres appname` automatically populates the databases.yml file with user entries called ‘appname’. Unless you have that user role created before you try to do the `rake db:migrate` you’ll be in a world of pain ( and don’t forget the migrate ).
But there it was, your support ticket, which stimulated my brain to realize this, and now I have a lovely local install of Postgres with which to test my rails-itude.
So, from your lowly ticket request, to saving me time. Good Karma all around!
#8 Posted by
Pace on January 2nd, 2008 3:11 pm | link
Steven: I’m glad I was able to save you some time! (:













#1 Posted by
Megan M. on November 25th, 2007 10:21 pm | link
Oof!