Using Portsnap to Update FreeBSD Ports Tree Collection Paggamit ng Portsnap sa I-update ang Tree FreeBSD port Collection

Portsnap is a alternative system for securely distributing and updating the FreeBSD ports tree, which is easier to use than CVSup. Portsnap ay isang alternatibong sistema para sa ligtas at pamamahagi ng mga pag-update ng mga puno ng mga "ports" FreeBSD, na kung saan ay mas madaling gamitin kaysa sa CVSup. Portsnap was first included in FreeBSD 6.0. Portsnap ay unang kasama sa FreeBSD 6.0. Like CVSup, Portsnap uses a pull model of updating: The packaged and signed ports trees are placed on a web server which waits passively for clients to request files by either run portsnap manually by users or set up a cron job to download updates automatically on a regular basis. Tulad ng CVSup, Portsnap ay gumagamit ng isang pull modelo ng mga pag-update ng: Ang mga nakabalot at pinirmahan mga "ports" na puno ay ilagay sa isang web server na kung saan hihintayin ng passively para sa mga kliyente sa kahilingan ng mga file sa pamamagitan ng alinman sa portsnap magpatakbo ng mano-mano sa pamamagitan ng mga user o set up ng isang cron job mag-download ng mga update awtomatikong sa isang regular na batayan.

On older FreeBSD systems, Portsnap is not automatically included, but it can be installed from sysutils/portsnap port by using command: Sa mga mas lumang mga sistema ng FreeBSD, Portsnap ay hindi awtomatikong kasama, ngunit maaari itong ma-install mula sa sysutils / portsnap port pamamagitan ng paggamit ng utos:

# pkg_add -r portsnap # Pkg_add-r portsnap

Portsnap first fetch and update compresses snapshots of the FreeBSD ports tree stored in /var/db/portsnap/ (in /usr/local/portsnap/ if Portsnap is installed from FreeBSD Ports Collection) by default, and then only extract and update the uncompressed live ports tree at /usr/ports. Portsnap unang sunduin at i-update snapshots compresses ng mga "ports" na puno ng FreeBSD na naka-imbak sa / var / db / portsnap / (sa / usr / local / portsnap / kung Portsnap ay nai-install mula sa FreeBSD port Collection) sa pamamagitan ng default, at pagkatapos lamang kunin at i-update ang uncompressed mabuhay "ports" na puno sa / usr / port.

The behaviour and operation of Portsnap is controlled by configuration file portsnap.conf located in /etc (in /usr/local/etc/ if Portsnap is installed from the FreeBSD Ports Collection, and the configuration file is not automatically generated when freshly installed, instead you'll found portsnap.conf.sample, just copy it as portsnap.conf). Ang pag-aasal at operasyon ng Portsnap ay kinokontrol ng configuration file portsnap.conf matatagpuan sa / etc (sa / usr / local / etc / kung Portsnap ay nai-install mula sa mga "ports" na FreeBSD Collection, at ang configuration file ay hindi awtomatikong nakabuo kapag sariwa na naka-install, sa halip na makikita mo natagpuan portsnap.conf.sample, kopyahin lamang ito bilang portsnap.conf). Generally, default configuration file will does its jobs. Kadalasan, ang mga file na default configuration ay ang kanyang trabaho.

At command line, the following options are supported, although most of the time it no need to be used, some can be configured in configuration file itself: Sa utos ng linya, ang mga sumusunod na opsyon ay suportado, bagaman karamihan ng mga oras na ito hindi na kailangan na gagamitin, ang ilan ay maaaring isinaayos sa configuration file mismo:

-d workdir : Store working files (eg downloaded updates) in workdir. -d workdir: Store gumawa ng mga file (gaya ng nai-download ng mga update) sa workdir. (default: /var/db/portsnap, or as given in the configuration file) (default: / var / db / portsnap, o bilang na ibinigay sa configuration file)

-f conffile : Read the configuration from from conffile. -f conffile: Basahin ang pagsasaayos mula sa mula sa conffile. (default: /etc/portsnap.conf) (default: / etc / portsnap.conf)

-I : For the update command, update INDEX files, but not the rest of the ports tree. -Ako: Para sa mga utos-update, i-update ang file na INDEX, ngunit hindi ang magpahinga ng ang mga puno ng mga "ports".

-k KEY : Expect a public key with given SHA256 hash. k-susi: Asahan isang pampublikong susi na may ibinigay na SHA256 sumira. (default: read value from configuration file) (default: basahin ang halaga mula sa configuration file)

-p portsdir : When extracting or updating an uncompressed snapshot, operate on the directory portsdir. -p portsdir: Kapag extracting o pag-update ng isang uncompressed na kuha, gumana sa portsdir direktoryo. (default: /usr/ports/, or as given in the configuration file.) (default: / usr / port /, o bilang na ibinigay sa configuration file.)

-s server : Fetch files from the specified server or server pool. -s server: Fetch mga file mula sa ibinigay na server o server pool. (default: portsnap.FreeBSD.org , or as given in the configuration file.) (default: portsnap.FreeBSD.org, o bilang na ibinigay sa configuration file.)

path : For extract command only, operate only on parts of the ports tree starting with path. landas: Para sa mga katas na utos lamang, gumana lamang sa mga bahagi ng mga "ports" na puno na nagsisimula sa landas. (eg portsnap sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) (eg portsnap sysutils / port ay kunin sysutils / portsman, sysutils / portsnap, sysutils / portupgrade, atbp)

The Synopsis for the Portsnap command line is: Ang Buod para sa linya Portsnap command ay:

portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s server] command … [path] portsnap [ako-] [-d workdir] [-f conffile] [-key k] [-p portsdir] [-s server] command ... [path]

Usage of Portsnap Paggamit ng Portsnap

  1. Create an empty directory /usr/ports if it does not exists. Gumawa ng isang walang laman na direktoryo ng / usr / "ports" na kung ito ay hindi umiiral.

    # mkdir /usr/ports # Mkdir / usr / port

  2. Fetch and download a compressed snapshot of the Ports Collection into /var/db/portsnap (or any other location specified in configuration file). Fetch at i-download ng isang compressed snapshot ng mga "ports" Collection sa / var / db / portsnap (o anumang iba pang mga lokasyon na tinukoy sa configuration file). Internet connection needed at this stage) and update the existing snapshot. Koneksyon sa Internet na kailangan sa stage na ito) at i-update ang umiiral na snapshot.

    # portsnap fetch # Portsnap sunduin

  3. If you are running Portsnap for the first time (even if a ports tree has already been created or populated, to let Portsnap establishes a baseline from which portsnap can determine which parts of the ports tree need to be updated) or /usr/ports hasn't been populated, extract the snapshot and replaces the existing files and directories, and establishes Portsnap-maintained ports tree into /usr/ports: Kung nagpapatakbo ka ng Portsnap para sa unang panahon (kahit na kung ang isang "ports" na puno ang nai-ginawa o sa tao, upang ipaalam sa Portsnap nagtatatag ng baseline na kung saan portsnap maaaring matukoy kung aling mga bahagi ng puno ng mga "ports" na kailangan upang ma-update) o sa / usr / "ports" na hasn 't ay napupunan, kunin ang snapshot at pumapalit sa mga umiiral na mga file at direktoryo, at nagtatatag ng Portsnap-pinananatili "ports" na puno sa / usr / port:

    # portsnap extract # Portsnap gata

    This step can be skipped if you're only updating the ports tree. Ang hakbang na ito ay maaaring Nilaktawan kung lamang ka pag-update ng mga "ports" na punong kahoy.

  4. If you already have a populated /usr/ports and you are just updating, run the following command instead: Kung ikaw ay mayroon ng isang tao / usr / "ports" na lamang at ikaw ay pag-update, patakbuhin ang mga sumusunod na utos sa halip na:

    # portsnap update # Portsnap i-update

Note: For updating of FreeBSD Ports Tree, step 1 and 3 can be combined into single command: portsnap fetch update (not support in older version of Portsnap). Paalala: Para sa mga pag-update ng mga "ports" na FreeBSD Tree, hakbang 1 at 3 ay pinagsama sa isang utos: portsnap sunduin i-update ang (hindi sumusuporta sa mas lumang bersyon ng Portsnap).

Running Portsnap as Cron Job Tumatakbo Portsnap bilang cron Job

portsnap fetch will not be able to execute from a cron job to avoid burden of sudden surge of downloading request to Portsnap servers. portsnap sunduin ay hindi maaaring ma-execute mula sa isang trabaho cron upang maiwasan ang mga pasanin ng biglang silakbo ng pag-download ng kahilingan sa Portsnap server. Instead, a special portsnap cron command exists, which waits and sleeps for a random duration up to 3600 seconds before fetching updates, as if the fetch command is specified. Sa halip, ang isang espesyal na command portsnap cron umiiral, na kung saan hihintayin at sleeps para sa isang random na panahon hanggang sa 3600 segundo bago ang pagkuha ng mga update, gaya ng kung ang sunduin utos ay tinukoy.

To run portsnap automatically with cron job, just add the line into /etc/crontab (the line set the time to 3 AM everyday, you can choose your own timing): Upang patakbuhin ang portsnap awtomatikong may cron job, idagdag lamang ang mga linya sa / etc / crontab (linya sa set ang oras sa 3 araw-araw, maaari mong piliin ang iyong sariling tiyempo):

0 3 * * * root /usr/sbin/portsnap cron 0 3 * * * * * * * root / usr / sbin / portsnap cron

This will ensure that the FreeBSD snapshot of ports collection is always up-to-date and can be quickly extracted into /usr/ports. Ito ay matiyak na ang mga FreeBSD na kuha ng mga "ports" na koleksyon ay laging up-to-date at maaaring mabilis na nakuha sa / usr / port.

Note: Running portsnap update from cron is not recommended as it may cause problem if installing or updating of a port happens at the time the cron job runs. Tandaan: Tumatakbo portsnap i-update mula sa cron ay hindi inirerekomenda bilang ito ay maaaring maging sanhi ng problema kung ang pag-install o pag-update ng isang port ang mangyayari sa oras ang cron job tumatakbo. Portsnap will updates or removes files which are being used by the port build. Portsnap ay mga update o alisin ang mga file na kung saan ginagamit ng port build. However, running portsnap -I update to update the ports Index files is possible, and can be used together with portversion to identify installed software which is out of date. Gayunman, tumatakbo portsnap-update ko na i-update ang mga "ports" na Index mga file ay posible, at maaaring gamitin kasama ng portversion upang makilala ang naka-install na software na ito ay luma na.

To update ports compressed snapshot and the INDEX files in /usr/ports/, and send an email if any installed ports are out of date, use the following line in /etc/crontab: Upang i-update "ports" na compressed na kuha at ang INDEX file sa / usr / port /, at magpadala ng isang email kung anumang naka-install na port ay luma na, gamitin ang sumusunod na linya sa / etc / crontab:

0 3 * * * root portsnap -I cron update && pkg_version -vIL= 0 3 * * * * * * * ugat portsnap-ko cron i-update & & pkg_version-Vil =

Note: Older version of portsnap does not support listing multiple commands (eg, cron update) in the same invocation of portsnap. Tandaan: Ang lumang bersyon ng portsnap ay hindi sumusuporta sa listahan ng maramihang mga utos (halimbawa, i-update ang cron) sa parehong pananalangin ng portsnap. If the line above fails, try replacing portsnap -I cron update with portsnap cron && portsnap -I update. Kung ang linya sa ibabaw nabigo, subukan pagpapalit portsnap-ko-update ang cron sa portsnap cron & & portsnap-update ko.

IMPORTANT : The page is machine translated and provided "as is" without warranty. MAHALAGA: Ang pahina ng makina ay isinalin at ibinigay "bilang ganito" walang warranty. Machine translation may be difficult to understand. Machine pagsasalin ay maaaring mahirap maintindihan. Please refer to Mangyaring sumangguni sa original English article orihinal na Ingles na artikulo whenever possible. hangga't maaari.


One Response to “Using Portsnap to Update FreeBSD Ports Tree Collection” One Response sa "Paggamit ng Portsnap sa FreeBSD-update ng mga" ports "Tree Collection"

  1. Managing FreeBSD Ports « UNIX Administratosphere Pamamahala ng mga "ports" FreeBSD «UNIX Administratosphere
    February 9th, 2008 18:04 Pebrero 9, 2008 18:04
    1 1

    [...] at My Digital Life, there is an excellent tutorial on using portsnap. [...] Sa My Digital Life, may isang mahusay na tutorial sa paggamit ng portsnap. It covers not only the basics, but all the rest as [...] Ito ay sumasaklaw hindi lamang ang mga pangunahing kaalaman, ngunit ang lahat ng mga natitirang bilang [...]

