Using Portsnap to Update FreeBSD Ports Tree Collection Naudojant Portsnap atnaujinti FreeBSD Ports medis Kolekcija

Portsnap is a alternative system for securely distributing and updating the FreeBSD ports tree, which is easier to use than CVSup. Portsnap yra alternatyva sistemos saugiai paskirstyti ir atnaujinimo FreeBSD uostų medžio, kuris yra lengviau naudoti nei CVSup. Portsnap was first included in FreeBSD 6.0. Portsnap pirmą kartą buvo įtrauktas į 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. Kaip CVSup, Portsnap naudoja traukos modelis Atnaujinta: Į supakuotos ir pasirašytas uostų medžiai ant žiniatinklio serverio, kuris laukia pasyviai klientams prašyti failus arba rodyti portsnap rankomis vartotojai ar įsteigti cron parsisiųsti atnaujinimus automatiškai ir reguliariai.

On older FreeBSD systems, Portsnap is not automatically included, but it can be installed from sysutils/portsnap port by using command: Pagyvenusių sistemose FreeBSD, Portsnap nėra automatiškai įtraukiamos, bet jis gali būti įdiegtas iš sysutils / portsnap uosto naudojant komandą:

# 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 pirmą atsisiųsti ir atnaujinti Suspaudžia nuotraukos iš FreeBSD uostų medį saugomi / var / db / portsnap (į / usr / local / portsnap / jei Portsnap įdiegta iš FreeBSD Ports rinkimas) pagal nutylėjimą, tada tik ekstrakto ir atnaujinti nesaspiesti gyventi uostų medis / usr / ports.

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). Elgesio ir veiklos Portsnap kontroliuoja konfigūracijos failo portsnap.conf esančių / etc (/ usr / local / etc / jei Portsnap įdiegta iš FreeBSD Ports rinkimas ir konfigūracijos failas yra ne automatiškai, kai šviežiai įdiegtas, vietoj jums rasti portsnap.conf.sample, nukopijuokite jį kaip portsnap.conf). Generally, default configuration file will does its jobs. Paprastai numatytąją konfigūraciją failas nėra darbo vietų.

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: Į komandų eilutę, šių variantų yra remiama, tačiau didžiąją dalį laiko jis turi būti naudojamas, kai gali būti konfigūruojamas konfigūracijos failo:

-d workdir : Store working files (eg downloaded updates) in workdir. -d workDir: Laikyti darbo bylas (pvz., atsisiųsti atnaujinimus) ir workDir. (default: /var/db/portsnap, or as given in the configuration file) (pagal nutylėjimą: / var / db / portsnap, arba kaip nurodyta konfigūracijos failas)

-f conffile : Read the configuration from from conffile. -f conffile: Skaityti konfigūracijos iš conffile. (default: /etc/portsnap.conf) (pagal nutylėjimą: / etc / portsnap.conf)

-I : For the update command, update INDEX files, but not the rest of the ports tree. -Aš: Dėl atnaujinti komandą, atnaujinkite RODYKLĖ failus, bet ne kitų uostų medį.

-k KEY : Expect a public key with given SHA256 hash. k RAKTAS: Expect yra viešojo kodavimo rakto su pateikta SHA256 maišos. (default: read value from configuration file) (pagal nutylėjimą: perskaityti reikšmė iš konfigūracijos failą)

-p portsdir : When extracting or updating an uncompressed snapshot, operate on the directory portsdir. p-portsdir: Kai ištraukimo arba atnaujinimą nesuspaustų fotografiją, veikia katalogo portsdir. (default: /usr/ports/, or as given in the configuration file.) (pagal nutylėjimą: / usr / ports / arba atsižvelgiant į konfigūracijos rinkmeną.)

-s server : Fetch files from the specified server or server pool. s serveris: Fetch failus iš nurodyto serverio arba serverio baseinas. (default: portsnap.FreeBSD.org , or as given in the configuration file.) (pagal nutylėjimą: portsnap.FreeBSD.org, arba kaip nurodyta konfigūracijos rinkmenoje.)

path : For extract command only, operate only on parts of the ports tree starting with path. path: Dėl ekstrakto komandą tik, veikia tik tam tikruose uostuose medžio prasideda kelias. (eg portsnap sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) (pvz. portsnap sysutils / uosto būtų ekstrakto sysutils / portsman, sysutils / portsnap, sysutils / portupgrade ir tt)

