As a user of the old friend gentoo I always missed the lack of possibilities to compile softwares to have a better performance.Mainly in server-side softwares like Java, PHP, Apache, Mysql and Postgres.In my tests I always felt the diference between pre-compiled versions and the softwares compiled in loco.
In Debian/Ubuntu the discover of apt-build helped me to solve the problem qith the same class and almost the same efficiency that portage.
Lets go to the step-by-step:
To install apt-build:
sudo apt-get install apt-build auto-apt
Configure your machine:
Choose your architecture and the level of optimization. The medium is indicated.
The options will be saved at /etc/apt/apt-build.conf ; Lets just adjust the number of cores, in the file search for “make_options” and change as follow:
make_options = " -j4"
The number is equal to # of “cores” + 1. So a quadcore should be “-j5”.
To prevent your compiled packages to be overwriten by the official ones edit this file /etc/apt/preferences adding:
Pin: release o=apt-build
Don’t forget to add the source repositories (deb-src) to sources list and you’re done! Sample: sudo apt-build install xchat emesene Quick tutorial on apt-build apt-build install –reinstall
apt-build install instead of apt-get install
apt-build upgrade upgrade all installed softwares
apt-build world Recompile all system
apt-build remove programa Removes software
apt-build clean-build Remove compiled packages
apt-build clean-sources Remove downloaded sources.
Sample: sudo apt-build install xchat emesene
Quick tutorial on apt-build
apt-build install –reinstall