Archive for the ‘Unix/Linux’ Category

Server Todo List

Wednesday, August 13th, 2003

I converted my blog index page from .html to .php and added a little php script to display the server uptime on the index page. Not for any particular reason, just cause I felt like doing it. Obviously my 33 days uptime isn’t that impressive but when you’re susceptible to regular residential power outages there’s only so much you can do.

With that in mind I invested in a UPS for the server. I decided to go with the APC Back-UPS RS 1500VA model. I plan to connect it to the server, DSL modem and switch so hopefully in the event of a power outage not only will the server stay up the internet connection will too. I figure it should provide about an hour of backup power. I went with APC specifically because they provide linux software to enable the server to automatically shutdown when the battery power gets too low. Very nice.

To hook up the battery I’ll obviously need to take the server down (goodbye uptime). While I’m at it I figure I may as well knock a few other things off the todo list. Like getting rid of that kdebase package that causes a kernel panic everytime I try and remove it using rpm. I figure I may as well upgrade the kernel also. I’m not sure when I’ll do all this. Maybe this weekend maybe the next. It all depends on how much free time I have.

OpenGroupware

Friday, July 18th, 2003

I’ve spent a little time lately installing OpenGroupware. It claims to be the open source competition for Microsoft Exchange Server and Novel Groupwise. It’s good to see a product like this in development. I spent a little time about 6 months ago looking for such a product and couldn’t find anything anywhere. I found a few projects on sourceforge but none were even close to being off the ground.

It took me quite a while to get OpenGroupware installed and running. From my experience installing and looking at the initial Admin page it looks like it’s got a little ways to go. The install process was pretty bumpy mainly because I was installing it on a RedHat system which the instructions weren’t designed for. However, by following the instructions as close as possible and then reviewing the FAQ for problems I ran into, I was able to get it installed. It’s designed to work with PostgreSQL which is fine, but I was a little disappointed to hear they’re not planning on supporting MySQL anytime soon. Their website says:

“…We at OGo are open to the contribution of additional database backend adaptors, but having support for a perfectly suitable OpenSource database, PostgreSQL, we see no immediate need to extend OGo for MySQL or other database on our own…”

Well, yeah that’s fine but I’d prefer not having to install and run PostgreSQL on my server when I’m already depending and running upon MySQL.

I still wasn’t able to solve a problem on the initial admin page where the graphics wouldn’t show up. There were some instructions in the FAQ to create a link to the WebResources which I did but it didn’t seem to change much. I clicked on one of the links and the process crashed and threw an exception. Like I said, it probably has a ways to go but it’s good to see a product like this making progress.

Panic Stricken

Tuesday, July 8th, 2003

I had some free time over the weekend so I finally got around to cleaning up my “server.” Where cleaning up implies removing all the packages that I should have never installed in the first place (gnome, kde, xfree86, etc). I changed the default runtime boot to 3 from 5 which brought up a nice terminal login on restart. Well, the clean up process was going fine (tedious, but fine). <TANGENT>This reminds me, wouldn’t it be nice if rpm provided an option to remove a package along with all the packages that depend on it? Yes I know this would be very dangerous, but typing rpm -e XFree86 Xfree86-libs really would’ve saved some time. The manual depth first search approach I took got old quick, but wasn’t bad enough to justify creating a script to do it for me. </TANGENT> (yes i know the sentence before the tangent was incomplete, I’ll finish it, don’t worry).

So the “cleaning” is going fine until I reach the ever diabolical kdebase package. rpm -e kdebase the result? Kernel panic and complete system crash. I couldn’t help but stare with my mouth open mumbling “what the *&%#?” I ended up rebooting and tried it 2 additional times before deciding that yeah, somethings really screwed up. I haven’t had the time to sit down and debug the thing so I ended up removing everything but the kdebase package. I really don’t know much about rpm scripts to figure out what happened but decided I should really rebuild the system, clean, before I think about colocating it.

PHP Photo Gallery (Continued)

Wednesday, July 2nd, 2003

My new camera is working great but I haven’t got around to setting up a photo gallery yet. I’ve looked through a number of the available projects on sourceforge and freshmeat and I still can’t decide which one I want to use. I actually installed the linux photo archive and it seems to work pretty well. One thing I wish it had was an administration page to upload photo’s to the server. As it is right now you have to FTP or scp the files to the server, which isn’t a big deal but it’d be nice to upload them through a web interface (at least I think so). Overall it seems like a pretty good system, though. I think it’s current version was 0.9 and I’ve been meaning to look at some of the other Photo Gallery projects that are passed the version 1.0 release, to see if they’re any better. Hopefully I’ll have something to report in the next few weeks.

Another thing that’s holding me back is my backup solution for the server. Right now I have a nightly cron job that runs and creates a .tar.gz file which is then encrypted using openssl and uploaded to my account on my ISP’s FTP server. It’s worked perfect up until now and provides offsite, reliable storage. Problem is my FTP account is limited to 100 MB and while I was testing my Photo Gallery, the pictures I uploaded easily exceeded that amount. So…I can keep things as they are now and not backup the pictures which is a temporary solution cause eventually my backup will exceed 100 MB without the pictures or I can find a different solution. I’m not sure which route to go. I have another computer I could back it up to, but it’s at the same location, so I lose offsite storage. I would however gain, basically, unlimited storage. Another option is to open an FTP account with larger storage space but accounts over 100 MB can get pretty pricey. I’m still thinking about colocating the server (after I clean it up), which opens up a few more options. It would be nice to be able to do incremental backups in addition to full backups so that’s something to consider too. Right now I want a solution that doesn’t cost much and still provides for reliable backups. I suppose reliability rarely comes free/cheap, though.