The Synopsis for the Portsnap command line is: Į Synopsis už Portsnap komandų eilutės:

portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s server] command … [path] portsnap [I] [-d workDir] [-f conffile] [k Raktiniai] [p-portsdir] [-s serverio] komandą ... [kelias]

Usage of Portsnap Naudojimas Portsnap

  1. Create an empty directory /usr/ports if it does not exists. Sukurkite tuščią katalogą / usr / uostus, jei jis nėra.

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

  2. Fetch and download a compressed snapshot of the Ports Collection into /var/db/portsnap (or any other location specified in configuration file). Platinti atsisiųsti skompresowanym fotografiją uostų Kolekcija į / var / db / portsnap (ar bet kuri kita vieta, nurodyta konfigūracijos bylos). Internet connection needed at this stage) and update the existing snapshot. Interneto ryšį reikia šiame etape) ir atnaujinti esamas fotografiją.

    # portsnap fetch # Portsnap paimti

  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: Jei dirbate Portsnap, pirmą kartą (net jeigu uostų medžiai jau buvo sukurta ar apgyvendintos, leisti Portsnap nustatomas bazinės linijos, nuo kurios portsnap gali nustatyti, kurios dalys uostuose medžiai turi būti atnaujinama) arba / usr / ports hasn 't buvo apgyvendintos, ekstraktas fotografiją ir pakeičia esamus failus ir katalogus, ir nustato Portsnap Tvarkingas uostų medžio į katalogą / usr / ports:

    # portsnap extract # Portsnap ekstrakto

    This step can be skipped if you're only updating the ports tree. Šis žingsnis gali būti praleistas, jei tik atnaujinti uostų medį.

  4. If you already have a populated /usr/ports and you are just updating, run the following command instead: Jei jau esate užsiregistravęs apgyvendintos / usr / ports, ir jūs tiesiog atnaujinimą, paleiskite šią komandą vietoj:

    # portsnap update # Portsnap atnaujinti

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). Pastaba: Norėdami atnaujinti FreeBSD Ports medis žingsnis 1 ir 3 gali būti sujungti į vieną komandą: portsnap atsisiųsti atnaujinimą (ne paramos senesnę Portsnap).

Running Portsnap as Cron Job Veikia Portsnap su 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 paimti negalės vykdyti iš cron išvengti naštos Staigus parsisiųsti prašymą Portsnap serverių. 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. Vietoj to, specialusis portsnap Cron komandų egzistuoja, kuris laukia ir nemiega dėl atsitiktinių trukmė iki 3600 sekundžių prieš gaunant atnaujinimai, nes jei paims komanda yra nurodyta.

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): Norėdami paleisti portsnap automatiškai cron, tiesiog pridėkite eilutę į / etc / crontab (eilutėje nustatyti laiką iki 3 AM kasdien, jūs galite pasirinkti savo laiko):

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. Tai užtikrins, kad FreeBSD fotografiją uostuose kolekcija visada yra naujausia ir gali būti greitai išgaunami į katalogą / usr / ports.

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. Pastaba: Running portsnap atnaujinti Cron nerekomenduojama, nes gali sukelti problemų, jei įdiegti ar atnaujinti uosto atsitinka metu cron veikia. Portsnap will updates or removes files which are being used by the port build. Portsnap bus atnaujinimų ar pašalinti failus, kurie yra naudojami uosto statybos. 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. Tačiau rodyti portsnap I atnaujinti atnaujinti uostų Rodyklė failai yra įmanoma, ir gali būti naudojamas kartu su portversion nustatyti programine įranga, kuri yra pasenusi.

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: Norėdami atnaujinti uostų suspausto fotografiją ir indeksas failai yra / usr / ports / ir siųsti elektroninį paštą, jeigu visų įrengtų uostų yra pasenusi, naudokite šią eilutę į / etc / crontab:

0 3 * * * root portsnap -I cron update && pkg_version -vIL= 0 3 * * * root portsnap I-cron-update & & pkg_version-vil =

