My APC Smart-UPS 700XL arrived yesterday so I decided to do the first step in relocating my server from next to my TV in my bedroom to inside my closet. The server is just a desktop PC size and isn’t extremely loud but it is noticeable when sleeping. I actually think it took me a while to sleep last night because I wasn’t used to the quiet! I will eventually have 2 or 3 computers running full time so I wanted them to have a place to be and a UPS for at least the NAS box. So now the NAS box is in my closet with the UPS. Soon I hope to have the UPS smart port connected to the NAS box so if power is not restored the box will shut itself off properly before losing power completely.
After relocating the NAS box, I decided I should try to keep my FreeBSD 6.2 server installation updated and do it regularly. I had done an update previously when I discovered my hard drive was bad but after reinstalling everything I hadn’t done another. The FreeBSD Handbook is a great resource and I went there to see the method for updating the ports tree. Keeping the ports tree up to date is important so whenever you decide to install a new program you have the latest information.
The main suggested way to keep the ports tree up to date is to use CVsup.
- First install CVSup as directed on the upgrading ports page.
- Continue following the instructions on the page by running CVSup and then I suggest taking the advice of creating your own supfile. The server closest to you will matter if you are outside the US but if inside, I have no idea which of the servers on the list are closest to me so just pick your favorite number and go from there!
- Follow the instructions in section 18.104.22.168 and install the port portupgrade.
- At least the first time you run portupgrade, you should use the -ai option so it will ask you to confirm before you actually upgrade each port. If you find you want every port upgraded then you can get rid of the -i part of the option.
I created a script to run the CVSup and made a crontab to run the script every Sunday night. I’ll have to wait until this Sunday to see if it works because I don’t feel like debugging it now by changing the timing of the crontab. I know the script runs when called from the command line. I didn’t include the portupgrade part in the script because I don’t want to be upgrading my ports all the time. If it’s working and there is no security fix then I really don’t need to upgrade it. But this way if I need to upgrade it, the current port is already there.
*Note* You should also keep the stable or current system tree up to date as well. I am using the stable because I just need things to work; not be the latest and greatest. This can be done by using CVSup but changing the supfile to one you will find in /usr/share/examples/cvsup/stable-supfile