Find the answer to your Linux question:
Results 1 to 8 of 8
Hi im new to linux and to forums really... i want to know... for convention ...where do i put all the programas that i install from tar.gz or any other.... ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5

    File structure


    Hi im new to linux and to forums really... i want to know... for convention ...where do i put all the programas that i install from tar.gz or any other.... i had put them in usr/.. is that right?? what is the opt/ directory for??...

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Anything that you're gonna compile, just put in a spare directory. For example, I keep my source in ~/source/. When you run "make install", it will move the binaries to where they need to be.

    For a full-blown explanation of the Unix filesystem:

    http://www.pathname.com/fhs/pub/fhs-2.3.html

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5
    thanks man.... what about those programs that not install... for example i "installed " Eclipse 3.1 ... and by installing it i mean just uncompressing the file into a folder and then i have the program.... where should i put that folder???..anywhere it works... but where a linux pro would put it.. sorry for the english.... jeje.. i'm from Venezuela there could be some mistakes...

  4. $spacer_open
    $spacer_close
  5. #4
    Banned
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    1,120
    Quote Originally Posted by carlo81
    thanks man.... what about those programs that not install... for example i "installed " Eclipse 3.1 ... and by installing it i mean just uncompressing the file into a folder and then i have the program.... where should i put that folder???..anywhere it works... but where a linux pro would put it.. sorry for the english.... jeje.. i'm from Venezuela there could be some mistakes...
    As long as it seems organized to you, it's all good(in UNIX-like systems, this doesn't matter).
    I personally place a lot under /opt or /usr...

  6. #5
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Cuando quieres instalar un programa nuevo de fuente, haces estos:

    Code:
    ./configure
    make
    make install
    El ultimo toma el codigo y lo pone en un direccion que es defecto o, si lo dijiste un otro direccion con

    Code:
    ./configure --prefix=<< NUEVO DIRECCION >>
    , va alli.

    Por ejemplo, con Eclipse. Vamos a fingir que el direccion defecto es /usr/bin:

    Si hago esto:

    Code:
    ./configure
    make
    make install
    El binario va a /usr/bin. Esto es en mi $PATH, pues puedo usarlo cuando digo "eclipse".

    Pero, si quiero para Eclipse instalar en /usr/local/bin, puedo hacer esto tambien:

    Code:
    ./configure --prefix=/usr/local/bin
    make
    make install
    Mucho del tiempo, los direcciones defectos son buenos. Y el fuente, puedes poner donde quieres. Como dije, yo lo pongo en ~/source. No es tan importante si tu lo comprendes.


    (Mi espanol no es perfecto, y algunas palabras vinieron de servicios de traducion. Lo siento si son palabras malas. Y mi teclado no tiene acentos )

  7. #6
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5
    Gracias pana.. jaj esta fino ese espaol... gracias por la ayuda...

  8. #7
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    Please post in English in the future.

  9. #8
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    When you install a program, you follow these steps:

    Code:
    ./configure
    make
    make install
    The last command (make install) takes the binary and puts it in a default location, or, if you specified a different one with

    Code:
    ./configure --prefix << NEW LOCATION >>
    , it will go there.

    For example, with Eclipse. Let's pretend that the default location is /usr/bin:

    If you do this:

    Code:
    ./configure
    make
    make install
    The binary will go to /usr/bin. This is in the $PATH variable, so it will run just by entering the command (the $PATH variable is a good place to install stuff).

    But, if I wanted to install Eclipse in /usr/local/bin, I can do this instead:

    Code:
    ./configure --prefix=/usr/local/bin
    make
    make install
    Much of the time, the default locations are good and acceptable. As for where you put the code, put it wherever you want. It doesn't really matter, as long as you understand it.



    Sorry .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •