Upgrading from Fedora 7 to Fedora 8 with yum

Fedora 8 has been released so it is time to upgrade once again. First you should go back and upgrade to Fedora 7 if you haven't already. From there it is even easier this time to upgrade. Here are the steps you need to do the upgrade from Fedora 7 to Fedora 8:

  1. yum update
  2. yum clean all
  3. I like to repeated update and clean all a second time to make sure everything got updated
  4. Run the following command to update the yum repo on your box:
    rpm -Uhv http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-8-3.noarch.rpm  http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-notes-8.0.0-3.noarch.rpm
    
  5. Next do a yum -y update
  6. I needed to remove a couple packages to get the dependencies to work out. This seems to be a normal need now when upgrading but isn't usually a big deal. In this case I had to remove the heliodor and beryl-settings that both had to do with beryl.
  7. In my case the total set of packages it needed to download was 1.2G so it took about an hour to download and install. Now it was time for a reboot.
  8. The reboot went so fast I almost didn't believe it rebooted. This was the smoothest upgrade I have had so far.

Tags: ,

Connection timeouts with the Apache commons TelnetClient

I recently used the Apache commons net package in a project to create a small telnet client that automated a login process. It is hard to find a lot of documentation on TelnetClient but there are some examples. For what I wanted to use the telnet client for I ran into a problem because I needed the connect call to time out. Try as I might I couldn't get setDefaultTimeout to work as advertised.

Continue reading

10 Tips For Creating Good Looking Diagrams Using Inkscape

After multiple attempts to find a good free diagraming application I think I have found a decent solution. I'm not creating enough diagrams to justify buying something expensive and I don't feel like finding a graphics designer to make Dia diagrams prettier. If you have a Mac you are probably not in as bad a situation since you can buy OmniGraffle for $79. But for those of us without a Mac or who are just very cheap I think the best solution starts with Inkscape. I've put together a list of 10 tips that will help make better looking diagrams with Inkscape.

Continue reading

Upgrading from FC6 to Fedora 7 with yum

Now that Fedora 7 has been release it is time to upgrade from that crusty old Fedora Core 6. Note that they have removed the "Core" from the name so a few things have changed with the paths used in yum. Last year I did a post on how to upgrade from FC5 to FC6 and this upgrade happened on the first box I used for that.

  1. Before you start see the note after these steps about checking for disk labels
  2. yum update
  3. yum clean all
  4. I repeated update and clean all a second time to make sure everything got updated
  5. I then ran the command:
    rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/fedora-release-7-3.noarch.rpm http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/x86_64/os/Fedora/fedora-release-notes-7.0.0-1.noarch.rpm
    
  6. I then found that I had to move fedora-development.repo and fedora-updates.repo out of /etc/yum.repos.d/ and replace them with fedora-development.repo.rpmnew and fedora-updates.repo.rpmnew. I also needed to remove a custom repo I had but no longer used so I didn't take time to figure out why it needed to be removed.
  7. I then did a yum -y update and waited
  8. After a good wait another X server was started so you may think about not doing the update while running under X. Luckily it was able to start on another console so all was ok. Now it was time for a reboot.
  9. After the reboot I had to fix up some NVidia issues but overall it looks like it upgraded without a problem

Notes on disk labels:

There are a few things listed in the release notes under Upgrade Related Issues.

The first was to make sure all your drives have labels. You can do this by running the command "/sbin/blkid" and then checking that each line that is not part of the LVM system has a LABEL entry. If you need to add a label to a drive use the "/sbin/e2label" command and then edit your /etc/fstab to use the label on boot instead of the device.

LABEL=/boot             /boot                   ext3    defaults        1 2

You don't need to label LVM drives since the LVM keeps track of the drives it uses on its own. The only drive I had on a stock install that wasn't under the LVM was /boot and it had a label already.

After you upgrade they sugest running the following command and then upgrading anything that has a date before the upgrade date:

rpm -qa --last > RPMS_by_Install_Time.txt 

Tags: ,

Lots of new releases this week

It seems like this week has been release week for "web 2.0" stuff. Facebook F8 went live last week. All kinds of apps have followed.

Google released Maplets, a mashup editor, and Google Gears

Mapquest released an updated mapquest API that uses actionscript.

The one thing I note in all of these new releases is the lack of SOAP or enterprise related. Maybe it is just the current wave but most people seem to be embracing the less complicated API infrastructure.

Anonymous functions in PHP

I ran into this and found it interesting. Someone has added support for anonymous functions in PHP.

With the patch you can now do stuff like:

$data = array("zoo", "orange", "car", "lemon", "apple");
usort($data, function($a, $b) { return strcmp($a, $b); });
var_dump($data); # data is sorted alphabetically 

Before you had to use a funky function generation call.

Tags:

EC2 and NAT

Amazon just added NAT to their EC2 service. It also sounds like they will be turning the old direct addressing scheme off soon. This is probably a step towards assigning static IPs to your hosts in EC2. It may even allow you to have EC2 instances with no external IP address at all. It makes sense to not use an external IP when all you are doing is processing data from S3 and then sticking it back into S3. You can read more about the NAT change here.

Tags: ,

Howto base64 decode with C/C++ and OpenSSL

Someone asked for an example of decoding with OpenSSL on the Howto base64 encode with C/C++ and OpenSSL post. So here it is:

#include <string.h>

#include <openssl/sha.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>

char *unbase64(unsigned char *input, int length);

int main(int argc, char **argv)
{
  char *output = unbase64("WU9ZTyEA\n\0", strlen("WU9ZTyEA\n\0"));
  printf("Unbase64: *%s*\n", output);
  free(output);
}

char *unbase64(unsigned char *input, int length)
{
  BIO *b64, *bmem;

  char *buffer = (char *)malloc(length);
  memset(buffer, 0, length);

  b64 = BIO_new(BIO_f_base64());
  bmem = BIO_new_mem_buf(input, length);
  bmem = BIO_push(b64, bmem);

  BIO_read(bmem, buffer, length);

  BIO_free_all(bmem);

  return buffer;
}

Tags: , ,