SCO and Hello World!

Friday, June 20th, 2003

I was reading an article today about the SCO/IBM lawsuit and thought to myself, what if SCO decided to seek a patent on the “Hello World!” code. All subsequent developers might be in trouble, but then again they could modify it to “Hi Universe!” or something. Hmm…that could be considered a derivative work, though. Software development sure is becoming complicated these days.

Gentoo Linux on the Powerbook

Monday, June 9th, 2003

Gentoo LogoI noticed a slashdot article for a Gentoo “live” cd to run linux on Mac’s, the other day. It took me a few days, but I finally got around to trying it out. I downloaded the Gentoo Gnome CD image last night on my cable modem at home and it downloaded pretty quick, around 2 or 2 1/2 hours I’d guess.

The CD is bootable so once I burned the image to a disc I rebooted my powerbook, held down the “c” key and Gentoo started booting right up. I really haven’t had enough time to play around with it much. I just ran through it fairly quickly trying to see what’s available and how it looked. From what I’ve seen I’m impressed. Gentoo also has a screenshot from the KDE version that’s also running mac-on-linux which looks pretty slick. This allows you to run OS X inside linux. I’m interested to see how it performs or if there’s any limitations. I also noticed Gentoo had a posting on their homepage about releasing a full version of Gentoo for the PowerPC platform. Looks like linux on a Mac is already here. I honestly thought it would take a lot longer than this. By the way, I REALLY dislike websites that don’t make permanent links to posts on their homepage obvious. I spent a while trying to figure out how to link to both posts but couldn’t find much, so you’ll just have to be satisfied with the link to the home page. Maybe in the next few weeks when the posts drop from the homepage and become archived I’ll come back and update this.

CORRECTION: After looking at Gentoo’s site a little more I realized they already have a distribution for PowerPC. The post I was looking at was for a distribution that would run under OS X. That’s even better than before. According to the post it should be “released soon” (I wish someone would define soon).

Up2date Woes

Monday, June 2nd, 2003

My server was down most of Friday. I decided to update my Redhat installation using the Up2date command Friday morning and ran into some problems. One of the packages (a KDE package) was locking up the server when it was trying to update. I had ssh’d in to perform the update and when the server locked up I lost all connection with it, so I had no idea what had happened. I called and had the server put into a hard shutdown and restarted but that didn’t seem to help. I couldn’t exactly sneak away from work for an hour, so I decided to drive over after work and look at it.

When I got there I found the console completely black, not responding to any keystrokes. I shut it off again and started it up and everything loaded fine. I decided to try and run the Up2Date command from the console just so I could see what happened. That’s where I notice it freeze when it reached the KDE package. Unfortunately the system became completely unresponsive when this happened. Once again I had to do a hard reboot. It was on this reboot that I noticed why the initial reboot earlier in the day hadn’t brought the system back up. Apparently since the system was taken down hard the drive wasn’t properly dismounted. This caused a mounting failure on the subsequent reboot but when I came in and rebooted it a second time, it mounted successfully.

I’ve always been a fan of keeping systems updated, but experiences like these make me lean toward the “if it ain’t broke, don’t fix it” theory. I guess the thing that concerns me is the utter lack of remote administration/debugging I was able to do. If I did eventually decide to have the system colocated out of state this could be a real problem. However, I do have to share some of the blame. I have WAY WAY WAY too many packages installed on the system. I shouldn’t have any of the X11 and KDE packages installed, but I do. The idea was to experiment with everything on the system, but I haven’t done that. Basically all I use is apache, mysql, ssh, sendmail, imap, named…and well, that’s about it. So, I’ve decided if I do decide to colocate a system I’m going to have to make it as lean as possible (a good idea, regardless).

P.S. This entry is a somewhat of a milestone. I’ll write more about that tomorrow ;).

I Need to Relocate my Server

Thursday, April 17th, 2003

Actually…I should have titled this, I *want* to relocate my server. I needed a break from studying for finals, so I spent a little time this morning playing around with vmstat, top and ab to perform some benchmarking tests on my blog (there’s a good article in this months Linux Magazine, in the LAMP Post section, about using these tools to do simple benchmarking). I quickly learned my DSL connection is a MAJOR bottleneck. Out of all the test I ran, my idle CPU usage barely decreased. The most CPU usage I saw the httpd process use was 0.7%. Not bad, not bad at all, but some of the tests still ran terribly slow and I think it’s safe to conclude it’s because of the bandwidth limitation on my DSL connection. However, I realize that my blog usage isn’t that heavy and I’d be surprised if there were more than 2 or 3 users accessing it at the same time. None the less, I’ve seen a steady increase in access over the last few months so why not start planning for the future, right?

I started looking into some colocation services, but most run around $300/month which is a little pricey for me. Esspecially considering this is really only a hobby. However, I started thinking of hosting some commercial sites on my server and charging a monthly fee. I’m confident that with a little work I could quickly recruit 10 or so customers and if I charged 20/month that would put me up to $200. With a little more work I’m sure I could recruit hosting enough sites to cover the colocation cost thus financing my “hobby.” If I get into that though, I know I’ll have to spend quite a bit more time and money with administration. I’d probably have to setup a mirror server to add redundancy which would double the colocation costs. I’m not sure I really wanna commit that much time and resources to it just yet.

The other option is having a third party host my blog which is significantly cheaper, but I really like having it on my own server so I can tweak and experiment with different things. Well, for now I think I’ll just leave things as they are. If anyone has ANY complaints about slow access or response please let me know. Until I start hearing otherwise I’ll just keep with the “if it ain’t broke, don’t fix it” philosophy.