Tuesday, April 23, 2013

FreeBSD: Upgrade from 8.2 to 9.0

To check the freebsd version;
#uname -a
-if generic, you can use this step.. :)

You can use this command to upgrade to latest release FreeBSD 9.0:

# freebsd-update -r 9.0-RELEASE upgrade

You might see following error:
The update metadata is correctly signed, but failed an integrity check. Cowardly refusing to proceed any further.

This error indicate that it cannot accept % and @ characters which appear in FreeBSD 9. To overcome this, run following command:

# sed -i '' -e 's/=_/=%@_/' /usr/sbin/freebsd-update

Now start the upgrade process:

# freebsd-update -r 9.0-RELEASE upgrade

Accept all prompted values and follow the wizard. This process downloads all files and patches required for upgrade so it takes time. You might need to press ‘Enter’ once to check /etc/hosts file. Once complete, run following command to start installing the updates:

To quit from vi:  type :q

Then it will asked you to run /usr/sbin/freebsd_update install 

The system must now be rebooted with the newly installed kernel before the non-kernel components are updated.

# reboot

After the process completed, the system will ask you to build back all your application which installed using ports. Once done, you need to rerun again the above command to complete the upgrade process and you should something like below:

# freebsd-update install 
Installing updates... Done

Your update should be completed now. To check the new version, run following command:
# uname -r 
9.0-RELEASE

BUT.. then my apache cannot start... OHHH NOOO... 

here is the error:
Performing sanity check on apache22 configuration:
httpd: Syntax error on line 105 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/libphp5.so into server: Shared object "libz.so.5" not found, required by "libphp5.so"

Edit this file
# ee /etc/libmap.conf

libz.so.5  libz.so

then... you can restart the apache /usr/local/etc/rc.d/apache22 restart


No comments:

Post a Comment