How to improve make and make install's speed in centos?

727 Views Asked by At

Sometimes use make and make install mysql or python, the process of those are very slow.
how cloud i speed up the process of make or make install in centos?

1

There are 1 best solutions below

1
On

make -j$(nproc) will run compilation using multiple cores, if available.

The nproc reports number of CPU cores, and the -j flag to make will run compilation in parallel.

P.S. you better not compile anything by hand in CentOS and stick to RPM packaging, which will usually have spec files which make use of the above mentioned parallel compilation.

By hand-compiling stuff in an Community Enterprise OS, you're essentially turning it to something that it's not. (hand compiling will result in not enterprise, insecure, outdated software, sooner or later).