- Definitively upgrade to DocBook 5.0
This commit is contained in:
parent
35f1d6c78b
commit
24d129e8d1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/projects/db5/; revision=43125
958 changed files with 96265 additions and 123971 deletions
|
|
@ -1,16 +1,12 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN"
|
||||
"../../../share/xml/freebsd45.dtd">
|
||||
|
||||
<article lang='en'>
|
||||
<articleinfo>
|
||||
<title>FreeBSD Quickstart Guide for &linux; Users</title>
|
||||
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V5.0-Based Extension//EN"
|
||||
"../../../share/xml/freebsd50.dtd">
|
||||
<article xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
|
||||
<info><title>FreeBSD Quickstart Guide for &linux; Users</title>
|
||||
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>John</firstname>
|
||||
<surname>Ferrell</surname>
|
||||
</author>
|
||||
<author><personname><firstname>John</firstname><surname>Ferrell</surname></personname></author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
|
|
@ -22,7 +18,7 @@
|
|||
|
||||
<releaseinfo>$FreeBSD$</releaseinfo>
|
||||
|
||||
<legalnotice id="trademarks" role="trademarks">
|
||||
<legalnotice xml:id="trademarks" role="trademarks">
|
||||
&tm-attrib.freebsd;
|
||||
&tm-attrib.linux;
|
||||
&tm-attrib.intel;
|
||||
|
|
@ -35,9 +31,9 @@
|
|||
<para>This document is intended to quickly familiarize intermediate to
|
||||
advanced &linux; users with the basics of FreeBSD.</para>
|
||||
</abstract>
|
||||
</articleinfo>
|
||||
</info>
|
||||
|
||||
<sect1 id="intro">
|
||||
<sect1 xml:id="intro">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>This document will highlight the differences between &os; and
|
||||
|
|
@ -50,11 +46,11 @@
|
|||
<para>This document assumes that you have already installed &os;.
|
||||
If you have not installed &os; or need help with the installation
|
||||
process please refer to the
|
||||
<ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/install.html">
|
||||
Installing FreeBSD</ulink> chapter of the &os; Handbook.</para>
|
||||
<link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/install.html">
|
||||
Installing FreeBSD</link> chapter of the &os; Handbook.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="shells">
|
||||
<sect1 xml:id="shells">
|
||||
<title>Shells: No Bash?</title>
|
||||
|
||||
<para>Those coming from &linux; are often surprised to find that
|
||||
|
|
@ -62,35 +58,32 @@
|
|||
In fact, <application>Bash</application> is not even in the default
|
||||
installation. Instead, &os; uses &man.tcsh.1; as the default shell.
|
||||
Although, <application>Bash</application> and your other favorite
|
||||
shells are available in &os;'s <ulink
|
||||
url="article.html#SOFTWARE">Packages and Ports Collection</ulink>.</para>
|
||||
shells are available in &os;'s <link xlink:href="article.html#SOFTWARE">Packages and Ports Collection</link>.</para>
|
||||
|
||||
<para>If you do install other shells you can use &man.chsh.1; to set
|
||||
a user's default shell. It is, however, recommended that the
|
||||
<username>root</username>'s default shell remain unchanged. The
|
||||
<systemitem class="username">root</systemitem>'s default shell remain unchanged. The
|
||||
reason for this is that shells not included in the base distribution
|
||||
are normally installed in <filename>/usr/local/bin</filename> or
|
||||
<filename>/usr/bin</filename>. In the event of a problem the file
|
||||
systems where <filename>/usr/local/bin</filename> and
|
||||
<filename>/usr/bin</filename> are located may not be mounted. In this
|
||||
case <username>root</username> would not have access to its default
|
||||
shell, preventing <username>root</username> from logging in. For this
|
||||
reason a second <username>root</username> account, the
|
||||
<username>toor</username> account, was created for use with non-default
|
||||
shells. See the security FAQ for information regarding the <ulink
|
||||
url="&url.base;/doc/en_US.ISO8859-1/books/faq/security.html#TOOR-ACCOUNT">toor account</ulink>.</para>
|
||||
case <systemitem class="username">root</systemitem> would not have access to its default
|
||||
shell, preventing <systemitem class="username">root</systemitem> from logging in. For this
|
||||
reason a second <systemitem class="username">root</systemitem> account, the
|
||||
<systemitem class="username">toor</systemitem> account, was created for use with non-default
|
||||
shells. See the security FAQ for information regarding the <link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/faq/security.html#TOOR-ACCOUNT">toor account</link>.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="software">
|
||||
<sect1 xml:id="software">
|
||||
<title>Packages and Ports: Adding software in &os;</title>
|
||||
|
||||
<para>In addition to the traditional &unix; method of installing software
|
||||
(download source, extract, edit source code, and compile), &os; offers
|
||||
two other methods for installing applications: packages and ports. A
|
||||
complete list of of all available ports and packages can be found <ulink
|
||||
url="http://www.freebsd.org/ports/master-index.html">here</ulink>.</para>
|
||||
complete list of of all available ports and packages can be found <link xlink:href="http://www.freebsd.org/ports/master-index.html">here</link>.</para>
|
||||
|
||||
<sect2 id="packages">
|
||||
<sect2 xml:id="packages">
|
||||
<title>Packages</title>
|
||||
|
||||
<para>Packages are pre-compiled applications, the &os; equivalents
|
||||
|
|
@ -100,13 +93,13 @@
|
|||
the following command installs
|
||||
<application>Apache 2.2</application>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add <replaceable>/tmp/apache-2.2.6_2.tbz</replaceable></userinput></screen>
|
||||
<screen>&prompt.root; <userinput>pkg_add /tmp/apache-2.2.6_2.tbz</userinput></screen>
|
||||
|
||||
<para>Using the <option>-r</option> switch will tell &man.pkg.add.1;
|
||||
to automatically fetch a package and install it, as well as any
|
||||
dependencies:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r <replaceable>apache22</replaceable></userinput>
|
||||
<screen>&prompt.root; <userinput>pkg_add -r apache22</userinput>
|
||||
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/apache22.tbz... Done.
|
||||
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/All/expat-2.0.0_1.tbz... Done.
|
||||
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/All/perl-5.8.8_1.tbz... Done.
|
||||
|
|
@ -123,17 +116,16 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
version of the application. You can use the
|
||||
<envar>PACKAGESITE</envar> variable to override this default
|
||||
behavior. For example, set <envar>PACKAGESITE</envar> to
|
||||
<ulink url="ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/"></ulink>
|
||||
<uri xlink:href="ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/">ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/</uri>
|
||||
to download the most recent packages built for the
|
||||
6.X series.</para>
|
||||
</note>
|
||||
|
||||
<para>For more information on packages please refer to section 4.4 of
|
||||
the &os; Handbook: <ulink
|
||||
url="&url.base;/doc/en_US.ISO8859-1/books/handbook/packages-using.html">Using the Packages System</ulink>.</para>
|
||||
the &os; Handbook: <link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/packages-using.html">Using the Packages System</link>.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ports">
|
||||
<sect2 xml:id="ports">
|
||||
<title>Ports</title>
|
||||
|
||||
<para>&os;'s second method for installing applications is the
|
||||
|
|
@ -151,8 +143,7 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
added from the installation discs using &man.sysinstall.8;, or pulled
|
||||
from the &os; servers using &man.csup.1; or &man.portsnap.8;.
|
||||
Detailed instructions for installing the Ports Collection can be
|
||||
found in <ulink
|
||||
url="&url.base;/doc/en_US.ISO8859-1/books/handbook/ports-using.html">section 4.5.1</ulink>
|
||||
found in <link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/ports-using.html">section 4.5.1</link>
|
||||
of the handbook.</para>
|
||||
|
||||
<para>Installing a port is as simple (generally) as changing in to the
|
||||
|
|
@ -167,18 +158,17 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
ability to customize the installation options. For example, when
|
||||
installing <application>Apache 2.2</application> from ports you can
|
||||
enable <application>mod_ldap</application> by setting the
|
||||
<makevar>WITH_LDAP</makevar> &man.make.1; variable:</para>
|
||||
<varname>WITH_LDAP</varname> &man.make.1; variable:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/www/apache22</userinput>
|
||||
&prompt.root; <userinput>make WITH_LDAP="YES" install clean</userinput></screen>
|
||||
|
||||
<para>Please see section 4.5 of the &os; Handbook, <ulink
|
||||
url="&url.base;/doc/en_US.ISO8859-1/books/handbook/ports-using.html">Using
|
||||
the Ports Collection</ulink>, for more information about the
|
||||
<para>Please see section 4.5 of the &os; Handbook, <link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/ports-using.html">Using
|
||||
the Ports Collection</link>, for more information about the
|
||||
Ports Collection.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="which">
|
||||
<sect2 xml:id="which">
|
||||
<title>Ports or packages, which one should I use?</title>
|
||||
|
||||
<para>Packages are just pre-compiled ports, so it is really a matter
|
||||
|
|
@ -215,12 +205,12 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
customize, ports are the way to go. (And remember, if you
|
||||
need to customize but prefer packages, you can build a custom
|
||||
package from ports using <command>make</command>
|
||||
<maketarget>package</maketarget> and then copy the package to
|
||||
<buildtarget>package</buildtarget> and then copy the package to
|
||||
other servers.)</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="startup">
|
||||
<sect1 xml:id="startup">
|
||||
<title>System Startup: Where are the run-levels?</title>
|
||||
|
||||
<para>&linux; uses the SysV init system, whereas &os; uses the
|
||||
|
|
@ -257,8 +247,7 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
the <quote>base</quote> system, such as
|
||||
<application>Apache</application>, <application>X11</application>,
|
||||
<application>Mozilla Firefox</application>, etc. These
|
||||
user-installed applications are generally installed using &os;'s <ulink
|
||||
url="article.html#SOFTWARE">Packages and Ports Collection</ulink>.
|
||||
user-installed applications are generally installed using &os;'s <link xlink:href="article.html#SOFTWARE">Packages and Ports Collection</link>.
|
||||
In order to keep them separate from the <quote>base</quote> system,
|
||||
user-installed applications are normally installed under
|
||||
<filename>/usr/local/</filename>. Therefore the user-installed
|
||||
|
|
@ -268,7 +257,7 @@ in your /etc/rc.conf. Extra options can be found in startup script.</screen>
|
|||
</sidebar>
|
||||
|
||||
<para>Services are enabled by specifying
|
||||
<literal><replaceable>ServiceName</replaceable>_enable="YES"</literal> in
|
||||
<literal>ServiceName_enable="YES"</literal> in
|
||||
<filename>/etc/rc.conf</filename> (&man.rc.conf.5;). Take a look at
|
||||
<filename>/etc/defaults/rc.conf</filename> for the system defaults,
|
||||
these default settings are overridden by settings in
|
||||
|
|
@ -291,25 +280,25 @@ apache22_flags="-DSSL"</programlisting>
|
|||
the service can be started from the command line (without rebooting the
|
||||
system):</para>
|
||||
|
||||
<screen>&prompt.root; <userinput><replaceable>/etc/rc.d/sshd</replaceable> start</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>/etc/rc.d/sshd start</userinput></screen>
|
||||
|
||||
<para>If a service has not been enabled it can be started from the
|
||||
command line using <option>forcestart</option>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput><replaceable>/etc/rc.d/sshd</replaceable> forcestart</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>/etc/rc.d/sshd forcestart</userinput></screen>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="network">
|
||||
<sect1 xml:id="network">
|
||||
<title>Network configuration</title>
|
||||
|
||||
<sect2 id="interfaces">
|
||||
<sect2 xml:id="interfaces">
|
||||
<title>Network Interfaces</title>
|
||||
|
||||
<para>Instead of a generic <emphasis>ethX</emphasis> identifier that
|
||||
&linux; uses to identify a network interface, &os; uses the driver
|
||||
name followed by a number as the identifier. The following output
|
||||
from &man.ifconfig.8; shows two &intel; Pro 1000 network
|
||||
interfaces (<devicename>em0</devicename> and <devicename>em1</devicename>):</para>
|
||||
interfaces (<filename>em0</filename> and <filename>em1</filename>):</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>ifconfig</userinput>
|
||||
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
||||
|
|
@ -326,7 +315,7 @@ em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
|||
status: active</screen>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ipaddress">
|
||||
<sect2 xml:id="ipaddress">
|
||||
<title>IP Configuration</title>
|
||||
|
||||
<para>An IP address can be assigned to an interface using
|
||||
|
|
@ -347,16 +336,16 @@ ifconfig_em0="DHCP"</programlisting>
|
|||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="firewall">
|
||||
<sect1 xml:id="firewall">
|
||||
<title>Firewall</title>
|
||||
|
||||
<para>Like <application>IPTABLES</application> in &linux;, &os; also offers
|
||||
a kernel level firewall; actually &os; offers three firewalls:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><simpara><ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html">IPFIREWALL</ulink></simpara></listitem>
|
||||
<listitem><simpara><ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html">IPFILTER</ulink></simpara></listitem>
|
||||
<listitem><simpara><ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-pf.html">PF</ulink></simpara></listitem>
|
||||
<listitem><simpara><link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html">IPFIREWALL</link></simpara></listitem>
|
||||
<listitem><simpara><link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html">IPFILTER</link></simpara></listitem>
|
||||
<listitem><simpara><link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/firewalls-pf.html">PF</link></simpara></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para><application>IPFIREWALL</application> or
|
||||
|
|
@ -395,7 +384,7 @@ ifconfig_em0="DHCP"</programlisting>
|
|||
<programlisting>pass in on $ext_if inet proto tcp from any to ($ext_if) port 22</programlisting>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="updates">
|
||||
<sect1 xml:id="updates">
|
||||
<title>Updating &os;</title>
|
||||
|
||||
<para>There are three methods for updating a &os; system: from source,
|
||||
|
|
@ -407,7 +396,7 @@ ifconfig_em0="DHCP"</programlisting>
|
|||
<application>Subversion</application> servers.
|
||||
Once the local source code is up to date you can build new versions of
|
||||
the kernel and userland. For more information on source updates see
|
||||
<ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/updating-upgrading.html">the chapter on updating</ulink>
|
||||
<link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/updating-upgrading.html">the chapter on updating</link>
|
||||
in the &os; Handbook.</para>
|
||||
|
||||
<para>Binary updates are similar to using <command>yum</command> or
|
||||
|
|
@ -429,7 +418,7 @@ ifconfig_em0="DHCP"</programlisting>
|
|||
the option to upgrade.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="procfs">
|
||||
<sect1 xml:id="procfs">
|
||||
<title>procfs: Gone But Not Forgotten</title>
|
||||
|
||||
<para>In &linux;, you may have looked at
|
||||
|
|
@ -472,7 +461,7 @@ kern.posix1version: 200112
|
|||
|
||||
<para>There are occasions where procfs is required, such as running
|
||||
older software, using &man.truss.1; to trace system calls, and
|
||||
<ulink url="&url.base;/doc/en_US.ISO8859-1/books/handbook/linuxemu.html">&linux; Binary Compatibility</ulink>.
|
||||
<link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/linuxemu.html">&linux; Binary Compatibility</link>.
|
||||
(Although, &linux; Binary Compatibility uses its own procfs, &man.linprocfs.5;.)
|
||||
If you need to mount procfs you can add the following to
|
||||
<filename>/etc/fstab</filename>:</para>
|
||||
|
|
@ -489,10 +478,10 @@ kern.posix1version: 200112
|
|||
<screen>&prompt.root; <userinput>mount /proc</userinput></screen>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="commands">
|
||||
<sect1 xml:id="commands">
|
||||
<title>Common Commands</title>
|
||||
|
||||
<sect2 id="packageCommands">
|
||||
<sect2 xml:id="packageCommands">
|
||||
<title>Package Management</title>
|
||||
|
||||
<para>
|
||||
|
|
@ -508,14 +497,14 @@ kern.posix1version: 200112
|
|||
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><command>yum install <replaceable>package</replaceable></command> / <command>apt-get install <replaceable>package</replaceable></command></entry>
|
||||
<entry><command>pkg_add -r <replaceable>package</replaceable></command></entry>
|
||||
<entry><command>yum install package</command> / <command>apt-get install package</command></entry>
|
||||
<entry><command>pkg_add -r package</command></entry>
|
||||
<entry>Install <replaceable>package</replaceable> from remote repository</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><command>rpm -ivh <replaceable>package</replaceable></command> / <command>dpkg -i <replaceable>package</replaceable></command></entry>
|
||||
<entry><command>pkg_add -v <replaceable>package</replaceable></command></entry>
|
||||
<entry><command>rpm -ivh package</command> / <command>dpkg -i package</command></entry>
|
||||
<entry><command>pkg_add -v package</command></entry>
|
||||
<entry>Install package</entry>
|
||||
</row>
|
||||
|
||||
|
|
@ -530,7 +519,7 @@ kern.posix1version: 200112
|
|||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="systemCommands">
|
||||
<sect2 xml:id="systemCommands">
|
||||
<title>System Management</title>
|
||||
|
||||
<para>
|
||||
|
|
@ -575,12 +564,11 @@ kern.posix1version: 200112
|
|||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="conclusion">
|
||||
<sect1 xml:id="conclusion">
|
||||
<title>Conclusion</title>
|
||||
|
||||
<para>Hopefully this document has provided you with enough to get
|
||||
started with &os;. Be sure to take a look at the <ulink
|
||||
url="&url.base;/doc/en_US.ISO8859-1/books/handbook/index.html">&os; Handbook</ulink>
|
||||
started with &os;. Be sure to take a look at the <link xlink:href="&url.base;/doc/en_US.ISO8859-1/books/handbook/index.html">&os; Handbook</link>
|
||||
for more in depth coverage of the topics touched on as well as
|
||||
the many topics not covered in this document.</para>
|
||||
</sect1>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue