0

A previous user asked a question on where to install applications, and the answer spells out how the directories are used, however, as the answer says, when you use make install for a system daemon like sshd or ntpd it typically puts the results in /usr/local/sbin. The problem is that the original service is still present and running out of /usr/sbin. If you are building a new server daemon from source, how do you make it the active version? Do you overwrite/uninstall the original version? or do you leave the original as it is, and somehow point the system to your new version in /usr/local?

Tyler Durden
  • 477
  • 1
  • 6
  • 16

1 Answers1

1

So, when you compile a new SSH version for instance manually, you need to go into your sshd_config file and set the path for it, removing the old path, in your case sbin.

A default CentOS path is this in /etc/ssh/sshd_config:

This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

So in your case, remove:

/usr/local/sbin

Then put in the config file your new path with a : to add to the path, or you can just force it to use 1 path. (You would have to put PATH=\xx\xx\xx and uncomment it to work also as the daemon reads this config file)

====

Alternatively, you can overwrite the original with the newer one, will have no issues with it, another point to make clear is that when you overwrite something, make a backup, obviously.

Proxy
  • 574
  • 1
  • 4
  • 14