Note: Older version of portsnap does not support listing multiple commands (eg, cron update) in the same invocation of portsnap. Pastaba: Senesnės versijos portsnap nepalaiko aukcioną daug komandų (pvz., Cron atnaujinimu) toje pačioje mūzą iš portsnap. If the line above fails, try replacing portsnap -I cron update with portsnap cron && portsnap -I update. Jei aukščiau esančią eilutę, neduotų rezultatų, pabandykite portsnap pakeičia I-cron atnaujinti su portsnap Cron & portsnap-atnaujinti.

IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.


One Response to “Using Portsnap to Update FreeBSD Ports Tree Collection” Vienas Atsakas į "naudojimas Portsnap atnaujinti FreeBSD Ports medžių Kolekcija"

  1. Managing FreeBSD Ports « UNIX Administratosphere Vadybininkas FreeBSD Uostai «UNIX Administratosphere
    February 9th, 2008 18:04 Vasaris 9th, 2008 18:04
    1 1

    [...] at My Digital Life, there is an excellent tutorial on using portsnap. [...] Į Mano skaitmeninis gyvenimas yra puiki pamoka naudojant portsnap. It covers not only the basics, but all the rest as [...] Ji apima ne tik pagrindinius, bet visi kiti, kaip [...]

Leave a Reply Leave a Reply

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> Galite naudoti šias žymeles: <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. Subscribe to comments funkcija buvo išjungta. To receive notification of latest comments posted, subscribe to Norėdami gauti pranešimus apie naujausius komentarų, užsiprenumeruoti My Digital Life Comments RSS feed Mano skaitmeninis gyvenimas Komentarų RSS or arba register to receive registruotis, norint gauti new comments in daily email digest. Nauji komentarai kasdien elektroniniu paštu.
Custom Search

New Articles Nauji straipsniai

Incoming Search Terms for the Article Pradedantys Paieška Sąlygos straipsnį

freebsd ports tree update freebsd uostų medis atnaujinti - -- portupgrade portsnap portupgrade portsnap - -- update ports on freebsd 6 atnaujinti uostų FreeBSD 6 - -- how to upgrade ports tree in freebsd kaip atnaujinti uostų medis freebsd - -- portsnap update portsnap atnaujinti - -- portsnap usage portsnap naudojimo - -- update ports tree atnaujinti uostų medis - -- "Please update your ports tree and try again." "Prašome atnaujinti savo uostus medis ir bandykite dar kartą." - -- Please update your ports tree and try again Prašome atnaujinti savo uostus medis ir bandykite dar kartą - -- portsnap tutorial portsnap samouczku - -- portsnap howto portsnap Howto - -- portsnap fetch extract portsnap atnešti išrašą - -- upgrade ports collection modernizuoti uostus kolekcija - -- fetching public key from update2.freebsd.org... fetching viešojo rakto nuo update2.freebsd.org ... failed. nepavyko. - -- freebsd configure cron freebsd konfigūruoti Cron - -- freebsd update port tree freebsd atnaujinti uosto medis - -- how to update port tree freebsd kaip atnaujinti uosto medis freebsd - -- portsnap portsnap - -- ports tree update FreeBSD uostų medis atnaujinti FreeBSD - -- portsnap: Command not found portsnap: Command not found - -- portsnap graphical portsnap grafikai - -- portsnap failed portsnap nepavyko - -- update ports tree FreeBSD 7,0 atnaujinti uostų medis FreeBSD 7,0 - -- +"Please update your ports tree and try again" + "Prašome atnaujinti savo uostus medis ir bandykite dar kartą" - -- FreeBSD update ports tree FreeBSD atnaujinti uostų medis - -- freebsd 7 portsnap freebsd 7 portsnap - -- How to update freebsd ports Kaip atnaujinti freebsd uostai - -- portsnap portupgrade portsnap portupgrade - -- updating port tree FreeBSD Atnaujinta uosto medis FreeBSD - -- /var/db/portsnap does not exist / var / db / portsnap nėra - -- freebsd portsnap freebsd portsnap - -- portsnap: Directory does not exist: /var/db/portsnap portsnap: Katalogas neegzistuoja: / var / db / portsnap - -- portsnap freebsd 7 portsnap freebsd 7 - -- portsnap.conf proxy portsnap.conf Proxy - -- portsnap cron portsnap Cron - --