The difference between the RPM package and the source package installation

Source: Internet
Author: User

It is recommended that you install the production server package on the installation line with the source code, because the source installation can adjust the compilation parameters to maximize the customization of the installation results. This is illustrated by the compilation of the MySQL 5 online environment, and its compilation parameters are as follows:
./configure-prefix=/usr/local/mysql-without-debug
-without-bench-enable-thread-safe-client-enable-assembler
-enable-profiling-with-mysqld-ldflags=-all-static-
With-client-ldflags=-all-static-with-charset=latin1-
With-extra-charset=utf8,gbk-with-innodb-with-csv-storage
-engine-with-federated-storage-engine-with-mysqld-user=mysql
-without-embedded-server-with-server-suffix=-community
-with-unix-socket-path=/usr/local/mysql/sock/mysql.sock &&
Make && make install

In the installation of MySQL, the source code installation and RPM installation compared to the following features:
We can use the appropriate compiler for our own hardware platform to optimize the compiled binary code.
According to the different software platform environment to adjust the relevant compilation parameters (source installation is not only applicable to Rhel/centos, other systems like FreeBSD, Solaris, Ubuntu, etc. apply).
You can choose what components you need or what components you don't need for a particular application scenario.
Multiple MySQL can be installed on the same host (RPM installation can only install one MySQL).
Select only the required character set to install, depending on the data content you want to store.
Theoretically, the source of static compiler installation efficiency will be a little higher, but in the end than the high number of RPM to see the specific situation, generally around 5%.
One time online environment work, I use Yum uninstall a software package encountered extremely dangerous situation, here also share with you: At that time, yum remove automatically uninstall many of the package itself depends on the system package, causing the system crashes, SSH can not log in, And the SCP and rsync also cannot use, thanks to FTP command can also use, so the data was quickly ftp to other servers, but the system has completely collapsed, only to reload. If there is no such danger in the source-code installation package, you need to remove the directory of the package installation only when uninstalling.
To sum up, the advantages of the source code installation are as follows:
The biggest advantage is that you can adjust the compilation parameters to maximize the customization of the installation results.
Source installation can choose the latest software package, and Linux system (including FreeBSD) with the package is generally the most stable version, but not guaranteed to be the latest.
In contrast, the source code installation performance is the most outstanding.
Source pack Installation software Uninstall is extremely convenient and simple, more importantly, it is relatively safe, especially for the production environment on the line.
Migration is also convenient, if not involved in system library files, copied to another machine can also be used.
Here is also a brief introduction to install the software in the Linux/unix of the source trilogy, in the back we will often see their figure.
./configure
Make
Make install
./configure is used to check environment variables and configure compilation options, and make is used to compile source code into binary files, and make install installs the files that are compiled to the specified location (or default location).
In this section, we optimize the performance of the stand-alone server from the aspects of hardware selection, installation and kernel of the server, but for the website and system, single machine optimization has a limited effect on the overall performance improvement, and the overall performance improvement depends on the high availability and high scalability of the server. This section is explained in a later section.

Reprint from Http://blog.sina.com.cn/s/blog_461c24d50101gj41.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.