I've been happily running a FreeNAS box with PHP and MySQL, but it has dawned on me they've gone a while without any updates - simply because I don't know how to go about it. I'm familiar with linux and the command line etc. but am pretty new with FreeBSD. Can anyone give me a command that will show me what versions of each package (or are they ports?) I currently have installed? I've done some googling and believe it's something like "portversion -l", but would appreciate someone with a bit more experience confirming I followed a portion of this guide, starting at step 2 in the advanced section (about a third of the way down) to install the software when I built the machine - "pkg_add -r mysql50-server" and several of "pkg_add -r php5-xxx" for all the php extensions. Thanks for any help
This page should tell you all you need to know about Ports in FreeBSD. http://www.freebsd.org/doc/handbook/ports-using.html The CVSUP method isn't as good IMO as the portsnap method, but that's down to preference. To upgrade installed ports, I'd recommend the ports-mgmt/portupgrade port. See section "4.5.4.2 Upgrading Ports using Portupgrade" in the above handbook link.
thanks for the reply Although it seems I don't have portsnap... I only get 'command not found' errors. How do I fetch it?? All I can find are instructions for downloading the latest collection files...
ooh hang on. in /var/db/pkg/ there are a load of folders beginning with 'php5-' and 'mysql-' that look like what I'm trying to update... does that change anything? There is no 'ports' or 'portsnap' folder within '/var/db/' or '/usr/'..
had to use -r, but thanks Code: bright2a-nas:~# pkg_add portmaster pkg_add: can't stat package file 'portmaster' bright2a-nas:~# pkg_add -r portmaster Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/Latest/portmaster.tbz... Done. but where's it downloaded to? I'm guessing some sort of 'make install' thing is required next..
Should be somewhere under /var/db/pkg I think? Oh - just noticed you're using FreeNAS. I've got several FreeBSD8 boxes, but I haven't used FreeNAS.
freenas is bsd.. essentially and what you've said works so far... Code: bright2a-nas:/var/db/pkg/portmaster-2.19# install usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... bright2a-nas:/var/db/pkg/portmaster-2.19# cd ../ bright2a-nas:/var/db/pkg# install -d portmaster-2.19 bright2a-nas:/var/db/pkg# cd / bright2a-nas:/# portmaster /usr/local/sbin/portmaster: /usr/bin/make: Permission denied ===>>> The value of PORTSDIR cannot be empty ===>>> Aborting update bright2a-nas:/# any ideas?
Before we try and fix that, are you certain that portsnap isn't there? Reading this FreeNAS guide, it indicates it is: http://freenas.org/documentation:ho...ow_to_build_freenas_from_scratch?s[]=portsnap - find the "Fetching the ports-tree" section! Can you try "locate portsnap" please? And if locate's database is empty, try to execute /usr/libexec/locate.updatedb first.
all I'm getting is 'portsnap: command not found', 'pkg_version: command not found' etc. basically nothing is there. I didn't build it from source... don't worry about it... I'm completely out of my depth. thanks for all your help though
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/Latest/portsnap.tbz: File unavailable (e.g., file not found, no access) pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.3-release/Latest/portsnap.tbz' by URL