The translation is temporarily closed for contributions due to maintenance, please come back later.

Source string Read only

(itstool) path: sect2/para
Context English State
However, <application>Bash</application> and other shells are available for installation using the FreeBSD <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/ports.html">Packages and Ports Collection</link>.
After installing another shell, use <citerefentry><refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum></citerefentry> to change a user's default shell. It is recommended that the <systemitem class="username">root</systemitem> user's default shell remain unchanged since shells which are not included in the base distribution are installed to <filename>/usr/local/bin</filename>. In the event of a problem, the file system where <filename>/usr/local/bin</filename> is located may not be mounted. In this case, <systemitem class="username">root</systemitem> would not have access to its default shell, preventing <systemitem class="username">root</systemitem> from logging in and fixing the problem.
Packages and Ports: Adding Software in FreeBSD
FreeBSD provides two methods for installing applications: binary packages and compiled ports. Each method has its own benefits:
Binary Packages
Faster installation as compared to compiling large applications.
Does not require an understanding of how to compile software.
No need to install a compiler.
Ability to customize installation options.
Custom patches can be applied.
If an application installation does not require any customization, installing the package is sufficient. Compile the port instead whenever an application requires customization of the default options. If needed, a custom package can be compiled from ports using <command>make</command> <_:buildtarget-1/>.
A complete list of all available ports and packages can be found <link xlink:href="">here</link>.
Packages are pre-compiled applications, the FreeBSD equivalents of <filename>.deb</filename> files on Debian/Ubuntu based systems and <filename>.rpm</filename> files on Red Hat/Fedora based systems. Packages are installed using <command>pkg</command>. For example, the following command installs <application>Apache 2.4</application>:
<prompt>#</prompt> <userinput>pkg install <replaceable>apache24</replaceable></userinput>
For more information on packages refer to section 5.4 of the FreeBSD Handbook: <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html">Using pkgng for Binary Package Management</link>.
The FreeBSD Ports Collection is a framework of <filename>Makefile</filename>s and patches specifically customized for installing applications from source on FreeBSD. When installing a port, the system will fetch the source code, apply any required patches, compile the code, and install the application and any required dependencies.
The Ports Collection, sometimes referred to as the ports tree, can be installed to <filename>/usr/ports</filename> using <citerefentry><refentrytitle>portsnap</refentrytitle><manvolnum>8</manvolnum></citerefentry> (if running FreeBSD 11.4 or 12.1) or Subversion (if running FreeBSD-CURRENT). Detailed instructions for installing the Ports Collection can be found in <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/ports-using.html">section 5.5</link> of the FreeBSD Handbook.
To compile a port, change to the port's directory and start the build process. The following example installs <application>Apache 2.4</application> from the Ports Collection:
<prompt>#</prompt> <userinput>cd /usr/ports/www/apache24</userinput>
<prompt>#</prompt> <userinput>make install clean</userinput>
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>.


User avatar None

New source string

FreeBSD Doc (Archived) / articles_linux-usersEnglish

New source string 10 months ago
Browse all component changes

Source information

Source string comment
(itstool) path: sect2/para
Source string location
String age
10 months ago
Source string age
10 months ago
Translation file
articles/linux-users.pot, string 33