Categories
OS Quest Trail Log

Trail Log #30: Out Sick Edition

Very little activity on the Quest this week as I was sidelined by a bug that’s been going around. This week was my turn. Other than a couple Apple updates and a Windows Home Server update later in the week I didn’t spend much time on the computer.

The big update news this week (at least for me) was the release of WordPress 2.5. I had the energy to update my test site yesterday afternoon but quickly ran out of steam. So the upgrade to this site will take place next weekend. This provides the added benefit of being able to to see the experience others have with the upgrade.

In addition to the updates I already mentioned, Apple released Apple TV 2.01. If Apple mentions this update anywhere on it’s website they hidden it well. The only change I noticed was the addition of a Genre button on the My Movies screen which is a useful addition. The update wasn’t problem free. After the update I could no longer stream anything from iTunes. It would sync fine but I could only play the synced items. Reboots and toggling the setting to enable/disable streaming did nothing. Eventually I broke the connection to iTunes and re-established it again. This erased everything from Apple TV and re-synced everything. Then streaming was fine.

That’s all for this week’s log – nice and short.

Categories
OS Quest Trail Log

The OS Quest Trail Log #29: Even More Updates Edition

It seems most of my time this week was spent installing even more updates. But at least it wasn’t all updates, the week started off with an Apache/PHP istallation and Apache Configuration. Now I just have to get around to setting up a website.

Apple’s Time Machine also made a comeback. I’d stopped using it just prior to the release of OS X 10.5.2 but I recently freed up an external USB hard drive so I hooked it up to my iMac and enabled Time Machine. Like before, I excluded my virtual machines. This time I also excluded my iTunes library. Due to the podcasts and videos that come and go it would eat up my Time Machine disk rather quickly, limiting the time I could go back. An old problem returned, when the external drive goes to sleep and the iMac reboots it doesn’t always see the drive again so the backups stop.

Software Updates

Apple pushed out four OS X updates over three days – Safari 3.1, a large security update, a Time Machine and Airport Driver Update, and an update to Camera RAW. The Safari 3.1 update meant I also needed a update to my 1Password software.

In addition to the updates I wrote about, I also upgraded to Vista Service Pack 1 later in the week. I upgraded Vista Home Premium and Vista Ultimate running on VMware Fusion and Vista Ultimate running on Parallels. The upgrades all took about 90 minutes and went without incident. In each case the download was just 66.9MB (out of a possible 427MB). I don’t use Vista enough to notice any change.

WordPress 2.5 still isn’t out yet, although a release candidate was published a couple of days ago. I’m waiting for the final release before I start testing. Rumor has it that it’ll be out next week in keeping with the original roadmap.

I’d been holding off updating the firmware on my 5th-gen iPod and was at least two firmware updates behind. I finally decided to go ahead and update it. It updated fine, although the iPod restart was unnervingly long. No noticeable differences, which at this point is a good thing.

Frustrations

There were¬† few this week but I’ve been having problems with sound on Windows Vista running on VMware. It works, but sounds like a AM radio with a lot of static. Unfortunately after switching the driver from stereo to mono the VMWare Fusion would pin both CPU cores at 100%. This required a force quit of VMware and then an iMac reboot to kill all the orphaned VMware processes.

My Apple TV has become another source of frustration. Its minor, but really annoying. There’s a noticeable delay in the menus when it loads the preview image. This causes dropped clicks and missed menu choices. I rather do without the previews and save the clicks.

The Week Ahead

That rounds up this week. I’m pretty close to finishing my Ubuntu Server build and WordPress 2.5 will probably be released within a few days. Logically it would make sense for me to finish the server build then use it as the test platform for WordPress 2.5. But the reality is if WP is released soon I’ll probably update my current test site and take a look at it. It still remains to be seen what will catch my attention in the week ahead.

Categories
Ubuntu Server Project

Ubuntu Server Project #8: Apache Configuration

Images in this 9 year old article have been lost.

The previous article in my Ubuntu Server Project series covered the installation of Apache. Now it’s time for some configuration. I’ll start off by looking around the Apache installation ten make some minor configuration changes.

The Apache config folder is /etc/apache2 which contains the following files & folders:

 

The names in blue are folders.

The sites-available folder has what it says, the sites that are available. But just because they’re available doesn’t mean they’re enabled. There’s one site in the sites-available folder, the default site.

 

To check which sites are actually enabled I view the contents of the sites-enabled folder:

 

This folder contains symlinks back to the sites-available folder for the enabled sites. As expected, the default site is already enabled. If a domain points to the server but doesn’t have a configuration files the first enabled sight (alphabetically) will be used. So by having the name 000-default this site is likely to be used.

The mods-available and mods-enabled folders work the same way. They contain the modules that are available and those that are enabled. These are the available modules with the default installation:

 

While these are the modules that are enabled by default:

 

There are four commands that make managing the enabled sites and modules easier than having to create the symlinks manually by using ln -s. They are:

a2ensite and a2dissite enabled and disable a site.

a2enmod and a2dismod will enable and disable a module.

So to disable the default site I run:

sudo a2dissite default

and get the following message:

Site default disabled; run /etc/init.d/apache2 reload to fully disable.

I gracefully reload Apache (so existing connections aren’t killed) with:

sudo apache2ctl graceful

When I try to access the site via by browser I get a 404 not found error instead of the “It Works” message. I also see that the symlink is gone from the site-enabled folder.

To enable the site again I execute:

sudo a2ensite default

sudo apache2ctl graceful

And the “It works” message returns. Now that I’ve looked around the structure of Apache it’s time to look at the configuration.

Port Configuration

By default Apache will listen on port 80 for http and port 443 for https (ssl). These are set in /etc/apache2/ports.conf, the contents of which are:

 

There’s no need for me to change anything.

Timeout & KeepAlive Configuration

The main Apache configuration file is /etc/apache2/apache2.conf which I open in the nano editor:

sudo nano /etc/apache2/apache2.conf

I scroll down the file and look at the various parameters. The first one I change is the timeout value, the default of which is 300 seconds. I change it to 45 seconds.

Timeout 45

Next up is KeepAlives, which are on by default (KeepAlive On). This allows persistent connections for a client so that each request (image, file, etc) doesn’t require a new connection. There are some additional KeepAlive parameters.

MaxKeepAliveRequests is described as “the maximum number of requests to allow during a persistent connection. Set to 0 to allow an unlimited amount. We recommend you leave this number high, for maximum performance”. I keep the default MaxKeepAliveRequests 100.

KeepAliveTimeout is described as “the number of seconds to wait for the next request from the same client on the same connection”. The default value is a rather high 15 seconds. There’s not a lot of interactivity on my pages so I’ll lower it to 3 seconds. If no new requests come in during that time the connection will be dropped. I change this to KeepAliveTimeout 3.

Pre-Fork MPM

During the installation I selected Pre-fork MPM (apache2-mpm-prefork) which is described in the Apache documentation. I’ll keep these settings at the default. The related settings are shown below.

 

ServerTokens

ServerTokens determines what information is set in the headers concerning products and modules installed. The default is Full which sends a lot of information. While it doesn’t actually make things more secure there’s no sense broadcasting the information so I change it to ServerTokens Prod which will just include Apache in the header.

ServerSignature

By default, server generated pages such as the 404 error page include a footer with server information.

 

Again, it won’t make things more secure but there’s no sense providing this information. I change ServerSignature to ServerSignature Off.

Virtual Host File

Each virtual host also has a configuration file which could overwrite the main configuration file. In this can the ServerSignature setting doesn’t work because it’s also set in the virtual host file. So I save the main config file and open the virtual host file.

sudo nano /etc/apache2/sites-available/default

I change the ServerSignature parameter to Off just like I did in the main file.

I do a graceful restart of Apache with sudo apache2ctl graceful and test the change. Now there’s no footer in my 404 page.

 

Summary

This completes the configuration of the server software that can serve as a training platform and a solid test bed for my WordPress test environment. Next on the agenda is coming up with a directory structure for my web sites and setting up the virtual hosts.

Categories
Ubuntu Server Project

