Installing from Source - Paiet/Tech-Journal-for-Everything GitHub Wiki

  • Why?
    • Not all software is distributed as a pre-compiled binary
    • May change too frequently
    • May not have the resources to maintain packages
  • Pros
    • Compiling allows you to build the software to your needs
    • Will typically perform better and consume less space
  • Cons
    • Requires manual updates
    • Prone to error / Debugging
    • Mistakes are possible
    • Requires dev tools to be installed
      • GCC
      • Make
      • Kernel Source
  • Example
  • Pre-requisites
    • sudo yum install gcc make gzip
    • wget http://www.openwall.com/john/j/john-1.8.0.tar.gz
  • Build process
    1. Unpack the source code
      • tar -xvzf ./john-1.8.0.tar.gz
    2. Move to the source folder
      • cd ./john-1.8.0/src
    3. (Optional) Set configuration options
      • make config
    4. List the supported build architectures
      • make
    5. Execute the desired build
      • make clean linux-x86-64
      • clean indicates to use a fresh config
      • oldconfig would re-use existing config files
    6. (Optional) Move binaries to system directories
      • sudo make install
    7. Test the application
      • cd ../run
      • ./john --test