Leave a Reply Iwanan ng isang Sumagot

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Maaari mong gamitin ang mga tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Mag-subscribe sa mga komento na katangian ay hindi pinagana. To receive notification of latest comments posted, subscribe to Upang makatanggap ng paunawa ng pinakabagong mga puna, mag-subscribe sa My Digital Life Comments RSS feed Aking Digital Life Comments RSS feed or o register to receive magrehistro upang makatanggap ng new comments in daily email digest. mga bagong komento sa pang araw-araw email digest.
Custom Search

New Articles Bagong Akda

Incoming Search Terms for the Article Papasok na Kataga sa Paghahanap para sa mga Artikulo

freebsd portsnap FreeBSD portsnap - -- FreeBSD update ports tree FreeBSD i-update ang "ports" na puno ng - -- Please update your ports tree and try again. Mangyaring i-update ang iyong mga "ports" na puno at subukan muli. - -- Please update your ports tree and try again Mangyaring i-update ang iyong mga "ports" na puno at subukan muli - -- update ports tree i-update ang "ports" na puno ng - -- portsnap update portsnap i-update - -- freebsd update port tree FreeBSD i-update ang port puno - -- how to update ports tree kung paano i-update ang "ports" na puno ng - -- portsnap freebsd 7 portsnap FreeBSD 7 - -- portsnap cron portsnap cron - -- portsnap tutorial portsnap tutorial - -- portsnap freebsd portsnap FreeBSD - -- update ports tree freebsd i-update ang "ports" na puno ng FreeBSD - -- portsnap portsnap - -- updating freebsd ports FreeBSD pag-update ng mga "ports" - -- portsnap fetch update portsnap sunduin i-update - -- => Please update your ports tree and try again. => Mangyaring i-update ang iyong mga "ports" na puno at subukan muli. - -- freebsd 7 portsnap FreeBSD 7 portsnap - -- update port tree freeBSD i-update ang port puno FreeBSD - -- update freebsd ports tree i-update ang FreeBSD "ports" na puno ng - -- freebsd portsnap cron FreeBSD portsnap cron - -- "Please update your ports tree and try again." "Mangyaring i-update ang iyong mga" ports "na puno at subukan muli." - -- portsnap fetch failed portsnap sunduin bigo - -- update port tree i-update ang port puno - -- freebsd updating ports tree FreeBSD pag-update ng mga "ports" puno - -- portsnap usage portsnap paggamit - -- portsnap howto portsnap howto - -- freebsd ports tree update FreeBSD "ports" na puno ng update - -- freebsd upgrade port tree FreeBSD i-upgrade ang port puno - -- freebsd port tree update FreeBSD port i-update ang puno - -- fetching public key from portsnap failed habang kinukuha ang public key mula sa portsnap bigo - -- Fetching public key from portsnap.FreeBSD.org... Kinukuha ang public key mula sa portsnap.FreeBSD.org ... failed. nabigo. - -- Please update your ports tree Mangyaring i-update ang iyong mga "ports" na puno ng - -- freebsd portsnap server FreeBSD portsnap server - -- Please update your ports tree and try again. Mangyaring i-update ang iyong mga "ports" na puno at subukan muli. - -- freebsd ports update tree FreeBSD "ports" na i-update ang puno - -- updating ports tree pag-update ng mga "ports" puno - -- portsnap fetch extract portsnap sunduin gata - -- portsnap: Command not found portsnap: Command hindi natagpuan - -- portsnap failed portsnap bigo - -- portsnap portupgrade portsnap portupgrade - -- ports tree update "ports" na puno ng update - -- how to update port tree kung paano i-update ang port puno - -- freebsd please update your ports tree and try again FreeBSD mangyaring i-update ang iyong mga "ports" na puno at subukan muli - -- freebsd how to update ports tree FreeBSD kung paano i-update ang "ports" na puno ng - -- freebsd upgrade ports tree FreeBSD i-upgrade ang port puno - -- freebsd update ports FreeBSD i-update ang mga "ports" - -- freebsd portsnap update FreeBSD portsnap i-update - -- "Please update your ports tree and try again" "Mangyaring i-update ang iyong mga" ports "na puno at subukan muli" - -- Please update your ports tree and try again. Mangyaring i-update ang iyong mga "ports" na puno at subukan muli. freebsd FreeBSD - --