LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-09-2012, 07:46 PM   #1
InNomineLibertas
LQ Newbie
 
Registered: Nov 2010
Location: planet earth, sol quadrant
Posts: 11

Rep: Reputation: 1
Force install in /usr/local, or, alternatively, how to use a usb-stick as extra space


The painful part is that my laptop has a bad HD (feebly humming "Nearer, my God, to thee...";-), and I am now typing this while using a DVD from Linux Magazine (the British one).

There are a few accoutrements to my problem, but suffice it to say, as follows:

1. I'm using a liveDVD of Centos ver. 6.2.

2. I need to install a few programs on a memory stick (capacity 8 GB).

3. I have copied the contents of /usr/local to the stick, and mounted this on top of /usr/local, with an idea to force an install to this particular part of the file system - but how do I do that ? (using rpm and/or yum)...

OR

4. How do I otherwise persuade my Centos to use the stick as a persistent area for installing further software ?

One clarifying point: No, I am not looking to install Centos permanently on anything yet - I need to do some rescue and similar things first. But no, the worst-case scenario does not involve a bankruptcy, so noone should panic at reading this (except, of course, that I recommend backups - early, often, and stored offsite...)

TIA!
 
Old 03-09-2012, 09:29 PM   #2
PhoenixAndThor
Member
 
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 38
CentOS isn't exactly designed to use a persistent area. Are you hoping to use a live OS and flash drive combo until your get a new hard drive?
 
Old 03-09-2012, 09:37 PM   #3
InNomineLibertas
LQ Newbie
 
Registered: Nov 2010
Location: planet earth, sol quadrant
Posts: 11

Original Poster
Rep: Reputation: 1
PhoenixAndThor: Yes.

(Or, at least until everything is squared away, and I can get the info to decide whether to get a HD or a new laptop.)
 
Old 03-09-2012, 10:08 PM   #4
PhoenixAndThor
Member
 
Registered: Sep 2009
Location: Geogia, USA
Distribution: Ubuntu, Debian, Live CDs
Posts: 213

Rep: Reputation: 38
Well then, you're heading towards questionable territory. I have walked that path before, and there are Linux distributions that claim to be able to use another device (like a flash drive) to store your personal files and additional software. However, I've only found the storage of personal files to be reliable. Installing additional software, or package management in general, is usually poorly implemented and not suitable for everyday use. The main problems you're going to run into are dependency resolution, removing packages without breaking the OS, and finding software. Most software repositories for such distributions are small and not updated as frequently as other distributions. If you have a few extra flash drives and want to experience the headache for yourself, you could look at TinyCore, Puppy Linux, and Knoppix(click the USA/UK flag for English).

The best thing to do would be to simply trash all the data on the flash drive and run a full normal install on it(just my opinion though, always back up your data). There are certain tricks you can use to reduce the wear and tear on your flash if you want to go that route.
 
Old 03-10-2012, 05:22 PM   #5
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Rep: Reputation: 20
Read this post thoroughly before trying. Contains extreme instruction.

It seems that CentOS cannot install the program outside of a fixed directory automatically.
If you are desperate enough, you can try doing it manually. Therefore, you might want to try compiling it from source.
If you are lucky, you can find an instruction from Beyond Linux From Scratch to see recommended config options, and its dependencies.

Let us begin:
Prepare you target external partition:
  • Check that your target external partition has a linux partition (ext2, ext4, XFS, etc)
  • Mount your external to a directory
  • Note that this directory MUST be fix, and not be changed for whatever reason (or else the program won't work)
  • It is recommended that you mount your external on /opt/... directory

Now that the external is ready, get to the tarball:
  • Download the source tarball from internet (if you don't know where, google it)
  • Extract the tarball; and using terminal, put yourself in the extracted tarball directory (simply "cd")
  • Run ./configure on the directory. Run ./configure --help to see the options available
  • Do ./configure --prefix=<your target> and some options that you want
  • Run make
  • As root, run make install
  • Add the target directory to PATH variable, run export PATH=$PATH:<your directory>/bin

And, done!
 
  


Reply

Tags
centos, installation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install to /usr or /usr/local ? nLEyETn Slackware 15 11-03-2007 02:11 PM
how to set up usb stick and how much space to distribute. playa4002 Debian 3 07-28-2006 11:28 AM
USB stick - memory problem (mysterious out of space) linuxfond Linux - Newbie 3 07-17-2005 02:47 PM
USB Stick and Wasted Space rioch Linux - Hardware 2 03-05-2005 11:58 AM
Install XP in extra space jdmml Linux - Newbie 4 08-31-2004 01:42 PM


All times are GMT -5. The time now is 09:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration