Web Hosting Reviews
Server operating systems :: Start Linux hosting utilites under FreeBSD.

Other Articles:
 FreeBSD operating system.

24/7 Solutions - Start Linux hosting utilites under FreeBSD


FreeBSD as desktop system is at a loss insufficient quantity of a hosting utilites and general purpose software (in comparison with other operational systems). At often it forget, that the base of the user programs of these systems is practically identical. Appendices, it is possible to find all if not in a collection of packages FreeBSD in system of its ports - it is exact (recently has passed the message, that the number recompilled under FreeBSD programs cunningly up to 9 thousand - not each distribution kit Linux can brag of such number recompilled specially for it packages). If a certain necessary program casually has not got in this huge list - it can be compiled independently for work in FreeBSD.

To do such procedure it is possible only in the event that initial texts of the necessary program are accessible. And here the back of a medal of popularity Linux drawn it attention manufacturers of a software acts. Manufacturers distribute the programs, is frequently free-of-charge (at small restrictions), but only in recompilled specially under Linux a kind.

However for any problem always there will be a decision. And in this case such decision appears a mode of binary compatibility with Linux, realized in FreeBSD which allows to start a minimum of 90 % of all Linux-appendices. It is based on substitution of system calls of kernel Linux by corresponding calls of kernel FreeBSD. And, unlike the majority of emulators, practically does not lead to decline of productivity. The opinion expresses even, that Linux-programs in a mode of compatibility in FreeBSD are carried out more quickly, than in the native environment.

Access to a mode of compatibility demands two actions - installation of package Linux-base and modification in a configuration file/etc/rc.conf. The most simple way to it is the program sysinstall. Having started this, it is necessary to go to menu Configure, to pass in item Packages and in the list accessible (on CD, ftp-or a http-server) packages to choose in section emulators what refers to Linux_base (in version 5.1 it will be linux_base-7.1_X).

After installation of a package it will be necessary to find item Startup in same menu Configure and to note option Linux (deciphered as This host wants to be able to run Linux binaries). Everything, now after reload PC the mode of Linux-compatibility will be accessible.

It is possible to act even easier - at once to go to item Configure-> Startup and to note option Linux. After an output from it it will be automatically offered to establish a package linux_base. It is necessary to accept the given offer.

Other way - to establish linux_base by means of system of ports for what it is necessary to pass in the catalogue/usr/ports/emulators/linux_base and to give a command:

$ make install clean

And then in any text editor to add in a file/etc/rc.conf a line:

linux_enable = "YES"
And to reload PC.

The result in any case will be identical - occurrence in the catalogue/usr/compat subdirectory Linux (and the symbolical reference to it in the root catalogue -/compat/linux. It represents a usual tree of file system Linux, with subdirectories bin, etc, libs and so on which can be made root by means of so usual command chroot. However, in a mode of Linux-compatibility исполнимые files are automatically searched in corresponding branches of the catalogue/usr/compat/linux, and necessity for change of a root in most cases does not arise.

Establishing linux_base by default, we receive some kind of the shadow Linux-system corresponding (in current branch FreeBSD) approximately RedHat 7. X. An additional bonus to what - reception of an opportunity of work with rpm-packages in general (though itself rpm it is possible to establish and is independent). However from ports it is possible to establish if necessary compatibility with older RedHat (versions 6. X) or even Debian (ports for them are in catalogues/usr/ports/emulators/linux_base-6 and/usr/ports/emulators/linux_base-debian,/accordingly.

Got access to a mode of Linux-compatibility, business it is necessary for small - to establish Linux-programs. It is done various, sometimes not absolutely trivial, in the ways, some of which are described in FreeBSD Handbook. However for some Linux-programs installation in FreeBSD is very simple.

As we already spoke, establishing linux_base by default, we have simultaneously an opportunity direct installation recompilled for Linux rpm-packages. It is done in the same way, as in RedHat, ASP-or Altlinux - by a command rpm-i (hv if necessary). However it will demand some additional options - the instruction of a new root (obviously, that it should be/usr/compat/linux), a way to a database of rpm-packages and ignoring of OS:

$ rpm-i - ignoreos - root/usr/compat/linux
- dbpath/var/lib/rpm package_name.rpm

The packages established thus should be started with the instruction of a full way:
/usr/compat/linux/usr/bin