Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


installing from source
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

installing from source

sandboxsandbox Member
edited October 2012 in General

hi all,

i want to learn about installing software from source. other than ./configure, make, make install, what would be the next step?

  • how to make the software run when the os boot up, without the need to start it manually?
  • how to make the executable file to run as part of the default command, without the need to go into the installation directory and run it from there?

fyi, i am running debian. i know debian have enough repositories, i just want to learn compiling software from source.

thanks.

Comments

  • you can use the @reboot flag in corn to run it when you boot or write a script to let init.d control.

    if you want to link the binary from any directory it seems to be in one of the bin directory on path. so /bin is one. make a symbolic link to the binary in there

    Thanked by 1sandbox
  • thanks @exussum,

    so if the executable is at /usr/local/sbin, i need to make symlink to /usr/bin ?

  • i doubt it will be there if you have compiled it. its likely to be in /home/user/program

    if your put in /usr/local then only the user who's file its in will work. /usr/bin will work system wide

  • @sandbox the simplest way to start a daemon/service on boot is to include it in /etc/rc.local. To run programs interactively, you either specify the full path or put the parent directory in your PATH (google that for more)

  • @exussum said: you can use the @reboot flag in corn to run it when you boot

    No. The @reboot string denotes that a command should be run when the cron daemon starts. If you restart cron, the command runs again, which may cause unintended consequences.

  • @sandbox said: - how to make the executable file to run as part of the default command, without the need to go into the installation directory and run it from there?

    If the binary (executable file) is installed inside a directory that has been defined by PATH environment variable, then you can run that binary without going to the installation directory.

    You can see content of PATH environment variable by issuing following command.

    echo $PATH

    Use prefix option with configure script,

    ./configure --prefix=[installation_dir]

    then run make and make install. Binary will now be installed in correct dir.

    Symlink may break some packages where installation dir is hard-coded during compilation.

Sign In or Register to comment.