Using Portsnap to Update FreeBSD Ports Tree Collection השימוש Portsnap לעדכן FreeBSD עץ אוסף יציאות

Portsnap is a alternative system for securely distributing and updating the FreeBSD ports tree, which is easier to use than CVSup. Portsnap הוא חלופה בטוחה עבור מערכת הפצה ולעדכון את FreeBSD יציאות העץ, שהוא קל יותר מאשר שימוש CVSup. Portsnap was first included in FreeBSD 6.0. Portsnap היה הראשון לולכה 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. כמו CVSup, Portsnap משתמשת למשוך מודל של עדכון: חתמה על packaged ואת יציאות עצים ממוקמות על שרת אינטרנט אשר ממתינים passively עבור לקוחות לבקש הקבצים או על ידי הפעלת portsnap באופן ידני על ידי משתמשים או להגדיר cron העבודה כדי להוריד את העדכונים באופן אוטומטי על בסיס קבוע.

On older FreeBSD systems, Portsnap is not automatically included, but it can be installed from sysutils/portsnap port by using command: ב FreeBSD במערכות ישנות יותר, Portsnap אינה כלולה באופן אוטומטי, אבל זה יכול להיות מותקן מ sysutils / יציאה portsnap באמצעות הפקודה:

# 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 הראשונה תופסת ולעדכן compresses תצלומים של FreeBSD יציאות עץ מאוחסנים / var / DB / portsnap / (ב / usr / local / portsnap / Portsnap אם מותקן מ FreeBSD יציאות אוסף) כברירת מחדל ולאחר מכן רק לחלץ ולעדכן את לא דחוס יציאות גר בבית עץ / usr / יציאות.

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). את התנהגות ותפעול של Portsnap מבוקר על ידי קובץ התצורה portsnap.conf במיקום / וכו '(ב / usr / local / etc / אם Portsnap מותקן FreeBSD מתוך אוסף יציאות, ואת תצורת הקובץ שנוצר באופן אוטומטי כאשר לא מכבר הותקנה, במקום תוכל למצוא portsnap.conf.sample, פשוט להעתיק את זה כמו portsnap.conf). Generally, default configuration file will does its jobs. בדרך כלל, ברירת המחדל של קובץ התצורה שלו יהיה האם עבודות.

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: באותה שורת הפקודה, את האפשרויות הבאות נתמכים, אם כי רוב הזמן זה לא צריך להיות בשימוש, חלקם ניתן להגדיר את עצמו בתוך קובץ התצורה:

-d workdir : Store working files (eg downloaded updates) in workdir. -D workdir: חנות עובדים קבצים (לדוגמה, הורדת עדכונים) ב workdir. (default: /var/db/portsnap, or as given in the configuration file) (ברירת מחדל: / var / DB / portsnap, או כפי שניתן בקובץ התצורה)

-f conffile : Read the configuration from from conffile. F-conffile: קרא את תצורת מ מ conffile. (default: /etc/portsnap.conf) (ברירת מחדל: / etc / portsnap.conf)

-I : For the update command, update INDEX files, but not the rest of the ports tree. אני: עבור העדכון הפקודה, עדכון אינדקס קבצים, אך לא את שאר היציאות עץ.

-k KEY : Expect a public key with given SHA256 hash. K-Key: צפוי עם מפתח ציבורי נתון SHA256 שירים. (default: read value from configuration file) (ברירת מחדל: לקרוא את הערך של קובץ התצורה)

-p portsdir : When extracting or updating an uncompressed snapshot, operate on the directory portsdir. P-portsdir: כאשר לחילוץ או עדכון של תמונת מצב לא דחוס, לפעול על ספרייה portsdir. (default: /usr/ports/, or as given in the configuration file.) (ברירת מחדל: / usr / ports / או כפי שנמסרו בקובץ התצורה.)

-s server : Fetch files from the specified server or server pool. -S Server: תביא קבצים של השרת או השרת שצוין הבריכה. (default: portsnap.FreeBSD.org , or as given in the configuration file.) (ברירת מחדל: portsnap.FreeBSD.org, או כפי שניתן בקובץ התצורה.)

