✓ I'm available for hire! Check out my open source work on Github or drop me an email

Douglas F Shearer

Posts Tagged with server

There are 4 matching posts.

January 9th 2008

Add your comment

New Server

After several years of home hosting, I’ve finally decided to move to a dedicated (albeit virtual) server with Slicehost.

The Good

  • My sites are now served about 4 times faster, almost purely due to a faster connection speed.
  • I don’t have to worry about downtime due to powercuts or network outages.
  • I now have a futureproofed setup, regardless of where I live geographically.

The Bad

Not all of my sites are up and running at the moment, currently:

  1. Training site is not available. Now available.
  2. Public SVN is not available. Now available.

I’ll update this list as I get things up and running.

The Ugly

Nothing!

 
 

Migrating To OpenSolaris

I received my new server last week, and thus began my quest to try out new things, and move all my stuff from my old server.

My previous OS choice was Ubuntu, and Fedora before that. This time I’ve decided to go down the OpenSolaris route.

Once I got over the initial culture shock of the new environment, found out that the registration screen that appears on login to Gnome desktop is only for Solaris, and then abandoned the GUI altogether, I discovered that OpenSolaris is a very nicely organised and setup OS.

I just did the default full install, and probably got loads of stuff I’ll never use. Once I had bash setup as my default shell, I was off exploring the various features.

My favorite things so far are:

  • ZFS Volume management has never been so easy.
  • Zones/Containers A (semi-)isolated OS virtualization technique, that makes separating your environment so easy.
  • BlastWave Although not actually part of Solaris, this package manager makes installing software almost as simple as apt-get in Ubuntu.

So far I’ve migrated my MySQL server to it’s own isolated Zone, and shall be moving my web servers across in the next few days.

 
 

Downtime

My webserver was down for about 20 hours last night and today, this was while I updated it to Fedora Core 5. The update was successful and everything is back online.

I did have a few difficulties though; MySQL wasn’t liking one of the queries I use on my blog, i figured it must be something to do with the new version not dealing with lower and uppercase named columns in the same way. I re-wrote the query and now it works fine. Secondly, every time I logged into this site, it logged me straight back out again! I soon discovered that this was due to the server not being able to save PHP Sessions, as the folder pointed to by the session path didn’t exist! After creating the folder and setting the correct permissions, everything worked fine.

While I was at it, I took the liberty of naming my iBook, my workstation and my server, so as I can log into them without having to remember their individual IP addresses.

Update

For some reason YUM isn’t playing nice with me, so I don’t have GD image resize support at the moment. If any images are missing on any of my pages, it is because of this. I’m working to fix the problem now.

Update 2

Found a workaround for the problem (For those interested, the $releasever variable was returning Null to the .repos files, causing Yum to return errors. Solution was to replace every instance of the variable with a 5 in the repos), which has now allowed me to install GD. All running fine and dandy now.

 
 

Improved Image Resizing and Site Move

After much playing around I decided that my image resize script was chewing up too much processor time and memory, thus making page loads a lot longer.

The solution? Cache the thumbnails, and each time the script is called, check to see if an image with those parameters has already been created. If it has, return that image straight from storage, no waiting for it to be re-rendered.

But what happens if the original image is changed, surely the cached thumbnail will be out of date? For this I check that the last-modified date of the thumbnail is greater than that of the original. If not, it renders a new one.

Pretty spiffing. I’ll probably release this script when I’ve cleaned it up a bit

Anyone sharp eyed will have noticed that the URI for this page has changed slightly, I moved my site to the root directory, just felt like it really. I’m getting a lot of things not working because of this, so email any errors you come across to dougal@shearfx.com. Thanks.