• FreeBSD更新ports源


     http://ltyluck.blog.51cto.com/170459/420944

    如果没有make.conf就创建:
     cd /etc/
    vi make.conf
    加入下面的内容:
    MASTER_SITE_FREEBSD_ORG= ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/%SUBDIR%/
    MASTER_SITE_GNOME=  http://mirrors.geekbone.org/gnome/%SUBDIR%/
    MASTER_SITE_LOCAL=  ftp://ftp.cn.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/%SUBDIR%/
    MASTER_SITE_OVERRIDE=ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ 

    大功告成,这样更新ports,就直接从中国的服务器下载了。
    最后我们的ports使用axel来多线程下载,不知道axel在ports的那个位置,可以用下面指令找找:
    # cd /usr/ports
    # make search key=axel
    Port:   axel-1.0b
    Path:   /usr/ports/ftp/axel
    Info:   A download accelerator
    Maint: ports@FreeBSD.org
    B-deps: gettext-0.14.5_2 gmake-3.81_1 libiconv-1.9.2_2
    R-deps: gettext-0.14.5_2 libiconv-1.9.2_2
    WWW:    http://wilmer.gaast.net/main.php/axel.html
    其实还有一个更方便的方法就是whereis
    # whereis axel
    axel: /usr/ports/ftp/axel

    直接开始安装
    # cd /usr/ports/ftp/axel
    # make install clean
    安装完成以后,我们到make.conf进行设置,axel才能工作。
    # ee /etc/make.conf
    加入:
    FETCH_CMD=axel
    FETCH_BEFORE_ARGS= -n 10 -a
    FETCH_AFTER_ARGS=
    DISABLE_SIZE=yes

    这样编译出来的程序执行效率明显提高,呵呵。

  • 相关阅读:
    求最长不降子序列

    普通背包问题
    求最大子序列
    最大人品
    C# 显示webBrowser页面加载进度
    Provider 错误 '80004005' 未指定的错误 的最终解决方法
    C# 截取webBrowser网页存为图片
    浅谈Python小数据池
    js文件编译成动态链接库(dll)文件
  • 原文地址:https://www.cnblogs.com/shiningrise/p/2362356.html
Copyright © 2020-2023  润新知