From 722cb2bdd1c9433b7f87c0bb0f6d9699efef1fae Mon Sep 17 00:00:00 2001 From: Dru Lavigne Date: Tue, 4 Feb 2014 16:18:13 +0000 Subject: [PATCH] First pass through first half of this article. More commits to follow. Sponsored by: iXsystems --- .../articles/linux-users/article.xml | 209 +++++++----------- 1 file changed, 79 insertions(+), 130 deletions(-) diff --git a/en_US.ISO8859-1/articles/linux-users/article.xml b/en_US.ISO8859-1/articles/linux-users/article.xml index 2f45eada65..211068a5fa 100644 --- a/en_US.ISO8859-1/articles/linux-users/article.xml +++ b/en_US.ISO8859-1/articles/linux-users/article.xml @@ -29,59 +29,82 @@ This document is intended to quickly familiarize intermediate to - advanced &linux; users with the basics of FreeBSD. + advanced &linux; users with the basics of &os;. Introduction - This document will highlight the differences between &os; and + This document highlights the technical differences between &os; and &linux; so that intermediate to advanced &linux; users can quickly - familiarize themselves with the basics of &os;. This is just a - technical quickstart, it does not attempt to design - philosophical differences between the two - operating systems. + familiarize themselves with the basics of &os;. - 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 - - Installing FreeBSD chapter of the &os; Handbook. + This document assumes that &os; is already installed. + Refer to the + + Installing &os; chapter of the &os; Handbook for help with the installation + process. Shells: No Bash? - Those coming from &linux; are often surprised to find that + &linux; users are often surprised to find that Bash is not the default shell in &os;. In fact, Bash is not even in the default installation. Instead, &os; uses &man.tcsh.1; as the default shell. - Although, Bash and your other favorite - shells are available in &os;'s Packages and Ports Collection. + However, Bash and other + shells are available in &os;'s Packages and Ports Collection. - 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 - root's default shell remain unchanged. The - reason for this is that shells not included in the base distribution - are normally installed in /usr/local/bin or - /usr/bin. In the event of a problem the file - systems where /usr/local/bin and - /usr/bin are located may not be mounted. In this - case root would not have access to its default - shell, preventing root from logging in. For this - reason a second root account, the - toor account, was created for use with non-default - shells. See the security FAQ for information regarding the toor account. + After installing another shell, use &man.chsh.1; to change + a user's default shell. It is recommended that the + root user's default shell remain unchanged since + shells which are not included in the base distribution + are installed to /usr/local/bin. + In the event of a problem, the file + system where /usr/local/bin is + located may not be mounted. In this + case, root would not have access to its default + shell, preventing root from logging in. - Packages and Ports: Adding software in &os; + Packages and Ports: Adding Software in &os; - 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 here. + &os; 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. + + + + Ports + + 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 make + package. + + A complete list of of all available ports and packages + can be found here. Packages @@ -89,124 +112,50 @@ Packages are pre-compiled applications, the &os; equivalents of .deb files on Debian/Ubuntu based systems and .rpm files on Red Hat/Fedora based - systems. Packages are installed using &man.pkg.add.1;. For example, + systems. Packages are installed using pkg. For example, the following command installs - Apache 2.2: + Apache 2.4: - &prompt.root; pkg_add /tmp/apache-2.2.6_2.tbz + &prompt.root; pkg install apache24 - Using the switch will tell &man.pkg.add.1; - to automatically fetch a package and install it, as well as any - dependencies: - - &prompt.root; pkg_add -r apache22 -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. -[snip] - -To run apache www server from startup, add apache22_enable="YES" -in your /etc/rc.conf. Extra options can be found in startup script. - - - If you are running a release version of &os; (6.2, 6.3, 7.0, - etc., generally installed from CD-ROM) pkg_add -r - will download packages built for that specific release. These - packages may not be the most up-to-date - version of the application. You can use the - PACKAGESITE variable to override this default - behavior. For example, set PACKAGESITE to - ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/ - to download the most recent packages built for the - 6.X series. - - - For more information on packages please refer to section 5.4 of + For more information on packages refer to section 5.4 of the &os; Handbook: Using pkgng for Binary Package Management. Ports - &os;'s second method for installing applications is the - Ports Collection. The Ports Collection is a framework of + The &os; Ports Collection is a framework of Makefiles and patches specifically customized - for installing various software applications from source on &os;. - When installing a port the system will fetch the source code, apply + for installing applications from source on &os;. + When installing a port, the system will fetch the source code, apply any required patches, compile the code, and install the application - (and do the same for any dependencies). + and any required dependencies. - The Ports Collection, sometimes referred to as the ports tree, - can be found in /usr/ports. That is assuming - the Ports Collection was installed during the &os; installation - process. If the Ports Collection has not been installed it can be - 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 section 4.5.1 - of the handbook. + The Ports Collection, sometimes referred to as the ports tree, + can be installed to /usr/ports using &man.portsnap.8;. + Detailed instructions for installing the Ports Collection can be + found in section 5.5 + of the &os; Handbook. - Installing a port is as simple (generally) as changing in to the + To compile a port, change to the port's directory and starting the build process. The following example - installs Apache 2.2 from the - Ports Collection: + installs Apache 2.4 from the + Ports Collection: - &prompt.root; cd /usr/ports/www/apache22 + &prompt.root; cd /usr/ports/www/apache24 &prompt.root; make install clean - A major benefit of using ports to install software is the - ability to customize the installation options. For example, when - installing Apache 2.2 from ports you can - enable mod_ldap by setting the - WITH_LDAP &man.make.1; variable: + A benefit of using ports to install software is the + ability to customize the installation options. This example + enables mod_ldap by setting + WITH_LDAP: - &prompt.root; cd /usr/ports/www/apache22 + &prompt.root; cd /usr/ports/www/apache24 &prompt.root; make WITH_LDAP="YES" install clean - Please see section 4.5 of the &os; Handbook, Using - the Ports Collection, for more information about the - Ports Collection. - - - - Ports or packages, which one should I use? - - Packages are just pre-compiled ports, so it is really a matter - of installing from source (ports) versus installing from binary - packages. Each method has its own benefits: - - - Packages (binary) - - Faster installation (compiling large applications - can take quite a while). - - You do not need to understand how to compile - software. - - No need to install compilers on your - system. - - - - Ports (source) - - Ability to customize installation options. - (Packages are normally built with standard options. With ports - you can customize various options, such as building additional - modules or changing the default path.) - - You can apply your own patches if you are so - inclined. - - - If you do not have any special requirements, packages will - probably suit your situation just fine. If you may ever need to - 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 make - package and then copy the package to - other servers.) + Refer to Using + the Ports Collection for more information.