转 FreeBSD通过PORTS安装软件的几个常用命令

FreeBSD通过PORTS安装软件的几个常用命令

1.怎样找到我想安装的包路径:
# cd /usr/ports
# make search name=mysql
2.
仅仅下载源码包,而不安装:
# cd /usr/ports/directory
# make fetch
3.
预先知道需要那些包,才能安装这个软件:
# cd /usr/ports/directory
# make fetch-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
#
删除所有软件,我刚用freebsd三个月的时候老使这个,删了安接着删…..费时费力哦,不推荐
cd /usr/ports
make fetchindex
#
别忘了使用ports安装软件前要升级ports系统啊,我现在天天用上边命令的脚本
#
要是你没装cvsup,那就去装cd /usr/ports/net/cvsup-without-gui/ && make install
cd /usr/ports/sysutils/portupgrade
make install
#
安装这个软件是新手省事而又带来新麻烦的好东西,尽管会带来一些新麻烦,但是还是推荐毕竟麻烦数量少了很多
rm -r /usr/ports
#
损招、阴招,现在想不起来当初为什么要用这个命令,不推荐啊不推荐~~
pkgdb -F
portversion | grep “<”
portupgrade -a
#
安装了portupgrade套件之后可以使用的命令,好用啊推荐
pkg_info
#
看看你都装什么软件了
portsclean -C
#
不明原因就是编译不过八成因为这个,平常也请多用,能清理ports内的临时文件
#
安装portupgrade套件之后才能使用新手必杀技ports命令
cd /usr/ports
make deinstall
#
删除所有软件,我刚用freebsd三个月的时候老使这个,删了安接着删…..费时费力哦,不推荐
cd /usr/ports
make fetchindex
#
别忘了使用ports安装软件前要升级ports系统啊,我现在天天用上边命令的脚本
#
要是你没装cvsup,那就去装cd /usr/ports/net/cvsup-without-gui/ && make install
cd /usr/ports/sysutils/portupgrade
make install
#
安装这个软件是新手省事而又带来新麻烦的好东西,尽管会带来一些新麻烦,但是还是推荐毕竟麻烦数量少了很多
rm -r /usr/ports
#
损招、阴招,现在想不起来当初为什么要用这个命令,不推荐啊不推荐~~
pkgdb -F
portversion | grep “<”
portupgrade -a
#
安装了portupgrade套件之后可以使用的命令,好用啊推荐
pkg_info
#
看看你都装什么软件
portsclean -C
#
不明原因就是编译不过八成因为这个,平常也请多用,能清理ports内的临时文件
#
安装portupgrade套件之后才能使用
这里没有什么特别的地方,只是提醒一下,安装完成后注意要更新到最新的ports tree
由于是最小化安装,所以需要通过 sysinstall 去把下面几个package安装上(via CD-ROM)
cvsup-without-gui #
更新ports tree 需要
perl # Perl
当然是很多地方需要的… ^^!
gmake #
安装mod_jk时需要
bash #
我不熟C Shell,所以我另外安装了这个

以下文章点击率最高

Loading…

     

如果这文章对你有帮助,请扫左上角微信支付-支付宝,给于打赏,以助博客运营

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注