Why does Linux server software need to be compiled and installed

  • 2020-05-07 20:48:09
  • OfStack

Why does the server software need to be compiled and installed? There is a widespread rumor that compilation and installation perform better, but this is actually a rumor

The server CPU is virtually monopolized by Intel, so the machine code generated by the various models is one. Intel advertises its compiler, Intel C++ Compiler, to be 10%-20% more efficient than GCC. This is advertising

Performance isn't really a problem, as the strip command can drastically reduce the size of the size executable, but I've installed the software thousands of times and never seen it used in an installation script.

There are three real reasons why software needs to be compiled and installed:

1. The software needs to be configured with , such as nginx, during compilation, and it needs to specify which module, php and apache are included.
The same is true for the database, mysql is compiled and installed because you need to customize the storage engine (whether innodb is supported or not.. ), while sqlite is rarely compiled, are directly downloaded binary files to use.

2. Software needs to be installed , each team has its own installation directory convention, some like to be installed under /opt/, some like to be installed under /usr/local/, compilation and installation can easily specify these paths (configure --prefix=xxx).

3. The need for the latest version of , software warehouse version 1 is generally lower, this reason is actually not sufficient, production environment tends to be conservative, do not pursue the latest version, but for geek, this is probably the most important reason
Once you know why, it's easy to decide whether to compile or download:

nginx/apache/php/mysql compiler installed
python/ruby/java direct download


Related articles: