Using Portsnap to Update FreeBSD Ports Tree Collection Menggunakan Portsnap ke Update FreeBSD Ports Tree Koleksi
Portsnap is a alternative system for securely distributing and updating the FreeBSD ports tree, which is easier to use than CVSup. Portsnap merupakan alternatif sistem aman untuk mendistribusikan dan memperbarui FreeBSD port pohon, yang lebih mudah digunakan daripada CVSup. Portsnap was first included in FreeBSD 6.0. Portsnap pertama kali termasuk dalam 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. Seperti CVSup, Portsnap menggunakan model tarik update: The kemasan dan pohon port ditempatkan di web server yang pasif menunggu untuk klien untuk meminta file baik menjalankan portsnap secara manual oleh user atau mengatur cron pekerjaan untuk mendownload update secara otomatis pada secara berkala.
On older FreeBSD systems, Portsnap is not automatically included, but it can be installed from sysutils/portsnap port by using command: FreeBSD pada sistem lama, Portsnap tidak disertakan secara otomatis, tetapi dapat diinstal dari sysutils / portsnap port dengan menggunakan perintah:
# 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 pertama dan mendapatkan update compresses snapshot dari FreeBSD port pohon yang disimpan di / var / db / portsnap / (di / usr / local / portsnap / jika Portsnap terinstal dari FreeBSD Ports Collection) secara default, dan hanya kemudian ekstrak dan memperbarui Tak terkompresi tinggal port pohon di / 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). Perilaku dan pengoperasian Portsnap dikendalikan oleh portsnap.conf file konfigurasi terletak di / etc (di / usr / local / etc / jika Portsnap terinstal dari FreeBSD Ports Collection, dan file konfigurasi tidak secara otomatis ketika baru saja terinstal, bukan Anda akan menemukan portsnap.conf.sample, hanya menyalin sebagai portsnap.conf). Generally, default configuration file will does its jobs. Biasanya, konfigurasi default file-nya tidak akan pekerjaan.
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: Pada baris perintah, pilihan berikut yang didukung, walaupun sebagian besar waktu itu tidak perlu digunakan, beberapa dapat dikonfigurasi dalam file konfigurasi tersebut:
-d workdir : Store working files (eg downloaded updates) in workdir. -d workdir: Store bekerja file (misalnya download update) di workdir. (default: /var/db/portsnap, or as given in the configuration file) (default: / var / db / portsnap, atau seperti yang diberikan dalam file konfigurasi)
-f conffile : Read the configuration from from conffile. -f conffile: Baca dari konfigurasi dari 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. -I: Untuk memperbarui perintah, update INDEKS file, namun tidak sisa port pohon.
-k KEY : Expect a public key with given SHA256 hash. k-KEY: Expect dengan kunci publik yang diberikan SHA256 hash. (default: read value from configuration file) (standar: membaca nilai dari file konfigurasi)
-p portsdir : When extracting or updating an uncompressed snapshot, operate on the directory portsdir. -p portsdir: Ketika penggalian atau memperbarui sebuah snapshot Tak terkompresi, beroperasi pada direktori portsdir. (default: /usr/ports/, or as given in the configuration file.) (default: / usr / port /, atau seperti yang diberikan dalam file konfigurasi.)
-s server : Fetch files from the specified server or server pool. s-server: fetch file dari server yang telah ditentukan atau server renang. (default: portsnap.FreeBSD.org , or as given in the configuration file.) (standar: portsnap.FreeBSD.org, atau seperti yang diberikan dalam file konfigurasi.)
path : For extract command only, operate only on parts of the ports tree starting with path. Path: Untuk ekstrak hanya perintah, beroperasi hanya pada bagian port pohon dimulai dengan path. (eg portsnap sysutils/port would extract sysutils/portsman, sysutils/portsnap, sysutils/portupgrade, etc.) (misalnya portsnap sysutils / pelabuhan akan ekstrak sysutils / portsman, sysutils / portsnap, sysutils / portupgrade, dll)
The Synopsis for the Portsnap command line is: Sinopsis yang Portsnap untuk baris perintah adalah:
portsnap [-I] [-d workdir] [-f conffile] [-k KEY] [-p portsdir] [-s server] command … [path] portsnap [-I] [-d workdir] [conffile-f] [-k KEY] [-p portsdir] [-s server] perintah ... [path]
Usage of Portsnap Penggunaan Portsnap
- Create an empty directory /usr/ports if it does not exists. Buat yang kosong direktori / usr / port jika tidak ada.
# mkdir /usr/ports # Mkdir / usr / port
- Fetch and download a compressed snapshot of the Ports Collection into /var/db/portsnap (or any other location specified in configuration file). Fetch dan mendownload dikompresi snapshot dari Ports Collection ke dalam / var / db / portsnap (atau lokasi lain yang ditentukan di file konfigurasi). Internet connection needed at this stage) and update the existing snapshot. Koneksi internet yang dibutuhkan pada tahap ini) dan update yang ada snapshot.
# portsnap fetch # Portsnap fetch
- 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: Jika anda menjalankan Portsnap untuk pertama kalinya (walaupun port pohon yang telah dibuat atau diisi, untuk memberitahu Portsnap membentuk sebuah dasar yang dapat menentukan portsnap bagian port pohon perlu diperbarui) atau / usr / port hasn 't telah diisi, dan ekstrak snapshot yang menggantikan file dan direktori yang ada, dan membentuk Portsnap dipelihara-port pohon ke / usr / port:
# portsnap extract # Portsnap extract
This step can be skipped if you're only updating the ports tree. Langkah ini dapat diabaikan jika Anda hanya memperbarui pohon port.
- If you already have a populated /usr/ports and you are just updating, run the following command instead: Jika Anda sudah memiliki penduduk / usr / port dan anda hanya memperbarui, jalankan perintah berikut sebagai gantinya:
# 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). Catatan: Untuk memperbarui dari FreeBSD Ports Tree, langkah 1 dan 3 dapat digabungkan menjadi satu perintah: portsnap fetch update (tidak mendukung versi Portsnap).
Running Portsnap as Cron Job Portsnap berjalan sebagai 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 fetch tidak akan dapat dijalankan dari cron kerja untuk menghindari beban mendadak melanda dari permintaan untuk men-download 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. Namun, khusus perintah portsnap cron ada yang menunggu dan tertidur acak untuk durasi hingga 3.600 detik sebelum mengambil update, karena jika mendapatkan perintah yang ditentukan.
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): Untuk menjalankan portsnap cron dengan pekerjaan secara otomatis, hanya menambahkan baris ke / etc / crontab (baris mengatur waktu sehari-hari ke 3, Anda dapat memilih sendiri waktu):
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. Ini akan memastikan bahwa FreeBSD snapshot pelabuhan koleksi selalu up-to-date dan dapat diambil dengan cepat ke dalam / 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. Catatan: Menjalankan update dari portsnap cron tidak dianjurkan karena dapat menyebabkan masalah jika menginstal atau memperbarui port yang terjadi pada saat menjalankan tugas cron. Portsnap will updates or removes files which are being used by the port build. Portsnap akan menghapus atau memperbarui file yang sedang digunakan oleh membangun pelabuhan. 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. Namun, menjalankan portsnap-I update untuk memperbarui file port Indeks adalah mungkin, dan dapat digunakan bersama-sama dengan portversion untuk mengidentifikasi perangkat lunak yang diinstal dari tanggal.
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: Untuk memperbarui port dikompresi snapshot dan INDEKS file di / usr / ports /, dan mengirim email jika ada port yang terpasang dari tanggal, gunakan baris berikut di / etc / crontab:
0 3 * * * root portsnap -I cron update && pkg_version -vIL= 0 3 * * * root cron portsnap-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. Catatan: versi lama portsnap tidak mendukung daftar beberapa perintah (misalnya, update cron) di satu seruan dari portsnap. If the line above fails, try replacing portsnap -I cron update with portsnap cron && portsnap -I update. Jika baris di atas gagal, coba menggantikan portsnap-I update cron dengan portsnap cron & & portsnap-I update.
IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman yang diterjemahkan mesin dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Mesin terjemahan mungkin sulit dimengerti. Please refer to Silakan merujuk ke original English article artikel asli Inggris whenever possible. bila memungkinkan.
Related Articles Artikel Terkait
- Update FreeBSD Ports Collection to Latest Version with Security Update with Portmanager and Portaudit Update FreeBSD Ports Collection ke Versi Terakhir dengan Security Update dengan Portmanager dan Portaudit
- Update FreeBSD Ports Collection Up to Date and Latest Update FreeBSD Ports Collection Hingga Tanggal dan terakhir
- Searching for Application in FreeBSD's Ports Collection Mencari aplikasi di FreeBSD dari Ports Collection
- Easy Way to Upgrade FreeBSD's Ports Easy Way to Upgrade dari FreeBSD Ports
- Portdowngrade - Downgrade to Previous Version of FreeBSD's Ports Portdowngrade - menurunkan Sebelumnya Versi FreeBSD dari Ports
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Instalasi Web Server di FreeBSD 6.0 with Apache 2.2, PHP MySQL 5,0 dan 5 - Bagian 3
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalasi Web Server di FreeBSD 6.0 with Apache 2.2, PHP MySQL 5,0 dan 5 - Bagian 5
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 1 Instalasi Web Server di FreeBSD 6.0 with Apache 2.2, PHP MySQL 5,0 dan 5 - Bagian 1
- Installing and Configuring DHCP Server (DHCPd) on FreeBSD Instalasi dan Konfigurasi DHCP server (dhcpd) pada FreeBSD
- FreeBSD 6.0 on VMware Server Time and Clock Slow Down FreeBSD 6,0 di VMware Server Waktu dan Jam Slow Down










































February 9th, 2008 18:04 9 Feb 2008 18:04
[...] at My Digital Life, there is an excellent tutorial on using portsnap. [...] Di Saya Digital Life, ada tutorial yang sangat baik untuk menggunakan portsnap. It covers not only the basics, but all the rest as [...] Meliputi tidak hanya dasar-dasar, tetapi semua sisanya sebagai [...]