path : For extract command only, operate only on parts of the ports tree starting with path. נתיב: עבור לחלץ רק פקודה, לפעול אך ורק על חלקים של העץ יציאות החל הנתיב. (eg portsnap sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) (למשל portsnap sysutils / יציאה היה לחלץ sysutils / portsman, sysutils / portsnap, sysutils / portupgrade, וכו ')

The Synopsis for the Portsnap command line is: את Portsnap תקציר של שורת הפקודה היא:

portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s server] command … [path] portsnap [אני] [workdir-D] [-f conffile] [KEY-K] [-P portsdir] [-S Server] הפקודה ... [נתיב]

Usage of Portsnap השימוש Portsnap

  1. Create an empty directory /usr/ports if it does not exists. צור ריק במדריך / usr / יציאות אם היא אינה קיימת.

    # mkdir /usr/ports # Mkdir / usr / יציאות

  2. Fetch and download a compressed snapshot of the Ports Collection into /var/db/portsnap (or any other location specified in configuration file). תביא ולהוריד דחוס תצלום של היציאות אוסף לתוך / var / DB / portsnap (או בכל מיקום אחר שצוין קובץ תצורה). Internet connection needed at this stage) and update the existing snapshot. חיבור לאינטרנט יש צורך בשלב זה) ולעדכן את תמונת מצב הקיים.

    # portsnap fetch # Portsnap תופסת

  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: אם אתה מפעיל Portsnap בפעם הראשונה (גם אם יציאות העץ כבר נוצר או אוכלסו, לתת Portsnap יוצר הבסיס שממנו portsnap יכול לקבוע אילו חלקים של יציאות עץ צריך להיות מעודכנים), או / usr / יציאות hasn לא היה מאוכלס, לחלץ את תמונת מצב ומחליף את הקבצים הקיימים ואת ספריות, ו-קובע Portsnap מתוחזקת יציאות העץ לתוך / usr / יציאות:

    # portsnap extract # Portsnap לחלץ

    This step can be skipped if you're only updating the ports tree. שלב זה יכול להיות דילוג על אם אתה רק מעדכן את היציאות עץ.

  4. If you already have a populated /usr/ports and you are just updating, run the following command instead: אם כבר יש לך מיושב / usr / יציאות ואתה רק לעדכן, הפעל את הפקודה הבאה במקום:

    # portsnap update # Portsnap עדכון

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). הערה: לעדכון של FreeBSD יציאות עץ, שלב 1 ו 3 ניתן לשלב בפקודה אחת: portsnap תופסת עדכון (לא תומך ב Portsnap של הגרסה הישנה).

Running Portsnap as Cron Job הפעלת Portsnap כפי 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 תופסת לא יוכלו לבצע את העבודה מתוך cron, כדי למנוע עומס של התפרצות פתאומית של הורדת בקשת Portsnap שרתים. 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. במקום זאת, מיוחד portsnap cron פקודה קיימת, אשר ממתין ו ישן עבור אקראית משך עד 3600 שניות לפני האחזור עדכונים, כאילו ניתן להשיג את הפקודה שצוינה.

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): כדי להפעיל portsnap אוטומטית עם cron עבודה, פשוט הוסף את השורה לתוך / etc / crontab (בחר את קו הזמן 3 בבוקר כל יום, אתה יכול לבחור את משך הזמן):

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. זה יבטיח כי FreeBSD תמונת מצב של יציאות אוסף הוא תמיד עדכני וניתן שחולצו במהירות לתוך / usr / יציאות.

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. הערה: הפעלת portsnap העדכון של cron אינו מומלץ משום שהוא עלול לגרום לבעיה או אם התקנת עדכון של יציאת קורה בעת עבודה cron פועל. Portsnap will updates or removes files which are being used by the port build. Portsnap יהיו עדכונים או מסירה קבצים אשר נמצאים בשימוש על ידי יציאת לבנות. 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. עם זאת, אני מפעיל portsnap-עדכון לעדכן את היציאות אינדקס קבצים אפשרי, ויכול לשמש יחד עם portversion לזהות בו מותקנת התוכנה אינו מעודכן.

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: כדי לעדכן יציאות דחוסים בעין המצלמה ואת מדד קבצים ב / usr / ports / ולשלוח דוא"ל אם כל היציאות הם מותקנים לא מעודכנת, את השורה הבאה להשתמש ב / etc / crontab:

0 3 * * * root portsnap -I cron update && pkg_version -vIL= 0 3 * * * שורש portsnap-cron עדכון אני & & pkg_version-vIL =

