Using Portsnap to Update FreeBSD Ports Tree Collection Izmantojot Portsnap atjaunināt FreeBSD Ports Tree Collection
Portsnap is a alternative system for securely distributing and updating the FreeBSD ports tree, which is easier to use than CVSup. Portsnap ir alternatīvu sistēmu droši sadali un atjaunināšanas FreeBSD ostās koks, kas ir vieglāk izmantot nekā CVSup. Portsnap was first included in FreeBSD 6.0. Portsnap pirmo reizi tika iekļauts 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. Tāpat kā CVSup, Portsnap izmanto pull modelis Atjaunināšana: Iepakotie un paraksta ostās koki laiž Web servera, kas gaida pasīvi klientiem pieprasīt failus, vai nu palaist portsnap manuāli lietotāju vai izveidot Cron darbs lejupielādēt atjauninājumus automātiski uz regulāri.
On older FreeBSD systems, Portsnap is not automatically included, but it can be installed from sysutils/portsnap port by using command: Uz vecākiem FreeBSD sistēmas, Portsnap nav automātiski ietverta, bet to var uzstādīt no sysutils / portsnap ostā, izmantojot komandu:
# 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 pirmo atnest un atjaunināt kompreses snapshots no FreeBSD porti koku uzglabā in / var / db / portsnap / (in / usr / local / portsnap / ja Portsnap ir uzstādīts no FreeBSD Ports Collection) pēc noklusējuma, un tikai tad ekstrakts un atjaunināt nesaspiesti dzīvot ostās koku AT / usr / ostās.
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). Uzvedība un darbība Portsnap kontrolē konfigurācijas failu portsnap.conf atrodas / etc (in / usr / local / etc / ja Portsnap ir uzstādīts no FreeBSD Ports Collection, un konfigurācijas fails nav automātiski rodas, svaigi uzstādītas, nevis jums konstatēts portsnap.conf.sample, vienkārši eksemplāru, tā kā portsnap.conf). Generally, default configuration file will does its jobs. Parasti noklusēto konfigurācijas failu būs tas savu darba vietu.
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: Pēc komandrindas, šādas iespējas ir atbalstīti, lai gan lielāko daļu laika tas nav nepieciešams, kas jāizmanto, daži var konfigur konfigurācijas failu sevi:
-d workdir : Store working files (eg downloaded updates) in workdir. -d workdir: Uzglabāt darba failus (piemēram, lejupielādēt atjauninājumus) in workdir. (default: /var/db/portsnap, or as given in the configuration file) (noklusējums: / var / db / portsnap, vai kā dots konfigurācijas fails)
-f conffile : Read the configuration from from conffile. -f conffile: lasīt konfigurācijas no no conffile. (default: /etc/portsnap.conf) (noklusējums: / etc / portsnap.conf)
-I : For the update command, update INDEX files, but not the rest of the ports tree. -I: Attiecībā uz update command, atjauniniet RĀDĪTĀJS failus, bet ne pārējo ostas koku.
-k KEY : Expect a public key with given SHA256 hash. -k KEY: sagaidīt publiskā atslēga ar doto SHA256 hash. (default: read value from configuration file) (noklusējums: lasīt vērtību no konfigurācijas fails)
-p portsdir : When extracting or updating an uncompressed snapshot, operate on the directory portsdir. -p portsdir: Kad ieguvi vai atjaunināšanu nesaspiesti momentuzņēmums, darbojas uz directory portsdir. (default: /usr/ports/, or as given in the configuration file.) (noklusējums: / usr / ostās /, vai, kā norādīts konfigurācijas failu.)
-s server : Fetch files from the specified server or server pool. -s serveris: spoks failus no konkrētā servera vai servera baseinu. (default: portsnap.FreeBSD.org , or as given in the configuration file.) (noklusējums: portsnap.FreeBSD.org, vai kā norādīts konfigurācijas failu.)
path : For extract command only, operate only on parts of the ports tree starting with path. ceļš: Par ekstrakts komandu tikai, darbojas tikai uz daļu no ostām koku sākot ar ceļu. (eg portsnap sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) (piemēram, portsnap sysutils / ostas būtu ekstrakts sysutils / portsman, sysutils / portsnap, sysutils / portupgrade, uc)
The Synopsis for the Portsnap command line is: Par Kopsavilkums par Portsnap komandrindas ir:
portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s server] command … [path] portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s servera] komanda ... [ceļu]
Usage of Portsnap Izmantojot Portsnap
- Create an empty directory /usr/ports if it does not exists. Izveidojiet tukšu direktorijā / usr / ostās, ja tas neeksistē.
# mkdir /usr/ports # Mkdir / usr / ostās
- Fetch and download a compressed snapshot of the Ports Collection into /var/db/portsnap (or any other location specified in configuration file). Atnest un lejupielādēt saspiestais momentuzņēmums ostu Collection vērā / var / db / portsnap (vai citā vietā, kas norādīta konfigurācijas failu). Internet connection needed at this stage) and update the existing snapshot. Interneta pieslēgums nepieciešams, šajā stadijā) un atjaunināt esošos momentuzņēmumu.
# portsnap fetch # Portsnap ķēriens
- 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: Ja jūs izmantojat Portsnap, kas pirmo reizi (pat ja ostas koku jau ir radīts vai apdzīvotu, lai ļautu Portsnap nosaka bāzes līnijas, no kuras portsnap var noteikt, kuras no ostas koks ir jāatjaunina), vai / usr / ostām hasn 't ir apdzīvotas, ekstrakta aktuālās un aizstāj spēkā esošos failus un katalogi, kā arī izveido Portsnap-uztur ostās koks uz / usr / porti:
# portsnap extract # Portsnap ekstrakts
This step can be skipped if you're only updating the ports tree. Šis solis var tikt izlaistas, ja jūs tikai atjaunināšanu ostām koku.
- If you already have a populated /usr/ports and you are just updating, run the following command instead: Ja jums jau ir apdzīvotas / usr / ostas un jums ir tikai atjaunināšanai, palaist šādu komandu vietā ir:
# portsnap update # Portsnap 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). Piezīme: atjaunināšanu FreeBSD Ports Tree soli 1 un 3, var apvienot vienu komandu: portsnap ķēriens atjauninājumu (ne vecākiem versija Portsnap).
Running Portsnap as Cron Job Running Portsnap kā Cron Darbs
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 ķēriens nevarēs izpildīt no Cron darbu, lai izvairītos no slogu pēkšņs pieaugums lejupielādēt lūgumu Portsnap serveriem. 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. Tā vietā, īpašu portsnap Cron komanda ir, kas gaida un neguļ uz izlases ilgums līdz 3600 sekundes pirms fetching atjauninājumus, kā tad, ja ķēriens komanda ir norādīts.
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): Lai palaistu portsnap automātiski ar Cron darbu, vienkārši pievienojiet līnijas stājas / etc / crontab (līnijas iestatītu laiku līdz 3 AM ikdienas, jūs varat izvēlēties savu laiku):
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. Tas nodrošinās, ka FreeBSD momentuzņēmums ostu savākšanas vienmēr ir atjaunināta, un to var ātri ekstrahē / usr / ostās.
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. Piezīme: Running portsnap update no Cron nav ieteicams, jo tas var izraisīt problēmu, ja instalēšanas vai atjauninātu ostā notiek laikā, kad Cron darbs sākas. Portsnap will updates or removes files which are being used by the port build. Portsnap būs atjauninājumiem vai likvidē failus, kas tiek izmantoti, ostas būvēt. 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. Tomēr, ekspluatācijas portsnap-I atjauninājumu, lai atjauninātu ostu Index failus ir iespējams, un to var izmantot kopā ar portversion, lai noteiktu uzstāda programmatūru, kas ir novecojis.
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: Lai atjauninātu ostu saspiestā momentuzņēmums un RĀDĪTĀJS files in / usr / ostās /, un sūtīt e-pastu, ja ir uzstādīta ostas ir novecojis, tad izmanto šādu līniju / etc / crontab:
0 3 * * * root portsnap -I cron update && pkg_version -vIL= 0 3 * * * sakne 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. Piezīme: Vecākas versijas portsnap neatbalsta uzskaitot vairākas komandas (piemēram, Cron update) tajā pašā piesaukšana no portsnap. If the line above fails, try replacing portsnap -I cron update with portsnap cron && portsnap -I update. Ja līnija virs neizdodas, mēģināt aizstāt portsnap-I Cron atjauninājums ar portsnap Cron & & portsnap-I atjauninājumu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Update FreeBSD Ports Collection to Latest Version with Security Update with Portmanager and Portaudit Update FreeBSD Ports Collection ar jaunāko versiju ar Drošības Update ar Portmanager un Portaudit
- Update FreeBSD Ports Collection Up to Date and Latest Update FreeBSD Ports Collection Līdz datums un Latest
- Searching for Application in FreeBSD's Ports Collection Meklē Piemērošana FreeBSD ostās Collection
- Easy Way to Upgrade FreeBSD's Ports Easy Way to Upgrade FreeBSD ostās
- Portdowngrade - Downgrade to Previous Version of FreeBSD's Ports Portdowngrade - pazemināt līdz iepriekšējās versijas FreeBSD ostās
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 3.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 5.daļa
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 1 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 1.daļa
- Installing and Configuring DHCP Server (DHCPd) on FreeBSD Instalēšana un konfigurēšana DHCP Server (DHCPd) par FreeBSD
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6,0 par VMware Server Laiks un Pulkstenis palēnināt










































February 9th, 2008 18:04 Februāris 9, 2008 18:04
[...] at My Digital Life, there is an excellent tutorial on using portsnap. [...] Pie Mana Digital Life, ir lieliska apmācība, izmantojot portsnap. It covers not only the basics, but all the rest as [...] Tas attiecas ne tikai uz pamatiem, bet visu pārējo, kā [...]