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
- 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
- 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
- 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į.
- 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.
Related Articles Susiję straipsniai
- Update FreeBSD Ports Collection to Latest Version with Security Update with Portmanager and Portaudit Atnaujinti FreeBSD Ports Kolekcija į naujausią versiją su saugos naujinimas su Portmanager ir Portaudit
- Update FreeBSD Ports Collection Up to Date and Latest Atnaujinti FreeBSD Ports Kolekcija Iki data ir paskutinė
- Searching for Application in FreeBSD's Ports Collection Ieškoma taikymas FreeBSD's Uostai Kolekcija
- Easy Way to Upgrade FreeBSD's Ports Easy Way to Upgrade FreeBSD's Uostai
- Portdowngrade - Downgrade to Previous Version of FreeBSD's Ports Portdowngrade - Grįžti prie ankstesnės versijos FreeBSD's Uostai
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 3 dalis
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 5 dalis
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 1 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 1 dalis
- Installing and Configuring DHCP Server (DHCPd) on FreeBSD Diegimas ir konfigūravimas DHCP Server (dhcpd), FreeBSD
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6.0 VMware Server Laikas ir laikrodis Slow Down










































February 9th, 2008 18:04 Vasaris 9th, 2008 18:04
[...] 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 [...]