Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just obtained an account on shared hosting for my webapp. To make my development environment more pleasant, I'm installing a bunch of stuff (e.g. git, vim) in my /home directory. I guess I could get them installed by my sysadmin, but doing it this way seems to give me more control over things; I don't have to trouble them for updates.

  1. Am I doing this the right way? Should I get my sysadmin to install these things instead? They're running CentOS, which doesn't have a lot of modern packages.

  2. Supposing that this is an acceptable practice, what's the best way for me to manage the things I've installed locally? E.g. so I can do something like apt-get update to upgrade everything at once? Do I have a better option than building everything from source, and doing git pull and hg pull for every program I want to update?

share|improve this question
    
Why do you need all those tools on your host? Can't you just build your app locally, and then upload what is needed? –  Zoredache Oct 26 '10 at 23:45
    
I'd go further than Zoredache and say that installing development tools on a production server undermines security and should be avoided at all cost. BTW using standard packages, the binaries will be installed in systemwide locations, and per-user programs should be in ~/bin. If you really must do this, you'd need to dismantle the packages and copy the files manually. –  symcbean Oct 27 '10 at 12:11

1 Answer 1

When using CentOS and other RPM-based distros, one possibility is to use RPMs. Test to see if the RPM is "Relocatable" by running rpm -qip PACKAGENAME.rpm. Relocatable RPMs allow you to change the default prefix using the --prefix=DIR option of the rpm command. Note that the rpm command maintains a database of installed rpms in /var/ so you may need to also use the --root=$HOME option to tell rpm not to use the system rpm database, but rather to create one in your home directory. Also, there may be complaints about unsatisfied dependancies, in which case (after manually ensuring that the dependacies are installed) you can use --nodeps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.