Note: Older version of portsnap does not support listing multiple commands (eg, cron update) in the same invocation of portsnap. הערה: הגרסה הקודמת של portsnap הרישום אינו תומך במספר פקודות (לדוגמה, cron עדכון), באותו השבעה של portsnap. If the line above fails, try replacing portsnap -I cron update with portsnap cron && portsnap -I update. אם שורה מעל נכשל, נסה להחליף portsnap-cron אני עם portsnap עדכון cron & & portsnap-אני מעדכן.

IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף הוא מכונה בתרגום ובתנאי "כמות שהוא", ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to אנא פנה ל original English article המאמר המקורי באנגלית whenever possible. ככל שניתן.


One Response to “Using Portsnap to Update FreeBSD Ports Tree Collection” תגובה אחת ל "שימוש Portsnap לעדכן FreeBSD יציאות עץ האוסף"

  1. Managing FreeBSD Ports « UNIX Administratosphere ניהול FreeBSD יציאות «UNIX Administratosphere
    February 9th, 2008 18:04 9 בפברואר, 2008 18:04
    1 1

    [...] at My Digital Life, there is an excellent tutorial on using portsnap. [...] דיגיטליות החיים שלי, שם הוא מצויין הדרכה על השימוש ב-portsnap. It covers not only the basics, but all the rest as [...] זה מכסה לא רק את הבסיס, אבל כל השאר כפי [...]

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> אתה יכול להשתמש בקבצי תגיות: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <דל datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. הצטרף כמנוי ל הערות תכונה הושבת. To receive notification of latest comments posted, subscribe to כדי לקבל הודעה על תגובות העדכנית פורסם, כדי להירשם My Digital Life Comments RSS feed החיים שלי דיגיטלי תגובות RSS Feed or או register to receive הרשמה לקבלת new comments in daily email digest. תגובות חדש ב דוא"ל תקציר יומי.
Custom Search

New Articles מאמרים חדשים

Incoming Search Terms for the Article חיפוש נכנס על תנאי סעיף

freebsd ports tree update FreeBSD יציאות עץ עדכון - -- portupgrade portsnap portupgrade portsnap - -- update ports on freebsd 6 עדכון על FreeBSD 6 יציאות - -- how to upgrade ports tree in freebsd כיצד לשדרג יציאות עץ ב FreeBSD - -- portsnap update עדכון portsnap - -- portsnap usage portsnap שימוש - -- update ports tree עדכון יציאות עץ - -- "Please update your ports tree and try again." "אנא עדכן את יציאות העץ ונסה שוב." - -- Please update your ports tree and try again אנא עדכן את היציאות העץ ונסה שוב - -- portsnap tutorial portsnap הדרכה - -- portsnap howto portsnap howto - -- portsnap fetch extract portsnap תופסת לחלץ - -- upgrade ports collection שדרוג אוסף יציאות - -- fetching public key from update2.freebsd.org... שובה לב ציבורית המפתח מ update2.freebsd.org ... failed. נכשל. - -- freebsd configure cron FreeBSD להגדיר cron - -- freebsd update port tree עדכון יציאת FreeBSD עץ - -- how to update port tree freebsd כיצד לעדכן עץ יציאת FreeBSD - -- portsnap portsnap - -- ports tree update FreeBSD יציאות עץ עדכון FreeBSD - -- portsnap: Command not found portsnap: פקודה לא נמצאה - -- portsnap graphical portsnap הגרפי - -- portsnap failed portsnap נכשלה - -- update ports tree FreeBSD 7,0 עדכון יציאות עץ FreeBSD 7,0 - -- +"Please update your ports tree and try again" + "אנא עדכן את היציאות העץ ונסה שוב" - -- FreeBSD update ports tree FreeBSD עדכון יציאות עץ - -- freebsd 7 portsnap FreeBSD 7 portsnap - -- How to update freebsd ports כיצד לעדכן FreeBSD יציאות - -- portsnap portupgrade portsnap portupgrade - -- updating port tree FreeBSD עדכון יציאת עץ FreeBSD - -- /var/db/portsnap does not exist / var / DB / portsnap אינו קיים - -- freebsd portsnap FreeBSD portsnap - -- portsnap: Directory does not exist: /var/db/portsnap portsnap: הספרייה לא קיימת: / var / DB / portsnap - -- portsnap freebsd 7 portsnap FreeBSD 7 - -- portsnap.conf proxy portsnap.conf proxy - -- portsnap cron portsnap cron - --