Source string Read only

(itstool) path: sect1/para
461/4610
Context English State
A benefit of using ports to install software is the ability to customize the installation options. This example specifies that the <application>mod_ldap</application> module should also be installed:
<prompt>#</prompt> <userinput>cd /usr/ports/www/apache24</userinput>
<prompt>#</prompt> <userinput>make WITH_LDAP="YES" install clean</userinput>
Refer to <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/ports-using.html">Using the Ports Collection</link> for more information.
System Startup
Many <trademark class="registered">Linux</trademark> distributions use the SysV init system, whereas FreeBSD uses the traditional BSD-style <citerefentry><refentrytitle>init</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Under the BSD-style <citerefentry><refentrytitle>init</refentrytitle><manvolnum>8</manvolnum></citerefentry>, there are no run-levels and <filename>/etc/inittab</filename> does not exist. Instead, startup is controlled by <citerefentry><refentrytitle>rc</refentrytitle><manvolnum>8</manvolnum></citerefentry> scripts. At system boot, <filename>/etc/rc</filename> reads <filename>/etc/rc.conf</filename> and <filename>/etc/defaults/rc.conf</filename> to determine which services are to be started. The specified services are then started by running the corresponding service initialization scripts located in <filename>/etc/rc.d/</filename> and <filename>/usr/local/etc/rc.d/</filename>. These scripts are similar to the scripts located in <filename>/etc/init.d/</filename> on <trademark class="registered">Linux</trademark> systems.
The scripts found in <filename>/etc/rc.d/</filename> are for applications that are part of the <quote>base</quote> system, such as <citerefentry><refentrytitle>cron</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>sshd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, and <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The scripts in <filename>/usr/local/etc/rc.d/</filename> are for user-installed applications such as <application>Apache</application> and <application>Squid</application>.
Since FreeBSD is developed as a complete operating system, user-installed applications are not considered to be part of the <quote>base</quote> system. User-installed applications are generally installed using <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/ports-using.html">Packages or Ports</link>. In order to keep them separate from the base system, user-installed applications are installed under <filename>/usr/local/</filename>. Therefore, user-installed binaries reside in <filename>/usr/local/bin/</filename>, configuration files are in <filename>/usr/local/etc/</filename>, and so on.
Services are enabled by adding an entry for the service in <filename>/etc/rc.conf</filename> . The system defaults are found in <filename>/etc/defaults/rc.conf</filename> and these default settings are overridden by settings in <filename>/etc/rc.conf</filename>. Refer to <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information about the available entries. When installing additional applications, review the application's install message to determine how to enable any associated services.
The following entries in <filename>/etc/rc.conf</filename> enable <citerefentry><refentrytitle>sshd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, enable <application>Apache 2.4</application>, and specify that <application>Apache</application> should be started with <acronym>SSL</acronym>.
# enable SSHD
sshd_enable="YES"
# enable Apache with SSL
apache24_enable="YES"
apache24_flags="-DSSL"
Once a service has been enabled in <filename>/etc/rc.conf</filename>, it can be started without rebooting the system:
<prompt>#</prompt> <userinput>service <replaceable>sshd</replaceable> start</userinput>
<prompt>#</prompt> <userinput>service <replaceable>apache24</replaceable> start</userinput>
If a service has not been enabled, it can be started from the command line using <option>onestart</option>:
<prompt>#</prompt> <userinput>service <replaceable>sshd</replaceable> onestart</userinput>
Network Configuration
Instead of a generic <emphasis>ethX</emphasis> identifier that <trademark class="registered">Linux</trademark> uses to identify a network interface, FreeBSD uses the driver name followed by a number. The following output from <citerefentry><refentrytitle>ifconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry> shows two <trademark class="registered">Intel</trademark> Pro 1000 network interfaces (<filename>em0</filename> and <filename>em1</filename>):
<prompt>%</prompt> <userinput>ifconfig</userinput>
em0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
options=b&lt;RXCSUM,TXCSUM,VLAN_MTU&gt;
inet 10.10.10.100 netmask 0xffffff00 broadcast 10.10.10.255
ether 00:50:56:a7:70:b2
media: Ethernet autoselect (1000baseTX &lt;full-duplex&gt;)
status: active
em1: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
options=b&lt;RXCSUM,TXCSUM,VLAN_MTU&gt;
inet 192.168.10.222 netmask 0xffffff00 broadcast 192.168.10.255
ether 00:50:56:a7:03:2b
media: Ethernet autoselect (1000baseTX &lt;full-duplex&gt;)
status: active
An <acronym>IP</acronym> address can be assigned to an interface using <citerefentry><refentrytitle>ifconfig</refentrytitle><manvolnum>8</manvolnum></citerefentry>. To remain persistent across reboots, the <acronym>IP</acronym> configuration must be included in <filename>/etc/rc.conf</filename>. The following <filename>/etc/rc.conf</filename> entries specify the hostname, <acronym>IP</acronym> address, and default gateway:
hostname="server1.example.com"
ifconfig_em0="inet 10.10.10.100 netmask 255.255.255.0"
defaultrouter="10.10.10.1"
Use the following entries to instead configure an interface for <acronym>DHCP</acronym>:
hostname="server1.example.com"
ifconfig_em0="DHCP"
Firewall
FreeBSD does not use <trademark class="registered">Linux</trademark> <application>IPTABLES</application> for its firewall. Instead, FreeBSD offers a choice of three kernel level firewalls:
<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/firewalls-pf.html">PF</link>
<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/firewalls-ipf.html">IPFILTER</link>
<link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html">IPFW</link>
<application>PF</application> is developed by the OpenBSD project and ported to FreeBSD. <application>PF</application> was created as a replacement for <application>IPFILTER</application> and its syntax is similar to that of <application>IPFILTER</application>. <application>PF</application> can be paired with <citerefentry><refentrytitle>altq</refentrytitle><manvolnum>4</manvolnum></citerefentry> to provide <acronym>QoS</acronym> features.
This sample <application>PF</application> entry allows inbound <application>SSH</application>:
pass in on $ext_if inet proto tcp from any to ($ext_if) port 22
<application>IPFILTER</application> is the firewall application developed by Darren Reed. It is not specific to FreeBSD and has been ported to several operating systems including NetBSD, OpenBSD, SunOS, HP/UX, and Solaris.
The <application>IPFILTER</application> syntax to allow inbound <application>SSH</application> is:

Loading…

User avatar None

New source string

FreeBSD Doc / articles_linux-usersEnglish

New source string 7 months ago
Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/para
Flags
read-only
Source string location
article.translate.xml:272
String age
7 months ago
Source string age
7 months ago
Translation file
articles/linux-users.pot, string 55