Ubuntu Server Project #7: Apache & PHP Installation

Images in this 9 year old article have been lost.

Now that MySQL is installed the only remaining server software is Apache, PHP and WordPress. This time around I’ll install Apache & PHP. The installation is quick & easy. I’ll use aptitude to install both of them. As a refresher, if you haven’t read the previous articles, I’m building a WordPress test environment on a Ubuntu Server server that’s running in a VMware Fusion virtual machine.

I connect to the server using a SSH connection and mount the CD-ROM image with the command mount /cdrom/ so that the Apache and PHP software can be installed from the CD image.

First off I install Apache by running:

sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

Aptitude will take care of any dependencies. The installation runs without a problem. Apache 2.2.4 is the version installed.

I connect to the server from my MacBook (which is a different machine that the vm is running on) using the IP address of the Ubuntu server in my browser (http://10.0.1.200) and the following screen is displayed:

 

If I click on the apache2-default link I get the screen:

 

To make this second page the default, rather than the directory, I open the default vhost file:

sudo nano /etc/apache2/sites-available/default

Then I search for the line RedirectMatch ^/$ /apache2-default/ and uncomment it by removing the # and saving the file.

I then reload Apache so I can test the change. To reload Apache:

sudo /etc/init.d/apache2 reload

PHP Installation

I pick what appear to be the most common PHP modules for installation and install them through Aptitude which will handle the dependancies.

sudo aptitude install php5 libapache2-mod-php5

There are plenty of other PHP modules but I’ll start with the ones I know I’ll need and add others (like for MySQL) as they’re needed. I figure this way I’ll have a better idea of exactly what software depends on what other software or modules.

I reload Apache one last time and I’m done:

sudo /etc/init.d/apache2 reload

PHP 5.2.3 is the version installed.

This was a nice short article, not much more than a couple Aptitude installs. At this point I have a working LAMP server. Next up I’ll configure Apache.

Categories
OS Quest Trail Log

The OS Quest Trail Log #28: Linux Continues Edition

Another week on the Quest and the past week was mostly about Unix, especially when considering only the time I spent. The Ubuntu Server Project resumed with the installation of MySQL. I also tried to install OpenSUSE on VMware but was less than successful with that effort. I also did some preparation for WordPress 2.5 although it’s release was delayed. Maybe this week.

I also managed short amount of time last weekend to take some new pictures. During the week I was able to use those shots as my introduction to using the new Aperture. So far I find it a lot more approachable than Aperture 1.5. I found it easy to make slight adjustments to exposure and color but haven’t gone any deeper. Based on my first look Aperture 2 looks like a keeper, unlike Aperture 1.5 which I stopped using. Macworld has a review of Aperture 2.01 and Ars Technica has a extensive Aperture review by Dave Girard.

Frustrations

This weeks frustrations were all wrapped up in the OpenSUSE install. It’s mainly just annoying because it was an unproductive couple of hours. But not all that bad since I had no plans to use OpenSUSE, I was just curious.

This site experience another outage this week according to SiteUpTime. Like last week, this one was for less than thirty minutes.

Software Updates

It was Microsoft patch Tuesday this week, but since I don’t run any MS Office apps none of them were for me. Then there was the Apple Airport updates, the only change I noticed was that now the message saying the router will restart is clearer that it means connections will be lost.

I’ve also have a firmware update pending for my 5th-gen iPod but I’ve been holding off updating it. This will make the second firmware update I’ve ignored. I haven’t been having any iPod problems so I’ve decided to keep holding off. Some have reported problems with the update.

ISlayer released a update to iStat Pro which is now at version 4.6. Most of the updates are improved support for various hardware but they did add a new skin (purple) and the uptime panel now displays the number of processes running. iStat Pro is a standard widget on all my Mac dashboards.

From Around The Web

There’s the possibility that my Windows Home Server could get Power Pack 1 in April instead of waiting for June. June is also the eta for a fix to the data corruption bug. If PP1 was released in April it wouldn’t contain the bug fix. The MS Windows Home Server blog has this news. Since I’m on the subject of the data corruption bug Anandtech has a good analysis of the bug and why it will take so long to fix. The bottom line, it’s not so much a bug as a faulty algorithm that needs to be rewritten.

Categories
Ubuntu Server Project

Ubuntu Server Project #6: MySQL Server Installation

It’s been over a month without any activity, but the SQL server build is moving forward again. In the previous five installments I was installing, configuring and getting comfortable with the the basic Ubuntu install. The past articles can be found in the Ubuntu Server Project section on my Linux page.

Today’s task is to install MySQL, which is very straight-forward. I’ll make some guesses at a low-memory configuration but I’ll wait until the server is completely up before drilling deep into the optimizing.

I’ll be needing the original Ubuntu server CD for the installation. So I make sure that the CD drive for the VM is configured to open the ISO file with the Ubuntu server CD image. After I start the VM I connect with a remote SSH terminal session and mount the CD with the command mount /cdrom/.

Since the server has been untouched for over a month I start off by making sure the installed software is already up to date by executing the following commands:

sudo aptitude update

sudo aptitude safe-upgrade

Once this is done I’m ready to go. To install MySQL I use the following aptitude command:

sudo aptitude install mysql-server mysql-client

MySQL-server and MySQL-client are meta packages. They’ll install the latest server and client software that’s in the repository, which is currently MySQL 5.0.45. After running the command aptitude tells me the list of packages that will be installed.

 

Then I’m prompted to insert the CD, which is already mounted, so I hit <return> to move along.

I’m then prompted to enter a root password for MySQL. Even though this is a private server off the Internet I go ahead and enter one. There’s no confirmation prompt so I type carefully.

 

The installation runs and finishes a couple of minutes later without any problems. Now it’s time to configure MySQL for my small 256MB server.

Configuring MySQL for a 256MB Server

I’m not using the word optimize here for a specific reason. I won’t start optimizing until I have a WordPress site built and can better test performance. I’ll be configuring MySQL to have a small memory footprint now and I’ll optimize later.

First I check the current SQL memory usage by running top then pressing <shift>-<m> to sort by memory usage. This shows MySQL using about 6% of memory.

 

I open up the MySQL configuration file in the nano editor:

sudo nano /etc/mysql/my.cnf

The first thing I want to do is disable InnoDB. InnoDB is a storage engine but WordPress uses MyISAM by default so I don’t need it. Since it uses a great deal of memory I’ll turn it off by uncommenting (remove the #) the line skip-innodb.

I then search for and change the following values:

keybuffer from 16M to 16K

This is probably too small a value. But I’ll start low and raise it once all the other server software is installed and I start evaluating performance. From what I’ve read this setting is critical to performance and I’ll probably want to increase it.

max_allowed_packet from 16M to 1M

I’ll also look at increasing this once everything is installed. Memory is only allocated when needed but I shouldn’t be sending to much data in and out of MySQL through WordPress

thread_stack from 128K to 64K

This server is not going to have a lot of concurrent connections so we’ll start low and see how things look.

thread_cache_size from 8 to 4

This is the number of threads that are cached (after a user disconnects). New threads are only created when there’s none in the cache. Again, I lowered it because this will be a lightly used server.

I then added the following two new parameters just after thread_cache_size.

sort_buffer = 64K

I’m again starting with the smallest value that I’ve seen recommended for low memory servers and I’ll work my way up.

net_buffer_length = 2K

This is the starting size for the connection and result buffers. Both shrink to this size after each SQL statement.

After making all the changes I save the file and restart MySQL with the command:

sudo /etc/init.d/mysql restart

Then I run top and check the memory again. Now MySQL is only using 1.9% of memory.

 

So I’ve dropped memory usage by 2/3. Performance tuning will wait for a later session. Apache and PHP 5 are next on the to do list.

Reference:

Optimizing Apache & MySQL for Low Memory (Part 2) at Emergent Properties

MySQL Memory Usage at MySQL.com

InnoDB article at Wikipedia

Categories
OS Quest Trail Log

The OS Quest Trail Log #27: WordPress Edition

Another slow week on the Quest. The only item of note was that I figured out how to exclude WordPress categories from feeds and created a couple of new rss feeds for the site.

My interest in the customized feeds was driven by a redesign I’m considering for The OS Quest. I’m still bouncing around ideas but I’ve already started making changes to the current site. Even if I don’t go there visually I’m thinking about the site as a magazine with three main sections – OS X, Windows and Linux. So, if you pay way too much attention to the site you’ll notice that there’s been some changes to the categories and tags.

I also found time to go through Apple’s Aperture video tutorials and install Aperture 2. Aperture 2 seems a lot less dense and easier to get into that Aperture 1.5. I’m taking things a little slower with Aperture 2 rather than just diving in like I did with Aperture 1.5. I started off with the video tutorials to get an overview of Aperture and I installed the sample projects to play around with in the coming week.

Frustrations

This week’s frustrations were relatively minor and short-lived.

First it was my Apple TV, which is supposed to list content that’s both local and on in iTunes on my iMac. decided to ignore content on my iMac unless it was synced. I tried various things to fix it – reboot the Apple TV, disconnect and reconnect it to iTunes and disable/re-enable the streaming option – all without success. Then yesterday it just decided to start working again on it’s own.

My iMac had a brief bout with forgetfulness. I have it set to require a password when resuming from the screensaver. It decided that it didn’t want to ask for the password anymore. I figured a reboot would help but the iMac just didn’t want to shut down because it couldn’t stop Finder. I ended up having to power it off which I hate to do. But weren’t any problems after the reboot and the password was again required coming out of the screensaver.

And lastly, according to SiteUpTime this site had a outage on Saturday that lasted less than 30 minutes, Without the monitoring software I wouldn’t have noticed.

Software Updates

Technically, my Aperture 2 install was an upgrade. But I wanted to start fresh so I removed all the remnants of Aperture 1.5. Of course, right after installing Aperture 2 from CD I received the Aperture 2.0.1 update through Apple’s Software Update.

I did install Acorn 1.1, an update to the image editor from Flying Meat. There’s a long list if fixes and additions in the release notes. While Acorn is my primary image editor my needs are so small the changes don’t affect me.

I didn’t have any other software updates this past week, although WordPress 2.5 is due out in the coming week. That also means I should go through and update my plug-ins.

That’s it for this week’s trail log.

Categories
OS Quest Trail Log

The OS Quest trail Log #26: Microsoft Edition

There wasn’t much forward movement on the Quest this week as my day job tended to take up all my time. I did add some disk to my Windows Home Server and began ripping some DVDs and moving other files to it. The only software update was a very minor update to iPhoto.

On the Windows side of things I’ve completed a migration from my Windows XP Home virtual machine under Parallels to a HP Vista Ultimate virtual machine under VMware on my iMac. This wasn’t much of a migration. The only thing I regularly use Windows for is running Windows Live Writer to create these blog posts. Other than that it’s minor stuff to amuse myself. My change to VMware was motivated by the minor feature of being able to share the same shortcut keys between OS X and the VM. I also find that VMware provides a bit better support for non-Windows OS’s.

Frustrations

I got hit by the Windows Home Server data corruption bug this week and had to revert to the backup of my iTunes library. I can’t complain, I knew of the bug and I knew iTunes was on the list off possible problem software. At least the backups worked and I didn’t lose anything more than a little time. Well, I can complain – the bug needs to be fixed. Home Server is a less useful when data can’t be saved directly to the server.

Software Updates

I already mentioned the minor iPhoto update. I still have three updates waiting. Even though it’s been out awhile I still haven’t updated to the latest Skype software for OS X. It’s also been out awhile but I’m still a minor update behind for WordPress, although I did apply the security component of that update. The latest addition to my to do list is a release of Acorn 1.1.

All of the pending updates fall into the category of software that’s working fine for my needs now and I don’t want to spend time troubleshooting new problems that might appear. But Acorn and Skype probably get update this week. The Acorn update is pretty significant but I lack the motivation for a WordPress upgrade even though I could probably get away with just copying out the new files.

Website Pages Updated

I’ve updated a couple of other pages on the site.

What I Use has had the hardware I use updated. No major additions.

Backup Strategy & Tools has been updated to reflect a few minor changes.

Microsoft

It seems I’ve been very Microsoft centric the past two weeks, between the Windows Home Server and installing a couple new Windows VMs. So a couple of the recent Microsoft stories caught my attention.

The most recent story was the price cut for some retail versions of Vista. Microsoft is cutting the retail price (this is boxed copies on store shelves) for Vista Ultimate and Vista Home Premium. Some have said this is because Vista is a damaged product:

Vista is a damaged product that lacks many of the important elements a good operating system would boast. And although it may be a bit cheaper, it’s still not the OS XP was. Say what you will about Windows, but as it stands, XP is one of the best operating systems on the market today and Microsoft shouldn’t lose sight of that.

While I don’t dispute the assertion that Vista has a bad reputation today, if we go back it time to 2005 we see that CNet was also reporting problems with the acceptance of Windows XP at the time.

I seem to remember Windows XP being beaten up pretty good until recently. personally, I dumped Windows XP at home from Windows to OS X. I’d agree it has the largest installed base. I’m not sure I’d agree it’s better than Vista, it depends on how “better” is defined.

On the other hand I don’t see much benefit to the price cut. If people bought a new PC in the past year they had an opportunity to get Vista. Maybe this will spur them the upgrade to a higher flavor? If they didn’t buy Vista with the PC at the time are they really going to spend more money now to get Vista? I think not, although the price drop will coincide with Windows Vista SP1 so there might be a few people who take the plunge. If people bought a PC in 2006 they probably shouldn’t upgrade to Vista, unless they bought what was a high-end machine at the time, so I don’t see price doing much. And if people do buy it and install it on older machines it will only hurt Vista’s reputation even more.

Most copies of Vista will be sold with new hardware, as it should be. No one has mentioned an OEM price drop so this doesn’t seem to be big news. Now if Microsoft was to reduce the number of Vista flavors – Vista Home Premium, Vista Enterprise and maybe Vista Ultimate seems like a good mix (although I’d drop Ultimate – sell the added features as an add-in pack if you must) – then it would be big news and a real improvement. Then reduce the price even more.

The second story was the news that Microsoft had internal dissension over the Vista Capable program. To me this is a bigger problem for Microsoft (and I don’t mean the lawsuit itself) than any Vista problems.

Based on the e-mails it appears Microsoft was more concerned about keeping their partners happy and able to meet their profit targets. They needed to sell older chipsets to do this. These chipsets didn’t have the graphics power needed for some Vista features.

We have removed the requirement for Vista Capable machines … This was based on a huge concern raised by Intel…

This let Intel keep selling their older chipsets. What’s interesting here is that companies which were closer to the PC end-users didn’t seem to like this change. Even though on the surface it appears their marketing departments would have liked the change (assuming marketing always has a short-term view)

Ramano [John Romano, Senior VP of HP’s Consumer PC Group] specifically told Jim that HP will invest in graphics if MS would give him 100% assurance that we would not budge for Intel.

So HP was willing to invest the money to meet the requirements of Vista as long as they knew they could count on Microsoft to force Intel’s hand (Oh well). Even Wal-Mart was unhappy with the change, and they sell low-end, low-cost PCs.

Wal-Mart was very vocal today regarding the Windows Vista Capable messaging. They are extremely disappointed in the fact that standards were lowered and feel like customer confusion will ensue. … They also went so far as to say they wish Windows Home Basic was not even in the SKU lineup. … Please give this some consideration; it would be a lot less costly to do the right thing for the customer now than to spend dollars on the back end trying to fix the problem.

It appears Wal-Mart was able to predict the future. Yet, despite these protests from retailers who sell directly to end-users Microsoft appears to have been more concerned with keeping Intel happy.

I’ve been of the opinion that Microsoft has lost site of their customer and it’s their biggest problem. Now Microsoft is a big company and not everyone is completely desensitized to the computer user, but once the bureaucracy kicks in it seems territories and internal politics take precedence over product quality and customer experience. Hopefully Microsoft will learn from this and focus on the product and customer experience again.