免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1833 | 回复: 9
打印 上一主题 下一主题

[FreeBSD] 如何将一台服务器上ports 共享到其它机器上使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-08-30 00:27 |只看该作者 |倒序浏览
大家好 请教:

       现A机器上/usr/ports目录内容已经有很全,很多编译好的软件。B机器是一个新安装的机器。小弟想把A机器上ports文件通过nfs直接mount使用(如:直接make install ,不用再编译器一次)。可以这样吗? 如可以请帮助我写一下操作流程。

                                                                                                                                                                                                    谢谢

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
2 [报告]
发表于 2012-08-30 07:10 |只看该作者
make install

这背后是什么操作

论坛徽章:
0
3 [报告]
发表于 2012-08-30 13:10 |只看该作者
没必要,如果机器硬件配置一样,在A机完成后直接使用
make package-recursive
完成后将所有包拷贝到B机并执行
pkg_add xxxx即可

评分

参与人数 1可用积分 +2 收起 理由
ulovko + 2 感谢分享 ^_^

查看全部评分

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
4 [报告]
发表于 2012-08-30 13:19 |只看该作者
本帖最后由 ulovko 于 2012-08-30 13:27 编辑
Building Packages:

# make package
This installs the program on the local machine and creates a package in the port’s directory.
Simply copy this package to other systems and run pkg_add(1) to install it.
If you create the directory /usr/ports/packages, the Ports Collection will
create a packages tree in that location. Instead of placing the new package
in the port’s directory, the port will place the package in the appropriate
category under /usr/ports/packages.
--------------------------------------------------------------------------------
LOCAL PACKAGE REPOSITORIES
Remember the PACKAGESITE environment variable? Set that to a path on your local
anonymous FTP server (Chapter 17) or an NFS share (Chapter and put your custom
packages there. You can then use pkg_add -r on your other machines, and they will
automatically grab packages from your local repository.


FROM:  Absolute-FreeBSD-2nd-Edition  (PAGE 371)

http://bbs.chinaunix.net/thread-3751530-1-1.html

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
5 [报告]
发表于 2012-08-30 13:22 |只看该作者
本帖最后由 ulovko 于 2012-08-30 13:23 编辑

ports中make可带有的参数
  1. fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) into ${DISTDIR} as necessary.
  2. fetch-list - Show list of files that would be retrieved by fetch.
  3. fetch-recursive - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined), for port and dependencies into ${DISTDIR} as necessary.
  4. fetch-recursive-list - Show list of files that would be retrieved by fetch-recursive.
  5. fetch-required-list - Show list of files that would be retrieved by fetch-required.
  6. fetch-required - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined), for port and dependencies that are not already installed into ${DISTDIR}.
  7. all-depends-list - Show all directories which are dependencies for this port.
  8. build-depends-list - Show all directories which are build-dependencies for this port.
  9. package-depends-list - Show all directories which are package-dependencies for this port.
  10. run-depends-list - Show all directories which are run-dependencies for this port.
  11. extract - Unpacks ${DISTFILES} into ${WRKDIR}.
  12. patch - Apply any provided patches to the source.
  13. configure - Runs either GNU configure, one or more local configure scripts or nothing, depending on what's available.
  14. build - Actually compile the sources.
  15. install - Install the results of a build.
  16. reinstall - Install the results of a build, ignoring "already installed" flag.
  17. deinstall - Remove the installation.
  18. deinstall-all - Remove all installations with the same PKGORIGIN.
复制代码
package - Create a package from an _installed_ port.
package-recursive - Create a package for a port and _all_ of its dependancies.
  1. describe - Try to generate a one-line description for each port for use in INDEX files and the like.
  2. checkpatch - Do a "patch -C" instead of a "patch". Note that it may give incorrect results if multiple patches deal with the same file.
  3. checksum - Use distinfo to ensure that your distfiles are valid.
  4. checksum-recursive - Run checksum in this port and all dependencies.
  5. makesum - Generate distinfo (only do this for your own ports!).
  6. clean - Remove ${WRKDIR} and other temporary files used for building.
  7. clean-depends - Do a "make clean" for all dependencies.
  8. config - Configure options for this port (using ${DIALOG}). Automatically run prior to extract, patch, configure, build, install, and package.
  9. showconfig - Display options config for this port
  10. rmconfig - Remove the options config for this port
复制代码

论坛徽章:
0
6 [报告]
发表于 2012-08-30 17:36 |只看该作者
先谢谢各位。小弟44

论坛徽章:
29
技术图书徽章
日期:2013-09-02 19:59:502015元宵节徽章
日期:2015-03-06 15:51:332015小元宵徽章
日期:2015-03-06 15:57:20操作系统版块每日发帖之星
日期:2015-08-16 06:20:002015七夕节徽章
日期:2015-08-21 11:06:17操作系统版块每日发帖之星
日期:2015-09-21 06:20:002015亚冠之水原三星
日期:2015-10-30 00:06:07数据库技术版块每日发帖之星
日期:2015-12-24 06:20:0015-16赛季CBA联赛之上海
日期:2016-01-07 10:32:07操作系统版块每日发帖之星
日期:2016-01-08 06:20:00操作系统版块每日发帖之星
日期:2016-05-18 06:20:00IT运维版块每日发帖之星
日期:2016-07-23 06:20:00
7 [报告]
发表于 2012-08-30 17:54 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
8 [报告]
发表于 2012-08-30 18:48 来自手机 |只看该作者
用 tinderbox 或 poudriere 早已可定制到本地 packages / pkgng 源。再選擇用 nfs / ftp / http 方式發佈

评分

参与人数 1可用积分 +2 收起 理由
ulovko + 2 很给力!

查看全部评分

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
9 [报告]
发表于 2012-08-30 19:41 |只看该作者
@zeissoctopus
poudriere 早已可定制到本地 packages / pkgng 源

一直没研究这个东西 多谢指教 ^_^

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
10 [报告]
发表于 2012-08-30 21:04 |只看该作者
通过这个帖子,学习了不少的东西
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP