LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2007, 04:34 PM   #1
gloomz
Member
 
Registered: Oct 2006
Posts: 137

Rep: Reputation: 15
How to install to home directory.


Instead of installing nmap and making directory's in normal sys folders, I thought that i'd like to install nmap in my home directory.

How would I do this? It's a wargame and the box is running freebsd. I just need to know how to install nmap to my home directory (e.x /home/boris) instead of the usual location.

Thanks

I've googled and couldn't find an answer.
 
Old 03-06-2007, 08:37 PM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
compile it with the appropriate "--prefix" option.
 
Old 03-07-2007, 12:24 PM   #3
iamnothere
Member
 
Registered: Feb 2007
Location: UK
Distribution: Slamd 64, Slackware
Posts: 46

Rep: Reputation: 16
You might want to look at stow, which makes it easier to uninstall later.

For example, if you want to keep stuff under ~/pkgs, you'd compile with --prefix=~/pkgs, then override this when you make install with 'make --prefix=~/pkgs/stow install'. Then 'cd ~/pkgs/stow' and 'stow <pkgname>'. This create links for the app in ~/pkgs/bin, ~/pkgs/lib, etc. (Obviously, you'd add those directories to $PATH and $LD_LIBRARY_PATH, respectively). The advantage of this is that you can uninstall the package later with 'cd ~/pkgs/stow; stow -D <pkgname>'.

Of course, you could write a wrapper script to automate all of this, e.g .

stow-install:

Quote:
#!/bin/sh
[[ -n "$1" ]] && ./configure --prefix=~/pkgs && make && make --prefix=~/pkgs/stow/"$1" && cd ~/pkgs/stow && stow "$1"
You might want to extend this to allow further configuration options etc.

stow-uninstall:

Quote:
#!/bin/sh
[[ -n "$1" ]] && cd ~/pkgs/stow/"$1" && stow -D "$1"

Last edited by iamnothere; 03-07-2007 at 12:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I copy old /home/ directory to fresh install? Adrian Baker Linux - General 2 01-09-2007 03:06 PM
How to install programs in my home directory? cumbersome Linux - Software 15 06-26-2006 04:11 AM
Does a new install of 10.0 destroy my /home directory? rwhitworth SUSE / openSUSE 3 10-24-2005 03:55 PM
How do you install a new hard drive and make it the new /home directory??? anilnatha Linux - Hardware 4 08-02-2005 04:39 PM
rpm install to home directory gbanks Linux - General 3 07-11-2003 11:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration