FreeBSD Diary
Upgrade 4.2 - 4.5: Makeworld:
We decided to update an older 4.2 server to 4.5 and update a bunch of ports that are out of date and needed to be patched for security reasons.
Here is the summary of what we wanted to accomplish
- Make world on my machine to upgrade it from FreeBSD 4.2 - 4.5
- Upgraded to PHP 4.1.2 (security fix)
- Installed PortVersion
- Upgraded several ports - but not all - not yet anyway!
Here is the summary of issues that we ran into:
- Could not make install after rebuilding my kernel to upgrade the binaries during make world
- SSH no longer worked
- mySQL functions missing from latest PHP install
- Broke samba
- Broke mail and webmail connection
Here is the more detailed list of problems and solutions:
- The 4.2 - 4.5 upgrade went pretty well except a few interesting problems:
- While doing the make install I had a couple of errors like:
smmpd group not valid (or not found - can't remember)
- Cause: different default users and groups from 4.2 - 4.5
- Solution: looked at master.passwd and groups in /etc/ and compared with /usr/src/etc/
added the missing users and groups using pw (my pw.conf contains default of nologin and no home dir):
ie:
pw groupadd smmpd -g25
pw useradd smmpd -u25 -g25 - SSH no longer allowed login
- Cause: pam.conf had changed
- Solution: copy pam.conf from /usr/src/etc/ to /etc/
- Note: Apparantly 4.2 and 4.3-4.5 used a different pam.conf
- While doing the make install I had a couple of errors like:
- Upgrading to PHP4.1.2 was painless except for one minor detail:
- MySQL functions were no longer loaded!!!!!
- Cause: somehow the makefile contained the option without mysql and would not take the value from configure
- Solution: Edit the makefile manually and change without mysql to with mysql - Also had to update the Zend Optimizer I have installed as it is PHP version dependant (just downloaded and installed)
- MySQL functions were no longer loaded!!!!!
- Portupgrade was pretty easy to use but a little confusing on parts
- You must run 'pkgdb -F' first and answer all the questions correctly. It is a little confusing here and I screwed up a little. If in doubt of what to do- SKIP (you can always run this command later
- CVSup your ports
- Run 'portsdb -Uu' - always run this after cvsup'inig
- Run 'portversion | grep "<" ' to find out which ports are out of date
- Run 'portupgrade -PR [port_name listed in d] ' to upgrade a single port and all of it's dependencies or
run 'portupgrade -aPR' to automatically update all out of date ports
- Look at the /usr/ports/sysutils/portupgrade/pkg_desc for other commands like portclean, etc
- Most of the ports upgraded no problem except for a few exceptions:
- Samba installed the devel version
- Cause: I screwed up during pkgdb -F command
- Solution: deinstall and install samba.2.2.3a (I think that is the version) - Stable Samba version didn't recognize my password anymore
- Cause: beats the hell out of me
- Solution: remove and recreate samba account(s)
smbpasswd -x username
smbpasswd -a username - Upgraded cclient which is linked with IMAP and Courier and mail users could no longer log in using Outlook/Express/etc
- Cause: Courier upgrade caused a change in my password file
- Solution: change all passwords manually (ya right!) or
touch /etc/userdb
chmod 600 /etc/userdb
masteruserdb (or something like: masterdb) - Upgrade the mysql-client and server and then did a portclean -L which caused webmail to fail
- Cause: apparantly one of the libmysql????.so.6 is required by my mail installed
- Solution: copy the backup of .so (thanks portclean for not deleting them!!!) from the /usr/local/lib/compat/ folder to the appropriate location
- Samba installed the devel version