下载整个ports目录,#portsnap fetch extract
更新整个ports目录,#portsnap fetch update
1.怎样找到我想安装的包路径:
# cd /usr/ports
# make search name=mysql (查找名为mysql的安装包)
2.仅仅下载源码包,而不安装:
# cd /usr/ports/directory (进入你想安装软件的目录下)
# make fetch
3.预先知道需要那些包,才能安装这个软件:
# cd /usr/ports/directory (进入你想安装软件的目录下)
# make all-depends-list
4.把软件装到指定的目录:
# cd /usr/ports/directory
# make PREFIX=/usr install
5.仅仅下载包,解包,而不安装:
# cd /usr/ports/directory
# make extract
6.用PORTS制作一个定制二进制包:
# cd /usr/ports/somewhere/frobble
# make extract
# cd work/frobble-2.8
[Apply your patches]
# cd ../..
# make package
7.强制安装:
# make install FORCE_PKG_REGISTER=yes clean
8.初始化一个port
# cd /usr/ports/directory
# make rmconfig
# make config
新手必杀技ports命令
cd /usr/ports
make deinstall #要是你没装cvsup,那就去装cd /usr/ports/net/cvsup-without-gui/ && make install
cd /usr/ports/sysutils/portupgrade
make install
#安装这个软件是新手省事而又带来新麻烦的好东西,尽管会带来一些新麻烦,但是还是推荐毕竟麻烦数量少了很多
9.显示已经安装的软件包
#pkg_info
10.如何删除一个软件包
#pkg-delete -r 软件包详细名
11、删除已安装软件及其他的依赖包
#make deinstall-depends
#make clean
12.重新安装已安装ports软件包
#make reinstall
13.想查看安装的软件是不是最新的
#pkg_version -v