change app directory in Linux

Hi,

I just set up a new system where I have a dual boot of Win 7 along side Ubuntu 12.04.

My boot drive for both OS's is an SSD, and then I have mechanical shared storage (formated as NTFS).

In Ununtu, I need to install a few large applications including products from the Hadoop universe.  I don't want to put all these on the SSD, but rather on the mech drive.  

I managed to use Tweak to change the downloads directory, but can I somehow change the location where apps are installed to be on the mech drive so I save my SSD?
LVL 11
ugebAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Yes, you can mount the mechanical disk anywhere you want.
Usually /usr/local is a prefix used to install "use"r provided/required applications.
If you are using packages, either get packages that are /usr/local or during install use a relocate option that will change a package designed for /usr to /usr/local

The difficulty I see deals with the mechanical drive having an existing NTFS partition.

You might want to consider an option that you can shrink the existing NTFS partition and then creating a new partition that will then mounted as suggested above.
0
ugebAuthor Commented:
Currently my hdd's (2 of them) are mounted under /media.  I didn't set that mount point, Ununtu did it automatically.  The drives are labelled WD1 and WD2.

Where are installed apps located (analgous to "Program Files" in Windows)? In my Home Folder, the major directories I see are Home, Desktop, Documents, Downloads, Filesystem and pictures etc.  When I go into my shell, I see that those are all subdirectories of my user.

I have no problem making another ext4 partition for Linux apps, just as long as I can share documents between the two OS's.  Windows can't do anything with Linux apps anyway, so it won't matter if it can't read that partition.

I'm unclear how /usr/local fits into the equation.  There already exists /usr/local with these subdirectories:

bin  etc  games  include  lib  man  sbin  share  src

Are you saying that I switch the mount point of WD1 (currently under /media) to be under /usr/local?  I'm fuzzy on all the details here.  How do I switch the mount point?  How do I tell Linux to use the new location for installed apps?  Is there a detailed  guide somewhere that can take me through that?

Thanks!
0
arnoldCommented:
The place where you mount is up to you.  You can look at /opt.
You have the flexibility to mount the partition anywhere you want provided you take into account that where you mount the files does not interfere with the system's functionality.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ugebAuthor Commented:
You're talking about sysadmin stuff, which I don't do.  Right now I can't use any info you've provided as it's too vague.

Can you give me explicit steps or direct me to one or more sites that will take me through this?
0
arnoldCommented:
There is no specific way I can tell you to mount.
You can create a new location
mkdir /newlocation and mount the new partition here.

The difficulty is adding the /newlocation to the path,
0
ugebAuthor Commented:
I'm sorry, but this isn't helpful yet.  I don't know how to do what you're saying.
0
arnoldCommented:
What level of access do you have on the system?

In general terms applications are in /usr/bin that is OS vendor provided
/usr/local/bin usually use required/needed application
/opt/bin is an optional location where applications can be installed.

Your SSD already has /usr/bin so overlaying mounting the new Harddrive there is not a viable option.
The same applies to /usr/local/bin
The remaining standard place is /opt

If all those locations are in use by existing application/software an option is to copy the data or create a brand new location where you would mount the extra partition from the hard drive.
Install what you need in this new location, then in order for you to be able to type the command and it be found, there is a variable set in Linux PATH that is used to search for command/application.

Hopefully, this clears things up for you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ugebAuthor Commented:
I'm not going to have time to test this out right now, but thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.