initrdimg 发表于 2012-08-30 00:27

如何将一台服务器上ports 共享到其它机器上使用

大家好 请教:

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

                                                                                                                                                                                                    谢谢

ulovko 发表于 2012-08-30 07:10

make install
这背后是什么操作 :emn31:

macafee 发表于 2012-08-30 13:10

没必要,如果机器硬件配置一样,在A机完成后直接使用
make package-recursive
完成后将所有包拷贝到B机并执行
pkg_add xxxx即可

ulovko 发表于 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 8) 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://cupic.img168.net/bbsfile/forum/201207/17/202850sbn3n3ann3v1xx0x.png
http://bbs.chinaunix.net/thread-3751530-1-1.html

ulovko 发表于 2012-08-30 13:22

本帖最后由 ulovko 于 2012-08-30 13:23 编辑

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

initrdimg 发表于 2012-08-30 17:36

先谢谢各位。小弟44

Hongqiyaodao 发表于 2012-08-30 17:54

zeissoctopus 发表于 2012-08-30 18:48

用 tinderbox 或 poudriere 早已可定制到本地 packages / pkgng 源。再選擇用 nfs / ftp / http 方式發佈

ulovko 发表于 2012-08-30 19:41

@zeissoctopus poudriere 早已可定制到本地 packages / pkgng 源
一直没研究这个东西 多谢指教 ^_^ :emn31:

beyondfly 发表于 2012-08-30 21:04

通过这个帖子,学习了不少的东西
页: [1]
查看完整版本: 如何将一台服务器上ports 共享到其它机器上使用