全部博文(362)
分类: BSD
2010-10-30 12:40:47
例 4-1. 在本地手动下载一个package,并安装它
# ftp -a ftp2.FreeBSD.org Connected to ftp2.FreeBSD.org. 220 ftp2.FreeBSD.org FTP server (Version 6.00LS) ready. 331 Guest login ok, send your email address as password. 230- 230- This machine is in Vienna, VA, USA, hosted by Verio. 230- Questions? E-mail freebsd@vienna.verio.net. 230- 230- 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /pub/FreeBSD/ports/packages/sysutils/ 250 CWD command successful. ftp> get lsof-4.56.4.tgz local: lsof-4.56.4.tgz remote: lsof-4.56.4.tgz 200 PORT command successful. 150 Opening BINARY mode data connection for 'lsof-4.56.4.tgz' (92375 bytes). 100% |**************************************************| 92375 00:00 ETA 226 Transfer complete. 92375 bytes received in 5.60 seconds (16.11 KB/s) ftp> exit # pkg_add lsof-4.56.4.tgz
如果您没有本地package的安装盘 (如 FreeBSD CD-ROM), 可以执行 命令并加上 -r
选项。 这将迫使程序自动决定目标文件的正确格式和版本, 然后自动从一个 FTP 站点寻找和安装 package。
# pkg_add -r lsof
#pkg_info | grep lsof
#pkg_delete lsof4.84A,5
#pkg_add -r lsof