diff options
Diffstat (limited to 'el_GR.ISO8859-7/books/handbook')
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/Makefile | 5 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/book.sgml | 5 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/chapters.ent | 5 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/dtrace/Makefile | 18 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml | 397 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/filesystems/Makefile | 18 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml | 630 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/updating/Makefile | 18 | ||||
-rw-r--r-- | el_GR.ISO8859-7/books/handbook/updating/chapter.sgml | 581 |
9 files changed, 1674 insertions, 3 deletions
diff --git a/el_GR.ISO8859-7/books/handbook/Makefile b/el_GR.ISO8859-7/books/handbook/Makefile index ce6888706c..3a513ce89d 100644 --- a/el_GR.ISO8859-7/books/handbook/Makefile +++ b/el_GR.ISO8859-7/books/handbook/Makefile @@ -4,7 +4,7 @@ # Μορφοποίηση του Εγχειριδίου του FreeBSD # # %SOURCE% en_US.ISO8859-1/books/handbook/Makefile -# %SRCID% 1.109 +# %SRCID% 1.110 # # ------------------------------------------------------------------------ @@ -202,6 +202,7 @@ IMAGES_LIB+= callouts/15.png SRCS+= audit/chapter.sgml SRCS+= book.sgml SRCS+= colophon.sgml +SRCS+= dtrace/chapter.sgml SRCS+= freebsd-glossary.sgml SRCS+= advanced-networking/chapter.sgml SRCS+= basics/chapter.sgml @@ -213,6 +214,7 @@ SRCS+= desktop/chapter.sgml SRCS+= disks/chapter.sgml SRCS+= eresources/chapter.sgml SRCS+= firewalls/chapter.sgml +SRCS+= filesystems/chapter.sgml SRCS+= geom/chapter.sgml SRCS+= install/chapter.sgml SRCS+= introduction/chapter.sgml @@ -232,6 +234,7 @@ SRCS+= preface/preface.sgml SRCS+= printing/chapter.sgml SRCS+= security/chapter.sgml SRCS+= serialcomms/chapter.sgml +SRCS+= updating/chapter.sgml SRCS+= users/chapter.sgml SRCS+= vinum/chapter.sgml SRCS+= virtualization/chapter.sgml diff --git a/el_GR.ISO8859-7/books/handbook/book.sgml b/el_GR.ISO8859-7/books/handbook/book.sgml index 3695800bf7..4b7a003e03 100644 --- a/el_GR.ISO8859-7/books/handbook/book.sgml +++ b/el_GR.ISO8859-7/books/handbook/book.sgml @@ -7,7 +7,7 @@ $FreeBSD$ %SOURCE% en_US.ISO8859-1/books/handbook/book.sgml - %SRCID% 1.172 + %SRCID% 1.173 --> @@ -291,10 +291,12 @@ <![ %chap.audit; [ &chap.audit; ]]> <![ %chap.disks; [ &chap.disks; ]]> <![ %chap.geom; [ &chap.geom; ]]> + <![ %chap.filesystems; [ &chap.filesystems; ]]> <![ %chap.vinum; [ &chap.vinum; ]]> <![ %chap.virtualization; [ &chap.virtualization; ]]> <![ %chap.l10n; [ &chap.l10n; ]]> <![ %chap.cutting-edge; [ &chap.cutting-edge; ]]> + <![ %chap.dtrace; [ &chap.dtrace; ]]> </part> <part id="network-communication"> @@ -339,6 +341,7 @@ το &os;.</para> </partintro> + <![ %chap.updating; [ &chap.updating; ]]> <![ %chap.serialcomms; [ &chap.serialcomms; ]]> <![ %chap.ppp-and-slip; [ &chap.ppp-and-slip; ]]> <![ %chap.mail; [ &chap.mail; ]]> diff --git a/el_GR.ISO8859-7/books/handbook/chapters.ent b/el_GR.ISO8859-7/books/handbook/chapters.ent index b4f41edc99..2550145b4b 100644 --- a/el_GR.ISO8859-7/books/handbook/chapters.ent +++ b/el_GR.ISO8859-7/books/handbook/chapters.ent @@ -12,7 +12,7 @@ $FreeBSD$ %SOURCE% en_US.ISO8859-1/books/handbook/chapters.ent - %SRCID% 1.37 + %SRCID% 1.38 --> @@ -42,12 +42,15 @@ <!ENTITY chap.audit SYSTEM "audit/chapter.sgml"> <!ENTITY chap.disks SYSTEM "disks/chapter.sgml"> <!ENTITY chap.geom SYSTEM "geom/chapter.sgml"> +<!ENTITY chap.filesystems SYSTEM "filesystems/chapter.sgml"> <!ENTITY chap.vinum SYSTEM "vinum/chapter.sgml"> <!ENTITY chap.virtualization SYSTEM "virtualization/chapter.sgml"> <!ENTITY chap.l10n SYSTEM "l10n/chapter.sgml"> <!ENTITY chap.cutting-edge SYSTEM "cutting-edge/chapter.sgml"> +<!ENTITY chap.dtrace SYSTEM "dtrace/chapter.sgml"> <!-- Part four --> +<!ENTITY chap.updating SYSTEM "updating/chapter.sgml"> <!ENTITY chap.serialcomms SYSTEM "serialcomms/chapter.sgml"> <!ENTITY chap.ppp-and-slip SYSTEM "ppp-and-slip/chapter.sgml"> <!ENTITY chap.mail SYSTEM "mail/chapter.sgml"> diff --git a/el_GR.ISO8859-7/books/handbook/dtrace/Makefile b/el_GR.ISO8859-7/books/handbook/dtrace/Makefile new file mode 100644 index 0000000000..be94ef2c90 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/dtrace/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/dtrace/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= dtrace/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml b/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml new file mode 100644 index 0000000000..a522c91010 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/dtrace/chapter.sgml @@ -0,0 +1,397 @@ +<!-- + + Το Εγχειρίδιο του FreeBSD: DTrace + + The FreeBSD Greek Documentation Project + + $FreeBSD$ + + %SOURCE% en_US.ISO8859-1/books/handbook/dtrace/chapter.sgml + %SRCID% 1.2 + +--> + +<chapter id="dtrace"> + <chapterinfo> + <authorgroup> + <author> + <firstname>Tom</firstname> + <surname>Rhodes</surname> + <contrib>Γράφηκε από τον </contrib> + </author> + </authorgroup> + </chapterinfo> + + <title>DTrace</title> + + <sect1 id="dtrace-synopsis"> + <title>Σύνοψη</title> + + <indexterm><primary>DTrace</primary></indexterm> + <indexterm> + <primary>DTrace support</primary> + <see>DTrace</see> + </indexterm> + + <para>Το DTrace, γνωστό επίσης ως Dynamic Tracing, είναι ένα εργαλείο το + οποίο αναπτύχθηκε από την &sun; για τον εντοπισμό προβλημάτων απόδοσης + σε συστήματα που πρόκειται να χρησιμοποιηθούν ή χρησιμοποιούνται ήδη + στην παραγωγή. Δεν πρόκειται για εργαλείο αποσφαλμάτωσης, αλλά για + εργαλείο ανάλυσης πραγματικού χρόνου, με το οποίο μπορούν να + εντοπιστούν προβλήματα απόδοσης και άλλες καταστάσεις.</para> + + <para>Το DTrace είναι ένα θαυμάσιο εργαλείο profiling και διαθέτει + εντυπωσιακό πλήθος χαρακτηριστικών για την διάγνωση προβλημάτων του + συστήματος. Μπορεί επίσης να χρησιμοποιηθεί για να εκτελέσει από πριν + έτοιμα scripts, με τα οποία μπορείτε να εκμεταλλευθείτε καλύτερα τις + δυνατότητες του. Οι χρήστες μπορούν ακόμα να γράψουν και τα δικά τους + βοηθητικά προγράμματα, χρησιμοποιώντας την Γλώσσα D που παρέχει το + DTrace, και να προσαρμόσουν με αυτό τον τρόπο το profiling στις δικές + τους ανάγκες.</para> + + <para>Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε:</para> + + <itemizedlist> + <listitem> + <para>Τι είναι το DTrace και τι δυνατότητες παρέχει.</para> + </listitem> + + <listitem> + <para>Τις διαφορές υλοποίησης μεταξύ του DTrace του &solaris; και + του &os;.</para> + </listitem> + + <listitem> + <para>Πως να ενεργοποιήσετε και να χρησιμοποιήσετε το DTrace + στο &os;.</para> + </listitem> + </itemizedlist> + + <para>Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει:</para> + + <itemizedlist> + <listitem> + <para>Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (<xref linkend="basics">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με τις βασικές διαδικασίες ρύθμισης και + μεταγλώττισης προσαρμοσμένου πυρήνα + (<xref linkend="kernelconfig">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με την ασφάλεια και τον τρόπο που αυτή + σχετίζεται με το &os; (<xref linkend="security">).</para> + </listitem> + + <listitem> + <para>Να κατανοείτε πως μπορείτε να ανακτήσετε τον πηγαίο κώδικα του + &os; και να τον χρησιμοποιήσετε ώστε να επαναμεταγλωττίσετε το + σύστημα σας (<xref linkend="cutting-edge">).</para> + </listitem> + </itemizedlist> + + <!-- + Temporary warning to avoid listing experimental versions + and production versions of FreeBSD with this technology. + --> + <warning> + <para>Τη δεδομένη στιγμή, το DTrace θεωρείται ότι είναι σε πειραματικό + στάδιο. Ορισμένες επιλογές μπορεί να υπολείπονται σε λειτουργικότητα, + και κάποια τμήματα ίσως να μη λειτουργούν καθόλου. Με την πάροδο του + χρόνου, οι παραπάνω δυνατότητες θα θεωρηθούν έτοιμες για χρήση σε + μηχανήματα παραγωγής, και η παρούσα τεκμηρίωση θα ανανεωθεί ώστε να + αντιπροσωπεύει αυτή την κατάσταση.</para> + </warning> + </sect1> + + <sect1 id="dtrace-implementation"> + <title>Implementation Differences</title> + + <para>While the DTrace in &os; is very similar to that found + in &solaris;, differences exist that should be explained before + continuing. The primary difference users will notice is that + on &os;, DTrace needs to be specifically enabled. There are + kernel options and modules which must be enabled for DTrace to + work properly. These will be explained later.</para> + + <para>There is a <literal>DDB_CTF</literal> kernel option which + is used to enable support for loading the <acronym>CTF</acronym> + data from kernel modules and the kernel itself. + <acronym>CTF</acronym> is the &solaris; Compressed C Type format + which encapsulates a reduced form of debugging information + similar to <acronym>DWARF</acronym> and the venerable stabs. + This <acronym>CTF</acronym> data is added to the binaries by the + <command>ctfconvert</command> and <command>ctfmerge</command> + build tools. The <command>ctfconvert</command> utility parses + <acronym>DWARF</acronym> debug <acronym>ELF</acronym> sections + created by the compiler and <command>ctfmerge</command> merges + <acronym>CTF</acronym> <acronym>ELF</acronym> sections from + objects into either executables or shared libraries. More on + how to enable this for the kernel and &os; build is + forthcoming.</para> + + <para>Some different providers exist for &os; than for &solaris;. + Most notable is the <literal>dtmalloc</literal> provider, which + allows tracing <function>malloc()</function> by type in the + &os; kernel.</para> + + <para>Only <username>root</username> may use DTrace on &os;. + This is related to security differences, &solaris; has a few + low level security checks which do not yet exist in &os;. As + such, the <devicename>/dev/dtrace/dtrace</devicename> is strictly + limited to <username>root</username> users only.</para> + + <para>Finally, the DTrace software falls under &sun;'s + <acronym>CDDL</acronym> license. The <literal>Common Development + and Distribution License</literal> comes with &os;, see the + <filename>/usr/src/cddl/contrib/opensolaris/OPENSOLARIS.LICENSE</filename> + or view it online at + <ulink url="http://www.opensolaris.org/os/licensing"> + http://www.opensolaris.org/os/licensing</ulink>.</para> + + <para>This license means that a &os; kernel with the DTrace options + is still <acronym>BSD</acronym> licensed; however the + <acronym>CDDL</acronym> kicks in when the modules are distributed + in binary form, or the binaries are loaded.</para> + </sect1> + + <sect1 id="dtrace-enable"> + <title>Enabling DTrace Support</title> + + <para>To enable support for DTrace, add the following lines to + the kernel configuration file:</para> + + <programlisting>options KDTRACE_HOOKS +options DDB_CTF</programlisting> + + <note> + <para>Users of the AMD64 architecture will want to add the + following line to their kernel configuration file:</para> + + <programlisting>options KDTRACE_FRAME</programlisting> + + <para>This option provides support for the <acronym>FBT</acronym> + feature. DTrace will work without this option; however, there + will be limited support for function boundary tracing.</para> + </note> + + <para>All sources must be rebuilt and installed with CTF options. + To accomplish this task, rebuild the &os; sources using:</para> + + <screen>&prompt.root; <userinput>cd /usr/src</userinput> + &prompt.root; <userinput>make WITH_CTF=1 buildworld</userinput> + &prompt.root; <userinput>make WITH_CFT=1 kernel</userinput> + &prompt.root; <userinput>make WITH_CFT=1 installworld</userinput> + &prompt.root; <userinput>mergemaster -Ui</userinput></screen> + + <para>The system will need to be restarted.</para> + + <para>After rebooting and allowing the new kernel to be loaded + into memory, support for the Korn shell should be added. This + is needed as the DTrace toolkit has several utilities written + in <command>ksh</command>. Install the + <filename role="package">shells/ksh93</filename>. It is also + possible to run these tools under + <filename role="package">shells/pdksh</filename> or + <filename role="package">shells/mksh</filename>.</para> + + <para>Finally, obtain the current DTrace toolkit. The current + version is available at + <ulink url="http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/"> + http://www.opensolaris.org/os/community/dtrace/dtracetoolkit/</ulink>. + There is an install mechanism included; however, installation + is not required to make use of the bundled utilities.</para> + </sect1> + + <sect1 id="dtrace-using"> + <title>Using DTrace</title> + + <para>Before making use of DTrace functionality, the DTrace device + must exist. To load the device, issue the following + command:</para> + + <screen>&prompt.root; <userinput>kldload dtraceall</userinput></screen> + + <para>DTrace support should now be available. To view all probes + the administrator may now execute the following command:</para> + + <screen>&prompt.root; <userinput>dtrace -l | more</userinput></screen> + + <para>All output is passed to the <command>more</command> + utility as it will quickly overflow the screen buffer. At + this point, DTrace should be considered working. It is now + time to review the toolkit.</para> + + <para>The toolkit is a collection of ready-made scripts to run + with DTrace to collect system information. There are scripts + to check open files, memory, <acronym>CPU</acronym> usage and + a lot more. Extract the scripts with the following + command:</para> + + <screen>&prompt.root; <userinput>gunzip -c DTraceToolkit* | tar xvf -</userinput></screen> + + <para>Change into that directory with the <command>cd</command> + and change the execution permissions on all files, designated + as those files with lower case names, to + <literal>755</literal>.</para> + + <para>All of these scripts will need modifications to their + contents. The ones which refer to + <filename>/usr/bin/ksh</filename> need that changed to + <filename>/usr/local/bin/ksh</filename>, the others which + use <filename>/usr/bin/sh</filename> need to be altered to use + <filename>/bin/sh</filename>, and finally the ones which + use <filename>/usr/bin/perl</filename> will need altered to + use <filename>/usr/local/bin/perl</filename>.</para> + + <important> + <para>At this point it is prudent to remind the reader that + DTrace support in &os; is <emphasis>incomplete</emphasis> + and <emphasis>experimental</emphasis>. Many of these scripts + will not work as they are either too &solaris;-specific or + use probes which are unsupported at this time.</para> + </important> + + <para>At the time of this writing only two of the scripts of the + DTrace Toolkit are fully supported in &os;: + the <filename>hotkernel</filename> + and <filename>procsystime</filename> scripts. These are the two + we will explore in the following parts of this section.</para> + + <para>The <filename>hotkernel</filename> is designed to identify + which function is using the most kernel time. Run normally, it + will produce output similar to the following:</para> + + <screen>&prompt.root; <userinput>./hotkernel</userinput> +localhost# ./hotkernel +Sampling... Hit Ctrl-C to end.</screen> + + <para>The system administrator must use the + <keycombo action="simul"><keycap>Ctrl</keycap><keycap>C</keycap> + </keycombo> key combination to stop the process. Upon + termination, the script will display a list of kernel functions and + timing information, sorting the output in increasing order of + time:</para> + + <screen>kernel`_thread_lock_flags 2 0.0% +0xc1097063 2 0.0% +kernel`sched_userret 2 0.0% +kernel`kern_select 2 0.0% +kernel`generic_copyin 3 0.0% +kernel`_mtx_assert 3 0.0% +kernel`vm_fault 3 0.0% +kernel`sopoll_generic 3 0.0% +kernel`fixup_filename 4 0.0% +kernel`_isitmyx 4 0.0% +kernel`find_instance 4 0.0% +kernel`_mtx_unlock_flags 5 0.0% +kernel`syscall 5 0.0% +kernel`DELAY 5 0.0% +0xc108a253 6 0.0% +kernel`witness_lock 7 0.0% +kernel`read_aux_data_no_wait 7 0.0% +kernel`Xint0x80_syscall 7 0.0% +kernel`witness_checkorder 7 0.0% +kernel`sse2_pagezero 8 0.0% +kernel`strncmp 9 0.0% +kernel`spinlock_exit 10 0.0% +kernel`_mtx_lock_flags 11 0.0% +kernel`witness_unlock 15 0.0% +kernel`sched_idletd 137 0.3% +0xc10981a5 42139 99.3%</screen> + + <!-- XXXTR: I attempted to use objdump and nm on /boot/kernel/kernel + to find 0xc10981a5, but to no avail. It would be nice to know + how we should look that up. --> + + <para>This script will also work with kernel modules. To use this + feature, run the script with the <option>-m</option> flag:</para> + + <screen>&prompt.root; <userinput>./hotkernel -m</userinput></screen> + + <screen>localhost# <userinput>./hotkernel -m</userinput> +Sampling... Hit Ctrl-C to end. +^C +MODULE COUNT PCNT +0xc107882e 1 0.0% +0xc10e6aa4 1 0.0% +0xc1076983 1 0.0% +0xc109708a 1 0.0% +0xc1075a5d 1 0.0% +0xc1077325 1 0.0% +0xc108a245 1 0.0% +0xc107730d 1 0.0% +0xc1097063 2 0.0% +0xc108a253 73 0.0% +kernel 874 0.4% +0xc10981a5 213781 99.6%</screen> + + <!-- XXXTR: I was unable to match these up with output from + kldstat and kldstat -v and grep. Maybe I'm missing something + seriously obvious. It is 5AM btw. --> + + <para>The <filename>procsystime</filename> script captures and + prints the system call time usage for a given + <acronym>PID</acronym> or process name. In the following + example, a new instance of <filename>/bin/csh</filename> + was spawned. The <filename>procsystime</filename> was executed + and remained waiting while a few commands were typed on the + other incarnation of <command>csh</command>. These are the + results of this test:</para> + + <screen>&prompt.root; <userinput>./procsystime -n csh</userinput> +Tracing... Hit Ctrl-C to end... +^C + +Elapsed Times for processes csh, + + SYSCALL TIME (ns) + getpid 6131 + sigreturn 8121 + close 19127 + fcntl 19959 + dup 26955 + setpgid 28070 + stat 31899 + setitimer 40938 + wait4 62717 + sigaction 67372 + sigprocmask 119091 + gettimeofday 183710 + write 263242 + execve 492547 + ioctl 770073 + vfork 3258923 + sigsuspend 6985124 + read 3988049784</screen> + + <para>As shown, the read system call seems to use the + most time in nanoseconds with the <function>getpid()</function> + system call used the least amount of time.</para> + </sect1> + + <sect1 id="dtrace-language"> + <title>The D Language</title> + + <para>The DTrace Toolkit includes many scripts in the special language of + DTrace. This language is called <quote>the D language</quote> by &sun; + documentation, and it is very similar to C++. An in depth + discussion of the language is beyond the scope of this document. It is + extensively discussed + at <ulink url="http://wikis.sun.com/display/DTrace/Documentation"></ulink>.</para> + </sect1> +</chapter> + +<!-- + Local Variables: + mode: sgml + sgml-declaration: "../chapter.decl" + sgml-indent-data: t + sgml-omittag: nil + sgml-always-quote-attributes: t + sgml-parent-document: ("../book.sgml" "part" "chapter") + End: +--> diff --git a/el_GR.ISO8859-7/books/handbook/filesystems/Makefile b/el_GR.ISO8859-7/books/handbook/filesystems/Makefile new file mode 100644 index 0000000000..cb61bfe236 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/filesystems/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/filesystems/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= filesystems/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml b/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml new file mode 100644 index 0000000000..18d6e92a6d --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/filesystems/chapter.sgml @@ -0,0 +1,630 @@ +<!-- + + Το Εγχειρίδιο του FreeBSD: Συστήματα Αρχείων + + The FreeBSD Greek Documentation Project + + $FreeBSD$ + + %SOURCE% en_US.ISO8859-1/books/handbook/filesystems/chapter.sgml + %SRCID% 1.3 + +--> + +<chapter id="filesystems"> + <chapterinfo> + <authorgroup> + <author> + <firstname>Tom</firstname> + <surname>Rhodes</surname> + <contrib>Γράφηκε από τον </contrib> + </author> + </authorgroup> + </chapterinfo> + + <title>Υποστήριξη Συστημάτων Αρχείων</title> + + <sect1 id="filesystems-synopsis"> + <title>Σύνοψη</title> + + <indexterm><primary>File Systems</primary></indexterm> + <indexterm> + <primary>File Systems Support</primary> + <see>File Systems</see> + </indexterm> + + <para>Τα συστήματα αρχείων αποτελούν αναπόσπαστο τμήμα κάθε λειτουργικού + συστήματος. Επιτρέπουν στους χρήστες να δημιουργούν και να αποθηκεύουν + αρχεία, παρέχουν πρόσβαση σε δεδομένα, και φυσικά αξιοποιούν τους + σκληρούς δίσκους. Διαφορετικά λειτουργικά συστήματα χρησιμοποιούν + συνήθως διαφορετικά εγγενή συστήματα αρχείων. Το σύστημα αρχείων του + &os; είναι το Fast File System ή <acronym>FFS</acronym>, το + οποίο προήλθε από το αρχικό σύστημα αρχείων του Unix™, γνωστό + επίσης και ως <acronym>UFS</acronym>. Αυτό είναι και το εγγενές + σύστημα αρχείων του &os;, το οποίο χρησιμοποιείται στους σκληρούς + δίσκους και προσφέρει πρόσβαση στα δεδομένα.</para> + + <para>Το &os; προσφέρει επίσης πληθώρα διαφορετικών συστημάτων αρχείων, + ώστε να παρέχει τοπική πρόσβαση σε δεδομένα που έχουν δημιουργηθεί από + άλλα λειτουργικά συστήματα, π.χ. δεδομένα που βρίσκονται σε τοπικά + <acronym>USB</acronym> αποθηκευτικά μέσα, οδηγούς flash, και σκληρούς + δίσκους. Υπάρχει επίσης υποστήριξη για άλλα, μη-εγγενή συστήματα + αρχείων, όπως το το Extended File System (<acronym>EXT</acronym>) του + &linux; καθώς και το σύστημα Z File System (<acronym>ZFS</acronym>) της + &sun;.</para> + + <para>Το &os; παρέχει διαφορετικό επίπεδο υποστήριξης για κάθε σύστημα + αρχείων. Για ορισμένα θα χρειαστεί να φορτωθεί κάποιο άρθρωμα στον + πυρήνα, ενώ για άλλα θα πρέπει να εγκατασταθούν κάποια εργαλεία. + Το κεφάλαιο αυτό έχει σχεδιαστεί να βοηθήσει τους χρήστες του &os; να + αποκτήσουν πρόσβαση σε άλλα συστήματα αρχείων στο σύστημα τους, + ξεκινώντας από το Ζ File System της &sun;.</para> + + <para>Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε:</para> + + <itemizedlist> + <listitem> + <para>Τη διαφορά μεταξύ των εγγενών και των υποστηριζόμενων + συστημάτων αρχείων.</para> + </listitem> + + <listitem> + <para>Ποια συστήματα αρχείων υποστηρίζονται από το &os;.</para> + </listitem> + + <listitem> + <para>Πως να ενεργοποιήσετε, να ρυθμίσετε, να αποκτήσετε πρόσβαση και + να χρησιμοποιήσετε μη-εγγενή συστήματα αρχείων.</para> + </listitem> + </itemizedlist> + + <para>Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει:</para> + + <itemizedlist> + <listitem> + <para>Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (<xref linkend="basics">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με τις βασικές διαδικασίες ρύθμισης και + εγκατάστασης προσαρμοσμένου πυρήνα + (<xref linkend="kernelconfig">).</para> + </listitem> + + <listitem> + <para>Να αισθάνεστε άνετα με την εγκατάσταση εφαρμογών τρίτου + κατασκευαστή στο &os; (<xref linkend="ports">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με τους δίσκους, τα μέσα + αποθήκευσης, και τα αντίστοιχα ονόματα συσκευών στο + &os; (<xref linkend="disks">).</para> + </listitem> + </itemizedlist> + + <!-- + Temporary warning to avoid listing experimental versions + and production versions of FreeBSD with this technology. + --> + <warning> + <para>Τη δεδομένη στιγμή, το <acronym>ZFS</acronym> θεωρείται + δοκιμαστική δυνατότητα. Μερικές επιλογές μπορεί να υπολείπονται + λειτουργικότητας, και άλλες μπορεί να μη λειτουργούν καθόλου. Με + την πάροδο του χρόνου, η δυνατότητα αυτή θα θεωρηθεί έτοιμη για χρήση + σε περιβάλλοντα παραγωγής, και η παρούσα τεκμηρίωση θα ανανεωθεί ώστε + να αντιπροσωπεύει αυτή την κατάσταση.</para> + </warning> + </sect1> + + <sect1 id="filesystems-zfs"> + <title>The Z File System</title> + + <para>The Z file system, developed by &sun;, is a new + technology designed to use a pooled storage method. This means + that space is only used as it is needed for data storage. It + has also been designed for maximum data integrity, supporting + data snapshots, multiple copies, and data checksums. A new + data replication model, known as <acronym>RAID</acronym>-Z has + been added. The <acronym>RAID</acronym>-Z model is similar + to <acronym>RAID</acronym>5 but is designed to prevent data + write corruption.</para> + + <sect2> + <title>ZFS Tuning</title> + + <para>The <acronym>ZFS</acronym> subsystem utilizes much of + the system resources, so some tuning may be required to provide + maximum efficiency during every-day use. As an experimental + feature in &os; this may change in the near future; however, + at this time, the following steps are recommended.</para> + + <sect3> + <title>Memory</title> + + <para>The total system memory should be at least one gigabyte, + with two gigabytes or more recommended. In all of the + examples here, the system has one gigabyte of memory with + several other tuning mechanisms in place.</para> + + <para>Some people have had luck using fewer than one gigabyte + of memory, but with such a limited amount of physical memory, + when the system is under heavy load, it is very plausible + that &os; will panic due to memory exhaustion.</para> + </sect3> + + <sect3> + <title>Kernel Configuration</title> + + <para>It is recommended that unused drivers and options + be removed from the kernel configuration file. Since most + devices are available as modules, they may simply be loaded + using the <filename>/boot/loader.conf</filename> file.</para> + + <para>Users of the i386 architecture should add the following + option to their kernel configuration file, rebuild their + kernel, and reboot:</para> + + <programlisting>options KVA_PAGES=512</programlisting> + + <para>This option will expand the kernel address space, thus + allowing the <varname>vm.kvm_size</varname> tunable to be + pushed beyond the currently imposed limit of 1 GB + (2 GB for <acronym>PAE</acronym>). To find the most + suitable value for this option, divide the desired address + space in megabytes by four (4). In this case, it is + <literal>512</literal> for 2 GB.</para> + </sect3> + + <sect3> + <title>Loader Tunables</title> + + <para>The <devicename>kmem</devicename> address space should be + increased on all &os; architectures. On the test system with + one gigabyte of physical memory, success was achieved with the + following options which should be placed in + the <filename>/boot/loader.conf</filename> file and the system + restarted:</para> + + <programlisting>vm.kmem_slze="330M" +vm.kmem_size_max="330M" +vfs.zfs.arc_max="40M" +vfs.zfs.vdev.cache.size="5M"</programlisting> + + <para>For a more detailed list of recommendations for ZFS-related + tuning, see + <ulink url="http://wiki.freebsd.org/ZFSTuningGuide"></ulink>.</para> + </sect3> + </sect2> + + <sect2> + <title>Using <acronym>ZFS</acronym></title> + + <para>There is a start up mechanism that allows &os; to + mount <acronym>ZFS</acronym> pools during system + initialization. To set it, issue the following + commands:</para> + + <screen>&prompt.root; <userinput>echo 'zfs_enable="YES"' >> /etc/rc.conf</userinput> +&prompt.root; <userinput>/etc/rc.d/zfs start</userinput></screen> + + <para>The remainder of this document assumes two + <acronym>SCSI</acronym> disks are available, and their device names + are <devicename><replaceable>da0</replaceable></devicename> + and <devicename><replaceable>da1</replaceable></devicename> + respectively. Users of <acronym>IDE</acronym> hardware may + use the <devicename><replaceable>ad</replaceable></devicename> + devices in place of <acronym>SCSI</acronym> hardware.</para> + + <sect3> + <title>Single Disk Pool</title> + + <para>To create a <acronym>ZFS</acronym> over a single disk + device, use the <command>zpool</command> command:</para> + + <screen>&prompt.root; <userinput>zpool create example /dev/da0</userinput></screen> + + <para>To view the new pool, review the output of the + <command>df</command>:</para> + + <screen>&prompt.root; <userinput>df</userinput> +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235230 1628718 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032846 48737598 2% /usr +example 17547136 0 17547136 0% /example</screen> + + <para>This output clearly shows the <literal>example</literal> + pool has not only been created but + <emphasis>mounted</emphasis> as well. It is also accessible + just like a normal file system, files may be created on it + and users are able to browse it as in the + following example:</para> + + <screen>&prompt.root <userinput>cd /example</userinput> +&prompt.root; <userinput>ls</userinput> +&prompt.root; <userinput>touch testfile</userinput> +&prompt.root; <userinput>ls -al</userinput> +total 4 +drwxr-xr-x 2 root wheel 3 Aug 29 23:15 . +drwxr-xr-x 21 root wheel 512 Aug 29 23:12 .. +-rw-r--r-- 1 root wheel 0 Aug 29 23:15 testfile</screen> + + <para>Unfortunately this pool is not taking advantage of + any <acronym>ZFS</acronym> features. Create a file system + on this pool, and enable compression on it:</para> + + <screen>&prompt.root; <userinput>zfs create example/compressed</userinput> +&prompt.root; <userinput>zfs set compression=gzip example/compressed</userinput></screen> + + <para>The <literal>example/compressed</literal> is now a + <acronym>ZFS</acronym> compressed file system. Try copying + some large files to it by copying them to + <filename class="directory">/example/compressed</filename>.</para> + + <para>The compression may now be disabled with:</para> + + <screen>&prompt.root; <userinput>zfs set compression=off example/compressed</userinput></screen> + + <para>To unmount the file system, issue the following command + and then verify by using the <command>df</command> + utility:</para> + + <screen>&prompt.root; <userinput>zfs umount example/compressed</userinput> +&prompt.root; <userinput>df</userinput> +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235232 1628716 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example</screen> + + <para>Re-mount the file system to make it accessible + again, and verify with <command>df</command>:</para> + + <screen>&prompt.root; <userinput>zfs mount example/compressed</userinput> +&prompt.root; <userinput>df</userinput> +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235234 1628714 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example +example/compressed 17547008 0 17547008 0% /example/compressed</screen> + + <para>The pool and file system may also be observed by viewing + the output from <command>mount</command>:</para> + + <screen>&prompt.root; <userinput>mount</userinput> +/dev/ad0s1a on / (ufs, local) +devfs on /dev (devfs, local) +/dev/ad0s1d on /usr (ufs, local, soft-updates) +example on /example (zfs, local) +example/data on /example/data (zfs, local) +example/compressed on /example/compressed (zfs, local)</screen> + + <para>As observed, <acronym>ZFS</acronym> file systems, after + creation, may be used like ordinary file systems; however, + many other features are also available. In the following + example, a new file system, <literal>data</literal> is + created. Important files will be stored here, so the file + system is set to keep two copies of each data block:</para> + + <screen>&prompt.root; <userinput>zfs create example/data</userinput> +&prompt.root; <userinput>zfs set copies=2 example/data</userinput></screen> + + <para>It is now possible to see the data and space utilization + by issuing the <command>df</command> again:</para> + + <screen>&prompt.root; <userinput>df</userinput> +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235234 1628714 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032864 48737580 2% /usr +example 17547008 0 17547008 0% /example +example/compressed 17547008 0 17547008 0% /example/compressed +example/data 17547008 0 17547008 0% /example/data</screen> + + <para>Notice that each file system on the pool has the same + amount of available space. This is the reason for using + the <command>df</command> through these examples, to show + that the file systems are using only the amount of space + they need and will all draw from the same pool. + The <acronym>ZFS</acronym> file system does away with concepts + such as volumes and partitions, and allows for several file + systems to occupy the same pool. Destroy the file systems, + and then destroy the pool as they are no longer + needed:</para> + + <screen>&prompt.root; <userinput>zfs destroy example/compressed</userinput> +&prompt.root; <userinput>zfs destroy example/data</userinput> +&prompt.root; <userinput>zpool destroy example</userinput></screen> + + <para>Disks go bad and fail, an unavoidable trait. When + this disk goes bad, the data will be lost. One method of + avoiding data loss due to a failed hard disk is to implement + a <acronym>RAID</acronym>. <acronym>ZFS</acronym> supports + this feature in its pool design which is covered in + the next section.</para> + </sect3> + + <sect3> + <title><acronym>ZFS</acronym> RAID-Z</title> + + <para>As previously noted, this section will assume that + two <acronym>SCSI</acronym> exists as devices + <devicename>da0</devicename> and + <devicename>da1</devicename>. To create a + <acronym>RAID</acronym>-Z pool, issue the following + command:</para> + + <screen>&prompt.root; <userinput>zpool create storage raidz da0 da1</userinput></screen> + + <para>The <literal>storage</literal> zpool should have been + created. This may be verified by using the &man.mount.8; and + &man.df.1; commands as before. More disk devices may have + been allocated by adding them to the end of the list above. + Make a new file system in the pool, called + <literal>home</literal> where user files will eventually be + placed:</para> + + <screen>&prompt.root; <userinput>zfs create storage/home</userinput></screen> + + <para>It is now possible to enable compression and keep extra + copies of the user's home directories and files. This may + be accomplished just as before using the following + commands:</para> + + <screen>&prompt.root; <userinput>zfs set copies=2 storage/home</userinput> +&prompt.root; <userinput>zfs set compression=gzip storage/home</userinput></screen> + + <para>To make this the new home directory for users, copy the + user data to this directory, and create the appropriate + symbolic links:</para> + + <screen>&prompt.root; <userinput>cp -rp /home/* /storage/home</userinput> +&prompt.root; <userinput>rm -rf /home /usr/home</userinput> +&prompt.root; <userinput>ln -s /storage/home /home</userinput> +&prompt.root; <userinput>ln -s /storage/home /usr/home</userinput></screen> + + <para>Users should now have their data stored on the freshly + created <filename class="directory">/storage/home</filename> + file system. Test by adding a new user and logging in as + that user.</para> + + <para>Try creating a snapshot which may be rolled back + later:</para> + + <screen>&prompt.root; <userinput>zfs snapshot storage/home@08-30-08</userinput></screen> + + <para>Note that the snapshot option will only capture a real + file system, not a home directory or a file. The + <literal>@</literal> character is a delimiter used between + the file system name or the volume name. When a user's + home directory gets trashed, restore it with:</para> + + <screen>&prompt.root; <userinput>zfs rollback storage/home@08-30-08</userinput></screen> + + <para>To get a list of all available snapshots, run the + <command>ls</command> in the file system's + <filename class="directory">.zfs/snapshot</filename> + directory. For example, to see the previously taken + snapshot, perform the following command:</para> + + <screen>&prompt.root; <userinput>ls /storage/home/.zfs/snapshot</userinput></screen> + + <para>It is possible to write a script to perform monthly + snapshots on user data; however, over time, snapshots + may consume a great deal of disk space. The previous + snapshot may be removed using the following command:</para> + + <screen>&prompt.root; <userinput>zfs destroy storage/home@08-30-08</userinput></screen> + + <para>There is no reason, after all of this testing, we should + keep <filename class="directory">/storage/home</filename> + around in its present state. Make it the real + <filename class="directory">/home</filename> file + system:</para> + + <screen>&prompt.root; <userinput>zfs set mountpoint=/home storage/home</userinput></screen> + + <para>Issuing the <command>df</command> and + <command>mount</command> commands will show that the system + now treats our file system as the real + <filename class="directory">/home</filename>:</para> + + <screen>&prompt.root; <userinput>mount</userinput> +/dev/ad0s1a on / (ufs, local) +devfs on /dev (devfs, local) +/dev/ad0s1d on /usr (ufs, local, soft-updates) +storage on /storage (zfs, local) +storage/home on /home (zfs, local) +&prompt.root; <userinput>df</userinput> +Filesystem 1K-blocks Used Avail Capacity Mounted on +/dev/ad0s1a 2026030 235240 1628708 13% / +devfs 1 1 0 100% /dev +/dev/ad0s1d 54098308 1032826 48737618 2% /usr +storage 17547008 0 17547008 0% /storage +storage/home 17547008 0 17547008 0% /home</screen> + + <para>This completes the <acronym>RAID</acronym>-Z + configuration. To get status updates about the file systems + created during the nightly &man.periodic.8; runs, issue the + following command:</para> + + <screen>&prompt.root; <userinput>echo 'daily_status_zfs_enable="YES"' >> /etc/periodic.conf</userinput></screen> + </sect3> + + <sect3> + <title>Recovering <acronym>RAID</acronym>-Z</title> + + <para>Every software <acronym>RAID</acronym> has a method of + monitoring their <literal>state</literal>. + <acronym>ZFS</acronym> is no exception. The status of + <acronym>RAID</acronym>-Z devices may be viewed with the + following command:</para> + + <screen>&prompt.root; <userinput>zpool status -x</userinput></screen> + + <para>If all pools are healthy and everything is normal, the + following message will be returned:</para> + + <screen>all pools are healthy</screen> + + <para>If there is an issue, perhaps a disk has gone offline, + the pool state will be returned and look similar to:</para> + + <screen> pool: storage + state: DEGRADED +status: One or more devices has been taken offline by the administrator. + Sufficient replicas exist for the pool to continue functioning in a + degraded state. +action: Online the device using 'zpool online' or replace the device with + 'zpool replace'. + scrub: none requested +config: + + NAME STATE READ WRITE CKSUM + storage DEGRADED 0 0 0 + raidz1 DEGRADED 0 0 0 + da0 ONLINE 0 0 0 + da1 OFFLINE 0 0 0 + +errors: No known data errors</screen> + + <para>This states that the device was taken offline by the + administrator. This is true for this particular example. + To take the disk offline, the following command was + used:</para> + + <screen>&prompt.root; <userinput>zpool offline storage da1</userinput></screen> + + <para>It is now possible to replace the + <devicename>da1</devicename> after the system has been + powered down. When the system is back online, the following + command may issued to replace the disk:</para> + + <screen>&prompt.root; <userinput>zpool replace storage da1</userinput></screen> + + <para>From here, the status may be checked again, this time + without the <option>-x</option> flag to get state + information:</para> + + <screen>&prompt.root; <userinput>zpool status storage</userinput> + pool: storage + state: ONLINE + scrub: resilver completed with 0 errors on Sat Aug 30 19:44:11 2008 +config: + + NAME STATE READ WRITE CKSUM + storage ONLINE 0 0 0 + raidz1 ONLINE 0 0 0 + da0 ONLINE 0 0 0 + da1 ONLINE 0 0 0 + +errors: No known data errors</screen> + + <para>As shown from this example, everything appears to be + normal.</para> + </sect3> + + <sect3> + <title>Data Verification</title> + + <para>As previously mentioned, <acronym>ZFS</acronym> uses + <literal>checksums</literal> to verify the integrity of + stored data. They are enabled automatically upon creation + of file systems and may be disabled using the following + command:</para> + + <screen>&prompt.root; <userinput>zfs set checksum=off storage/home</userinput></screen> + + <para>This is not a wise idea; however, as checksums take + very little storage space and are more useful enabled. There + also appear to be no noticeable costs having them enabled. + While enabled, it is possible to have <acronym>ZFS</acronym> + check data integrity using checksum verification. This + process is known as <quote>scrubing.</quote> To verify the + data integrity of the <literal>storage</literal> pool, issue + the following command:</para> + + <screen>&prompt.root; <userinput>zpool scrub storage</userinput></screen> + + <para>This process may take considerable time depending on + the amount of data stored. It is also very + <acronym>I/O</acronym> intensive, so much that only one + of these operations may be run at any given time. After + the scrub has completed, the status is updated and may be + viewed by issuing a status request:</para> + + <screen>&prompt.root; <userinput>zpool status storage</userinput> + pool: storage + state: ONLINE + scrub: scrub completed with 0 errors on Sat Aug 30 19:57:37 2008 +config: + + NAME STATE READ WRITE CKSUM + storage ONLINE 0 0 0 + raidz1 ONLINE 0 0 0 + da0 ONLINE 0 0 0 + da1 ONLINE 0 0 0 + +errors: No known data errors</screen> + + <para>The completion time is in plain view in this example. + This feature helps to ensure data integrity over a long + period of time.</para> + + <para>There are many more options for the Z file system, + see the &man.zfs.8; and &man.zpool.8; manual + pages.</para> + </sect3> + </sect2> + </sect1> + + + <!-- + XXXTR: stub sections (added later, as needed, as desire, + after I get opinions from -doc people): + + Still need to discuss native and foreign file systems. + + <sect1> + <title>Device File System</title> + </sect1> + + <sect1> + <title>DOS and NTFS File Systems</title> + <para>This is a good section for those who transfer files, using + USB devices, from Windows to FreeBSD and vice-versa. My camera, + and many other cameras I have seen default to using FAT16. There + is (was?) a kde utility, I think called kamera, that could be used + to access camera devices. A section on this would be useful.</para> + + <para>XXXTR: Though! The disks chapter, covers a bit of this and + devfs under it's USB devices. It leaves a lot to be desired though, + see: +http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html + It may be better to flesh out that section a bit more. Add the + word "camera" to it so that others can easily notice.</para> + </sect1> + + <sect1> + <title>Linux EXT File System</title> + + <para>Probably NOT as useful as the other two, but it requires + knowledge of the existence of the tools. Which are hidden in + the ports collection. Most Linux guys would probably only use + Linux, BSD guys would be smarter and use NFS.</para> + </sect1> + + <sect1> + <title>HFS</title> + + <para>I think this is the file system used on Apple OSX. There are + tools in the ports collection, and with Apple being a big + FreeBSD supporter and user of our technologies, surely there + is enough cross over to cover this?</para> + </sect1> + --> + +</chapter> diff --git a/el_GR.ISO8859-7/books/handbook/updating/Makefile b/el_GR.ISO8859-7/books/handbook/updating/Makefile new file mode 100644 index 0000000000..fd42d72743 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/updating/Makefile @@ -0,0 +1,18 @@ +# +# Build the Handbook with just the content from this chapter. +# +# $FreeBSD$ +# +# %SOURCE% en_US.ISO8859-1/books/handbook/updating/Makefile +# %SRCID% 1.1 +# + +CHAPTERS= updating/chapter.sgml + +VPATH= .. + +MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX} + +DOC_PREFIX?= ${.CURDIR}/../../../.. + +.include "../Makefile" diff --git a/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml b/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml new file mode 100644 index 0000000000..b27a71c607 --- /dev/null +++ b/el_GR.ISO8859-7/books/handbook/updating/chapter.sgml @@ -0,0 +1,581 @@ +<!-- + + The FreeBSD Greek Documentation Project + + Το Εγχειρίδιο του FreeBSD: Ενημερώνοντας το FreeBSD + + $FreeBSD$ + + %SOURCE% en_US.ISO8859-1/books/handbook/updating/chapter.sgml + %SRCID% 1.1 + +--> + +<chapter id="updating"> + <chapterinfo> + <authorgroup> + <author> + <firstname>Tom</firstname> + <surname>Rhodes</surname> + <contrib>Γράφηκε από τον </contrib> + </author> + </authorgroup> + <authorgroup> + <author> + <firstname>Colin</firstname> + <surname>Percival</surname> + <contrib>Βασίστηκε σε σημειώσεις που παρείχε ο </contrib> + </author> + </authorgroup> + </chapterinfo> + + <title>Ενημερώνοντας το &os;</title> + + <sect1 id="updating-synopsis"> + <title>Σύνοψη</title> + + <indexterm><primary>Updating FreeBSD</primary></indexterm> + <indexterm> + <primary>freebsd-update</primary> + <see>Updating</see> + </indexterm> + + <para>Ένα κύριο χαρακτηριστικό του &os; έχει παραμείνει αναλλοίωτο με την + πάροδο του χρόνου: Η απαίτηση για την χρήση εφαρμογών και βοηθητικών + προγραμμάτων για την ανάκτηση μικρών και μεγάλων ενημερώσεων του + συστήματος.</para> + + <para>Για πολλά χρόνια, οι χρήστες που επιθυμούσαν να αναβαθμίσουν το + σύστημα τους, να ανακτήσουν τις ενημερώσεις ασφαλείας, και να λάβουν + ενημερωμένες εκδόσεις των πακέτων και των ports, χωρίς να χαλάσουν τη + λειτουργία της Συλλογής των Ports, ήταν αναγκασμένοι να χρησιμοποιούν + το εργαλείο <application>CVSup</application>.</para> + + <para>Αν και το <application>CVSup</application> υποστηρίζεται ακόμα (και + έχει επίσης προστεθεί και μια έκδοση του σε γλώσσα C στο βασικό σύστημα + του &os;), υπάρχουν και νέες μέθοδοι για την ανάκτηση ενημερώσεων του + συστήματος.</para> + + <para>Εργαλεία όπως το &man.portsnap.8; και το &man.freebsd-update.8; + έχουν εκσυγχρονίσει την διαδικασία αναβάθμισης. Αυτές οι νέες μέθοδοι + αυξάνουν την παραγωγικότητα ενώ ταυτόχρονα παρέχουν και μια απλούστερη + διεπαφή προς τους χρήστες. Ορισμένα από αυτά τα εργαλεία μπορούν να + εκτελεστούν από το &man.cron.8;, ελαχιστοποιώντας την ανάγκη + αλληλεπίδρασης με το διαχειριστή του συστήματος. Αυτό είναι πραγματικό + όφελος για όσους διαχειρίζονται και παρακολουθούν εκατοντάδες συστήματα + &os;.</para> + + <para>Στο κεφάλαιο αυτό θα εξηγήσουμε τις νέες μεθόδους, καθώς και + τους τρόπους με τους οποίους μπορούν να ωφεληθούν τόσο οι χρήστες όσο + και οι διαχειριστές συστημάτων, από την πρακτική και εύκολη εφαρμογή + τους.</para> + + <para>Αφού διαβάσετε αυτό το κεφάλαιο, θα γνωρίζετε:</para> + + <itemizedlist> + <listitem> + <para>Ποια βοηθητικά προγράμματα μπορείτε να χρησιμοποιήσετε για να + ενημερώσετε το σύστημα και την Συλλογή των Ports.</para> + </listitem> + + <listitem> + <para>Πως να χρησιμοποιήσετε το <command>freebsd-update</command> + για να εφαρμόσετε ενημερώσεις ασφαλείας και άλλες μικρές και + μεγαλύτερες αναβαθμίσεις στο &os;.</para> + </listitem> + + <listitem> + <para>Πως να συγκρίνετε την κατάσταση ενός εγκατεστημένου συστήματος + με αναφορά ένα γνωστό και εγγυημένα σωστό σύστημα.</para> + </listitem> + </itemizedlist> + + <para>Πριν διαβάσετε αυτό το κεφάλαιο, θα πρέπει:</para> + + <itemizedlist> + <listitem> + <para>Να κατανοείτε βασικές έννοιες του &unix; και του &os; + (<xref linkend="basics">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με βασικές έννοιες της ρύθμισης και + μεταγλώττισης προσαρμοσμένου πυρήνα + (<xref linkend="kernelconfig">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με την Συλλογή των Ports και την + εγκατάσταση εφαρμογών τρίτου κατασκευαστή στο &os; + (<xref linkend="ports">).</para> + </listitem> + + <listitem> + <para>Να είστε εξοικειωμένος με τα διάφορα τμήματα πηγαίου κώδικα + από τα οποία αποτελείται το &os;, καθώς και με τη χρήση του + εργαλείου &man.mergemaster.8; + (<xref linkend="cutting-edge">).</para> + </listitem> + </itemizedlist> + </sect1> + + <sect1 id="updating-freebsdupdate"> + <title>Ενημέρωση του &os;</title> + + <para>Η εφαρμογή ενημερώσεων ασφαλείας αποτελεί ένα σημαντικό τμήμα της + συντήρησης λογισμικού, ειδικά όταν πρόκειται για το λειτουργικό σύστημα. + Για μεγάλο διάστημα, η διαδικασία αυτή δεν ήταν εύκολη στο &os;. + Έπρεπε να εφαρμοστούν patches στον πηγαίο κώδικα, να γίνει μεταγλώττιση + του από την αρχή, και να εγκατασταθούν ξανά τα νέα εκτελέσιμα.</para> + + <para>Αυτό δεν είναι πλέον αναγκαίο, καθώς το &os; διαθέτει τώρα ένα + βοηθητικό πρόγραμμα, το <command>freebsd-update</command>. Το πρόγραμμα + παρέχει δύο διαφορετικές λειτουργίες. Η πρώτη είναι η δυνατότητα + δυαδικής (binary) ενημέρωσης του βασικού συστήματος με τις τελευταίες + διορθώσεις ασφάλειας και λαθών, χωρίς να χρειάζεται ξανά μεταγλώττιση + και εγκατάσταση. Η δεύτερη είναι η δυνατότητα αναβάθμισης του + συστήματος σε μια νέα μικρή ή μεγάλη επίσημη έκδοση (release).</para> + + <note> + <para>Δυαδικές διορθώσεις λαθών και ασφάλειας, διατίθενται για όλες + τις αρχιτεκτονικές και εκδόσεις που υποστηρίζονται από την ομάδα + ασφάλειας. Ωστόσο, ορισμένα χαρακτηριστικά όπως η δυνατότητα + αναβάθμισης του λειτουργικού σε μια νέα έκδοση, απαιτούν την + τελευταία έκδοση του &man.freebsd-update.8; και του &os; 6.3. + Πριν προχωρήσετε στην αναβάθμιση σε μια νέα έκδοση, θα πρέπει να + διαβάσετε τις σχετικές με αυτήν ανακοινώσεις, καθώς μπορεί να + περιέχουν σημαντικές πληροφορίες. Μπορείτε να δείτε τις + ανακοινώσεις εκδόσεων στην παρακάτω τοποθεσία: + <ulink url="http://www.FreeBSD.org/releases/"></ulink>.</para> + </note> + + <para>Αν υπάρχει κάποιο <command>crontab</command> που χρησιμοποιεί τις + δυνατότητες του <command>freebsd-update</command>, θα πρέπει να + απενεργοποιηθεί πριν ξεκινήσει η παρακάτω διαδικασία. Μπορείτε να + εγκαταστήσετε την τελευταία έκδοση του + <command>freebsd-update</command> κατεβάζοντας το συμπιεσμένο πακέτο + από το παραπάνω <acronym>URL</acronym> και εκτελώντας τις παρακάτω + εντολές:</para> + + <screen>&prompt.root; <userinput>gunzip -c freebsd-update-upgrade.tgz | tar xvf -</userinput> +&prompt.root; <userinput>mv freebsd-update.sh /usr/sbin/freebsd-update</userinput> +&prompt.root; <userinput>mv freebsd-update.conf /etc</userinput></screen> + + <para>Δεν απαιτείται να κατεβάσετε την τελευταία έκδοση, αν χρησιμοποιείτε + κάποια από τις τρέχουσες εκδόσεις του &os;.</para> + + <sect2> + <title>Το Αρχείο Ρυθμίσεων</title> + + <para>Κάποιοι χρήστες ίσως θέλουν να αλλάξουν το αρχείο ρυθμίσεων, ώστε + να έχουν καλύτερο έλεγχο της διαδικασίας. Οι επιλογές είναι γενικά + αρκετά καλά τεκμηριωμένες, αλλά οι παρακάτω ίσως να χρειάζονται + κάποιες επιπλέον επεξηγήσεις:</para> + + <programlisting># Components of the base system which should be kept updated. +Components src world kernel</programlisting> + + <para>Αυτή η παράμετρος ελέγχει ποια τμήματα του &os; θα διατηρούνται + ενημερωμένα. Η προεπιλογή είναι να ενημερώνεται ο πηγαίος κώδικας, + όλο το βασικό σύστημα, και ο πυρήνας. Τα τμήματα είναι τα ίδια + που διατίθενται και κατά την εγκατάσταση, για παράδειγμα αν βάλετε + την επιλογή <quote>world/games</quote> θα εγκαθίστανται ενημερώσεις + για τα παιχνίδια. Αν βάλετε <quote>src/bin</quote> θα επιτρέψετε + την ενημέρωση του πηγαίου κώδικα του καταλόγου + <filename class="directory">src/bin</filename>.</para> + + <para>Η καλύτερη επιλογή είναι να αφήσετε εδώ την προεπιλεγμένη τιμή, + καθώς αν την αλλάξετε ώστε να περιέχει συγκεκριμένα μόνο τμήματα, + θα αναγκαστείτε να αναφέρετε χωριστά μέσα στο αρχείο ρυθμίσεων κάθε + τμήμα που θέλετε να ενημερώνεται. Αυτό ίσως έχει καταστροφικά + αποτελέσματα, καθώς είναι πιθανό ο πηγαίος κώδικας και τα εκτελέσιμα + προγράμματα να μην είναι πλέον σε συγχρονισμό μεταξύ τους.</para> + + <programlisting># Paths which start with anything matching an entry in an IgnorePaths +# statement will be ignored. +IgnorePaths</programlisting> + + <para>Προσθέστε διαδρομές σε καταλόγους, όπως + <filename class="directory">/bin</filename> ή + <filename class="directory">/sbin</filename> για να αφήσετε + απείραχτους τους συγκεκριμένους καταλόγους κατά την διαδικασία + ενημέρωσης. Η επιλογή αυτή μπορεί να χρησιμοποιηθεί για να αποτρέψει + το <command>freebsd-update</command> να γράψει πάνω σε πιθανόν + δικές σας τοπικές αλλαγές.</para> + + <programlisting># Paths which start with anything matching an entry in an UpdateIfUnmodified +# statement will only be updated if the contents of the file have not been +# modified by the user (unless changes are merged; see below). +UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile</programlisting> + + <para>Η επιλογή αυτή θα ενημερώσει τα αρχεία ρυθμίσεων στους καταλόγους + που καθορίζονται, μόνο αν αυτά δεν έχουν μεταβληθεί από το χρήστη. + Αν υπάρχουν τοπικές αλλαγές, δεν θα γίνει ενημέρωση. Υπάρχει μια + ακόμα επιλογή, η <literal>KeepModifiedMetadata</literal>, η οποία + οδηγεί το <command>freebsd-update</command> να αποθηκεύσει τις αλλαγές + μεταξύ των δύο εκδόσεων κατά τη διάρκεια της συγχώνευσης + (merge).</para> + + <programlisting># When upgrading to a new &os; release, files which match MergeChanges +# will have any local changes merged into the version from the new release. +MergeChanges /etc/ /var/named/etc/</programlisting> + + <para>Πρόκειται για τη λίστα των καταλόγων που περιέχουν αρχεία + ρυθμίσεων, και στα οποία το <command>freebsd-update</command> θα + επιχειρεί την διαδικασία συγχώνευσης αλλαγών. Η διαδικασία + συγχώνευσης γίνεται με μια σειρά από patches τύπου &man.diff.1; + παρόμοια με το &man.mergemaster.8; αλλά με λιγότερες επιλογές. Οι + συγχωνεύσεις είτε γίνονται δεκτές, είτε προκαλούν το άνοιγμα κάποιου + συντάκτη κειμένου, διαφορετικά η εκτέλεση του + <command>freebsd-update</command> ακυρώνεται. Αν δεν είστε + σίγουρος, κρατήστε αντίγραφο ασφαλείας του καταλόγου + <filename class="directory">/etc</filename> και απλώς δεχθείτε τις + αλλαγές. Δείτε το <xref linkend="cutting-edge"> για περισσότερες + πληροφορίες σχετικά με την εντολή + <command>mergemaster</command>.</para> + + <programlisting># Directory in which to store downloaded updates and temporary +# files used by &os; Update. +# WorkDir /var/db/freebsd-update</programlisting> + + <para>Στον κατάλογο αυτό φυλάσσονται όλα τα patches και τα προσωρινά + αρχεία. Σε περιπτώσεις όπου ο χρήστης εκτελεί αναβάθμιση σε μια + νεότερη έκδοση του &os;, θα πρέπει να διαθέτει τουλάχιστον ένα + gigabyte ελεύθερου χώρου.</para> + + <programlisting># When upgrading between releases, should the list of Components be +# read strictly (StrictComponents yes) or merely as a list of components +# which *might* be installed of which &os; Update should figure out +# which actually are installed and upgrade those (StrictComponents no)? +# StrictComponents no</programlisting> + + <para>Αν θέσετε την παραπάνω επιλογή στο <literal>yes</literal>, + το <command>freebsd-update</command> θα υποθέσει ότι η λίστα + <literal>Components</literal> είναι πλήρης και δεν θα επιχειρήσει + να προχωρήσει σε αλλαγές εκτός λίστας. Ουσιαστικά, το + <command>freebsd-update</command> θα προσπαθήσει να ενημερώσει κάθε + αρχείο που ανήκει στη λίστα <literal>Components</literal>.</para> + </sect2> + + <sect2> + <title>Patches Σχετικά με την Ασφάλεια</title> + + <para>Τα patches που σχετίζονται με την ασφάλεια, αποθηκεύονται σε + ένα απομακρυσμένο μηχάνημα και μπορούν να μεταφορτωθούν και να + εγκατασταθούν με την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>freebsd-update fetch</userinput> +&prompt.root; <userinput>freebsd-update install</userinput></screen> + + <para>Αν με την παραπάνω εντολή εγκατασταθούν ενημερώσεις στον πυρήνα, + θα χρειαστεί να επανεκκινήσετε το σύστημα. Αν όλα πάνε καλά, το + σύστημα θα είναι πλέον ενημερωμένο και μπορείτε να εκτελείτε το + <command>freebsd-update</command> αυτόματα με την βοήθεια του + &man.cron.8;. Μια απλή καταχώριση στο αρχείο + <filename>/etc/crontab</filename> είναι επαρκής για αυτό + το σκοπό:</para> + + <programlisting>@daily root freebsd-update cron</programlisting> + + <para>Η παραπάνω καταχώριση ορίζει ότι το + <command>freebsd-update</command> θα εκτελείται μια φορά την ημέρα. + Με τον τρόπο αυτό, και όταν η εκτέλεση είναι μέσω της επιλογής + <option>cron</option>, το <command>freebsd-update</command> απλώς + θα ελέγχει για ενημερώσεις. Αν υπάρχουν, η εφαρμογή θα τις + κατεβάζει, αλλά δεν θα τις εγκαθιστά. Θα στέλνει όμως ένα email + στο χρήστη <username>root</username> ώστε να τις εγκαταστήσει + χειροκίνητα.</para> + + <para>Αν οτιδήποτε πάει στραβά, το <command>freebsd-update</command> + έχει την ικανότητα να επιστρέφει στην προηγούμενη σταθερή κατάσταση, + αναιρώντας το τελευταίο σετ αλλαγών με την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>freebsd-update rollback</userinput></screen> + + <para>Με την ολοκλήρωση της εντολής, θα πρέπει να επανεκκινήσετε το + σύστημα αν έχουν γίνει αλλαγές στον πυρήνα ή σε κάποιο από τα + αρθρώματα του. Αυτό θα επιτρέψει στο &os; να φορτώσει τα νέα + εκτελέσιμα στη μνήμη.</para> + + <note> + <para>Η εντολή <command>freebsd-update</command> λειτουργεί μόνο + με τον πυρήνα <filename>GENERIC</filename>. Αν έχετε κάνει αλλαγές + στον <filename>GENERIC</filename> ή έχετε εγκαταστήσει + προσαρμοσμένο πυρήνα, το <command>freebsd-update</command> δεν θα + ολοκληρώσει τις αλλαγές. Θα αποτύχει στην πρώτη περίπτωση, και + θα εμφανίσει ένα μήνυμα λάθους στη δεύτερη.</para> + </note> + </sect2> + + <sect2> + <title>Αναβαθμίσεις σε Μικρές και Μεγάλες Εκδόσεις</title> + + <para>Η διαδικασία αυτή θα απομακρύνει τα παλιά αρχεία αντικειμενικού + κώδικα (object files) καθώς και τις παλιές βιβλιοθήκες, κάνοντας + τις περισσότερες εφαρμογές τρίτων κατασκευαστών να μη λειτουργούν. + Σας συνιστούμε είτε να απεγκαταστήσετε όλα τα εγκατεστημένα ports και + να τα εγκαταστήσετε ξανά, ή να τα αναβαθμίσετε αργότερα, + χρησιμοποιώντας το βοηθητικό πρόγραμμα + <filename role="package">ports-mgmt/portupgrade</filename>. + Οι περισσότεροι χρήστες θα θέλουν να κάνουν μια δοκιμαστική + μεταγλώττιση χρησιμοποιώντας την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>portupgrade -af</userinput></screen> + + <para>Με αυτό τον τρόπο εξασφαλίζεται ότι τα πάντα θα επανεγκατασταθούν + σωστά. Σημειώστε ότι αν θέσετε την μεταβλητή περιβάλλοντος + <makevar>BATCH</makevar> στην τιμή <literal>yes</literal>, όλες οι + πιθανές ερωτήσεις που θα εμφανιστούν κατά τη διαδικασία, θα + απαντηθούν αυτόματα με <literal>yes</literal>. Έτσι δεν υπάρχει πλέον + ανάγκη για παρέμβαση του χρήστη κατά τη διάρκεια της διαδικασίας + μεταγλώττισης.</para> + + <para>Είναι δυνατές οι αναβαθμίσεις τόσο σε μικρές όσο και σε μεγάλες + εκδόσεις, δίνοντας στην εντολή <command>freebsd-update</command> τον + επιθυμητό αριθμό έκδοσης. Για παράδειγμα, η ακόλουθη εντολή θα + αναβαθμίσει το σύστημα σε &os; 6.3:</para> + + <screen>&prompt.root; <userinput>freebsd-update -r 6.3-RELEASE upgrade</userinput></screen> + + <para>Μετά τη λήψη της εντολής, το + <command>freebsd-update</command> θα αξιολογήσει την κατάσταση του + συστήματος και του αρχείου ρυθμίσεων του, σε μια απόπειρα να μαζέψει + τις απαραίτητες πληροφορίες για την αναβάθμιση του συστήματος. + Οι πληροφορίες που ανιχνεύθηκαν θα εμφανιστούν στην οθόνη με τη μορφή + μιας λίστας εγκατεστημένων προγραμμάτων. Για παράδειγμα:</para> + + <screen>Looking up update.FreeBSD.org mirrors... 1 mirrors found. +Fetching metadata signature for 6.3-BETA1 from update1.FreeBSD.org... done. +Fetching metadata index... done. +Inspecting system... done. + +The following components of FreeBSD seem to be installed: +kernel/smp src/base src/bin src/contrib src/crypto src/etc src/games +src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue +src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin +world/base world/info world/lib32 world/manpages + +The following components of FreeBSD do not seem to be installed: +kernel/generic world/catpages world/dict world/doc world/games +world/proflibs + +Does this look reasonable (y/n)? y</screen> + + <para>Στο σημείο αυτό, το <command>freebsd-update</command> θα + κατεβάσει όλα τα αρχεία που απαιτούνται για την αναβάθμιση. Σε + μερικές περιπτώσεις, ο χρήστης θα κληθεί να απαντήσει σε ερωτήσεις + σχετικά με το τι θα εγκατασταθεί ή πως πρέπει να προχωρήσει η + διαδικασία.</para> + + <para>Αφού μεταφορτωθούν όλα τα patches στο τοπικό σύστημα, θα γίνει + και η εφαρμογή τους. Η διαδικασία αυτή ίσως πάρει λίγο χρόνο, + ανάλογα με την ταχύτητα και το φορτίο του μηχανήματος. Έπειτα θα + γίνει η συγχώνευση των αρχείων ρυθμίσεων. Αυτό το μέρος της + διαδικασίας απαιτεί παρέμβαση του χρήστη, καθώς σε κάποια αρχεία θα + χρειαστεί η συγχώνευση να γίνει χειροκίνητα με τη βοήθεια κάποιου + συντάκτη κειμένου. Ο χρήστης θα ενημερώνεται για το αποτέλεσμα κάθε + επιτυχημένης συγχώνευσης καθώς εξελίσσεται η διαδικασία. Σε + περίπτωση αποτυχημένης συγχώνευσης (ή αγνόησης της), η διαδικασία + αναβάθμισης θα διακοπεί. Ενδεχομένως να θέλετε να κρατήσετε αντίγραφο + ασφαλείας του καταλόγου <filename class="directory">/etc</filename> + και να συγχωνεύσετε αργότερα (χειροκίνητα) κάποια σημαντικά αρχεία, + όπως το <filename>master.passwd</filename> ή το + <filename>group</filename>.</para> + + <note> + <para>Στο σημείο αυτό δεν έχει γίνει ακόμα καμιά αλλαγή στο σύστημα, + καθώς όλη η διαδικασία της αναβάθμισης και συγχώνευσης γίνεται σε + διαφορετικό κατάλογο. Όταν εφαρμοστούν επιτυχώς όλα τα patches + και ολοκληρωθεί με επιτυχία η διαδικασία της συγχώνευσης όλων των + αρχείων ρύθμισης, ο χρήστης θα πρέπει να επιβεβαιώσει την τελική + εγκατάσταση.</para> + </note> + + <para>Με το τέλος αυτής τη διαδικασίας, η αναβάθμιση μπορεί να + οριστικοποιηθεί στο δίσκο, με τη χρήση της ακόλουθης εντολής:</para> + + <screen>&prompt.root; <userinput>freebsd-update install</userinput></screen> + + <para>Στην πρώτη φάση, θα αλλαχθεί ο πυρήνας και τα σχετικά αρθρώματα. + Στο σημείο αυτό, θα πρέπει να γίνει επανεκκίνηση του μηχανήματος. + Μπορείτε να χρησιμοποιήσετε την ακόλουθη εντολή για να επανεκκινήσετε + το μηχάνημα ώστε να φορτωθεί στη μνήμη ο νέος πυρήνας:</para> + + <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen> + + <para>Μόλις το σύστημα επανέλθει σε λειτουργία, θα πρέπει να εκτελέσετε + ξανά το <command>freebsd-update</command>. Η προηγούμενη λειτουργία + έχει αποθηκευθεί, και έτσι το <command>freebsd-update</command> δεν θα + ξεκινήσει από την αρχή, αλλά θα απομακρύνει όλες τις παλιές + κοινόχρηστες βιβλιοθήκες και τα αρχεία αντικειμενικού κώδικα. Για να + συνεχίσετε σε αυτό το στάδιο, δώστε την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>freebsd-update install</userinput></screen> + + <note> + <para>Ανάλογα με το αν υπήρξαν αλλαγές στους αριθμούς εκδόσεων των + βιβλιοθηκών, ίσως να υπάρχουν μόνο δύο φάσεις εγκατάστασης αντί για + τρεις.</para> + </note> + + <para>Όλο το λογισμικό τρίτου κατασκευαστή θα πρέπει τώρα να + μεταγλωττιστεί και να επανεγκατασταθεί από την αρχή. Αυτό απαιτείται + καθώς το εγκατεστημένο λογισμικό ίσως εξαρτάται από βιβλιοθήκες οι + οποίες αφαιρέθηκαν κατά τη διαδικασία της αναβάθμισης. Μπορείτε να + χρησιμοποιήσετε την εντολή + <filename role="package">ports-mgmt/portupgrade</filename> + για να αυτοματοποιήσετε αυτή τη διαδικασία. Για να ξεκινήσετε, δώστε + τις παρακάτω εντολές:</para> + + <screen>&prompt.root; <userinput>portupgrade -f ruby</userinput> +&prompt.root; <userinput>rm /var/db/pkg/pkgdb.db</userinput> +&prompt.root; <userinput>portupgrade -f ruby18-bdb</userinput> +&prompt.root; <userinput>rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db</userinput> +&prompt.root; <userinput>portupgrade -af</userinput></screen> + + <para>Μόλις ολοκληρωθεί το παραπάνω, ολοκληρώστε τη διαδικασία + αναβάθμισης με μια τελευταία κλήση της εντολής + <command>freebsd-update</command>. Δώστε την παρακάτω εντολή για να + ολοκληρώσετε οτιδήποτε έχει απομείνει στη διαδικασία + αναβάθμισης:</para> + + <screen>&prompt.root; <userinput>freebsd-update install</userinput></screen> + + <para>Επανεκκινήστε το μηχάνημα σας στην νέα έκδοση του &os;. + Η διαδικασία έχει ολοκληρωθεί.</para> + </sect2> + + <sect2> + <title>Σύγκριση Κατάστασης του Συστήματος</title> + + <para>Το βοηθητικό πρόγραμμα <command>freebsd-update</command> μπορεί να + χρησιμοποιηθεί για να ελέγξετε την κατάσταση της εγκατεστημένης + έκδοσης του &os; σε σχέση με μια γνωστή και σωστή εγκατάσταση. + Η επιλογή αυτή συγκρίνει και αξιολογεί την τρέχουσα έκδοση των + προγραμμάτων συστήματος, των βιβλιοθηκών και των αρχείων ρύθμισης. + Για να ξεκινήσετε τη σύγκριση, δώστε την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>freebsd-update IDS >> outfile.ids</userinput></screen> + + <warning> + <para>Αν και το όνομα της εντολής είναι <acronym>IDS</acronym>, δεν + θα πρέπει σε καμιά περίπτωση να θεωρηθεί υποκατάστατο ενός + συστήματος ανίχνευσης εισβολέα (intrusion detection system) όπως + είναι για παράδειγμα το + <filename role="package">security/snort</filename>. + Καθώς το <command>freebsd-update</command> αποθηκεύει τα δεδομένα + του στο δίσκο, υπάρχει πάντα η πιθανότητα να έχει γίνει αλλοίωση + τους. Αν και η πιθανότητα αυτή μπορεί να μειωθεί χρησιμοποιώντας + τη ρύθμιση <varname>kern.securelevel</varname> και αποθηκεύοντας + τα δεδομένα της εντολής <command>freebsd-update</command> σε ένα + σύστημα αρχείων μόνο για ανάγνωση, μια ακόμα καλύτερη λύση θα ήταν + να συγκρίνετε το σύστημα με κάποιο δίσκο που θεωρείτε σίγουρα + ασφαλή. Για παράδειγμα, με ένα δίσκο <acronym>DVD</acronym> ή με + ένα εξωτερικό δίσκο <acronym>USB</acronym> που φυλάσσετε σε ασφαλή + τοποθεσία.</para> + </warning> + + <para>Θα γίνει τώρα μια επιθεώρηση του συστήματος και θα δημιουργηθεί + μια λίστα από αρχεία και τιμές hash του τύπου &man.sha256.1;, + τόσο για το εγκατεστημένο όσο και για το γνωστό σύστημα. Επειδή + πρόκειται για μεγάλη λίστα, την ανακατευθύνουμε στο αρχείο + <filename>outfile.ids</filename>. Στην οθόνη το κείμενο θα κυλούσε + πολύ γρήγορα, και σύντομα θα γέμιζε την προσωρινή μνήμη απεικόνισης + της κονσόλας.</para> + + <para>Οι γραμμές αυτές έχουν γενικά μεγάλο μήκος, αλλά είναι εύκολο + να επεξεργαστούμε την έξοδο. Για παράδειγμα, για να δείτε μια λίστα + όλων των αρχείων που διαφέρουν από αυτά της επίσημης έκδοσης, δώστε + την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>cat update.ids | awk '{ print $1 }' | more</userinput> +/etc/master.passwd +/etc/motd +/etc/passwd +/etc/pf.conf</screen> + + <para>Τα παραπάνω είναι μόνο ένα μέρος της εξόδου, υπάρχουν ακόμα + πολλά διαφορετικά αρχεία. Κάποια από αυτά τα αρχεία είναι φυσιολογικό + να έχουν τροποποιηθεί. Για παράδειγμα, το + <filename>/etc/passwd</filename> έχει τροποποιηθεί, καθώς έχουν + προστεθεί χρήστες στο σύστημα. Σε μερικές περιπτώσεις, μπορεί να + υπάρχουν και άλλα αρχεία, όπως π.χ. αρθρώματα πυρήνα τα οποία + διαφέρουν αφού έχουν ενημερωθεί μέσω της + <command>freebsd-update</command>. Για να εξαιρέσετε συγκεκριμένα + αρχεία ή καταλόγους, προσθέστε τα στην επιλογή + <literal>IDSIgnorePaths</literal> στο αρχείο ρυθμίσεων + <filename>/etc/freebsd-update.conf</filename>.</para> + + <para>Εκτός από την χρήση που αναφέραμε προηγουμένως, το σύστημα αυτό + μπορεί να χρησιμοποιηθεί και ως τμήμα μιας λεπτομερούς διαδικασίας + αναβάθμισης.</para> + </sect2> + </sect1> + + <sect1 id="updating-portsnap"> + <title>Portsnap: Ένα Εργαλείο Ενημέρωσης της Συλλογής των Ports</title> + + <para>Το βασικό σύστημα του &os; περιλαμβάνει επίσης ένα βοηθητικό + πρόγραμμα για την ενημέρωση της Συλλογής των Ports. Πρόκειται για το + &man.portsnap.8;. Όταν το εκτελέσετε, θα συνδεθεί σε ένα απομακρυσμένο + διακομιστή, θα επαληθεύσει το κλειδί του πηγαίου κώδικα, και θα + κατεβάσει ένα νέο αντίγραφο της Συλλογής των Ports. Το κλειδί + χρησιμοποιείται για να επαληθεύσει την ακεραιότητα όλων των αρχείων + που μεταφορτώνονται, εξασφαλίζοντας ότι δεν έχουν αλλοιωθεί κατά + την μεταφορά. Για να κατεβάσετε τα τελευταία αρχεία της Συλλογής των + Ports, εκτελέστε την ακόλουθη εντολή:</para> + + <screen>&prompt.root; <userinput>portsnap fetch</userinput> +Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found. +Fetching snapshot tag from portsnap1.FreeBSD.org... done. +Fetching snapshot metadata... done. +Updating from Wed Aug 6 18:00:22 EDT 2008 to Sat Aug 30 20:24:11 EDT 2008. +Fetching 3 metadata patches.. done. +Applying metadata patches... done. +Fetching 3 metadata files... done. +Fetching 90 patches.....10....20....30....40....50....60....70....80....90. done. +Applying patches... done. +Fetching 133 new ports or files... done.</screen> + + <para>Το παραπάνω παράδειγμα δείχνει ότι το &man.portsnap.8; + βρήκε και επαλήθευσε αρκετά patches τα οποία πρέπει να εφαρμοστούν + στο υπάρχον δέντρο των ports. Αυτό δείχνει επίσης ότι το πρόγραμμα + έχει εκτελεστεί κατά το παρελθόν. Αν αυτή ήταν η πρώτη φορά που + εκτελούνταν, θα γίνονταν απλώς κατέβασμα της συλλογής.</para> + + <para>Όταν το &man.portsnap.8; εκτελέσει επιτυχώς της λειτουργία + <command>fetch</command>, η Συλλογή των Ports και τα + αντίστοιχα patches έχουν αποθηκευθεί στο τοπικό σύστημα και έχει γίνει + η επαλήθευση τους. Τα ενημερωμένα αρχεία μπορούν να εγκατασταθούν + γράφοντας:</para> + + <screen>&prompt.root; <userinput>portsnap extract</userinput> +/usr/ports/.cvsignore +/usr/ports/CHANGES +/usr/ports/COPYRIGHT +/usr/ports/GIDs +/usr/ports/KNOBS +/usr/ports/LEGAL +/usr/ports/MOVED +/usr/ports/Makefile +/usr/ports/Mk/bsd.apache.mk +/usr/ports/Mk/bsd.autotools.mk +/usr/ports/Mk/bsd.cmake.mk +<replaceable>...</replaceable></screen> + + <para>Η διαδικασία έχει πλέον ολοκληρωθεί, και μπορείτε να εγκαταστήσετε + ή να αναβαθμίσετε εφαρμογές χρησιμοποιώντας την ενημερωμένη Συλλογή των + Ports.</para> + </sect1> +</chapter> + +<!-- + Local Variables: + mode: sgml + sgml-declaration: "../chapter.decl" + sgml-indent-data: t + sgml-omittag: nil + sgml-always-quote-attributes: t + sgml-parent-document: ("../book.sgml" "part" "chapter") + End: +--> |