First, I don't feel comfortable directly installing packages via HTTP. I prefer to download the package with wget or something similar, verify any md5sums and make myself comfortable that I have an untampered package. If those pass then I install. Just something I do and something to consider in the future.
Second, I think it all depends on the current, and future, load of the app server. If you don't anticipate an overwhelming load to it, and the current webserver is standing firm, then I would install it on the app server. Not knowing exactly what the install's dependancies are, I think configuration would be easier this way especially if it requires apache. Installing sphinx on the DB server may also require apache there which would add to the load on that box.
Lastly, in regards to "best effect" I think you have to know what your expectations are for the application. If milliseconds matter to you, then you'll want to go with the fastest route to the data and build your architecture to support that. If they don't, then having the DB on a second server, which is probably within the same network anyway, and connecting via tcp/ip is going to be fine. But again it's all in what you expect.