Re: program convenient install path and name in Linux

From: Roger Leigh (${roger}_at_whinlatter.uklinux.net.invalid)
Date: 04/23/04


Date: Fri, 23 Apr 2004 13:15:18 -0000

On 2004-04-23, Victor Liu <victor_nospam@cyberpowersystemsnospam.com.tw> wrote:
> Hi,
>
> I want porting a program which type is NT service to Linux from
> windows, but I do not know the relative convenient path:

The paths I mention below are configured by running a "configure"
script. All decent source packages use a configure script, usually
created with Autoconf. You should investigate autoconf and automake.

> 1. where program location is suitable to install, is '/usr/sbin' or
> '/usr/sbin/local' ? what difference between both ?

${sbindir}

The difference is that they are different. You don't hardcode the
paths, you let the user decide.

> 2. the program will write down the process id (pid) into a file where
> is the sutiable location?

${localstatedir}/run/${program}.pid

> 3. where to store config file ?

${sysconfdir}/${PACKAGE}/program.conf

> 4. where to place client program ?

What is a "client program"?

Run by users: ${bindir}
Run by admin: ${sbindir}
Run *only* by daemon/other programs: ${libexecdir}/${PACKAGE}

> 5. where to store the uninstall shell script ?

You don't. You package it up as a .rpm and/or .deb. "make uninstall"
from the source tree should uninstall, too.

> how to prevent the file name conflict program ? the install path seems
> not to change by user in Linux.

Could you rephrase those questions, please.

Conflicts are handled by the package manager, if you've packaged up your
program.

Programs are usually installed in standard locations, which are readable
by all users, but modifiable only by root. Users can install into a
different path ("prefix") by choosing a different prefix when they run
configure ("./configure --prefix=/usr", "./configure
--prefix=/home/roger").

Make sure you don't confuse two issues:
- the build (configuration and compilation)
- the packaging (install/uninstall/handling conffliles and conflicts)

-- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 100,000 Newsgroups - 19 Different Servers! =-----


Relevant Pages

  • Re: Best Linux version to port from OpenServer 5.0.5/6
    ... > We are embarking on a project to port from OpenServer 5.0.5/6, to Linux. ... something that doesn install aload of crap you don't need... ... The package management allows easy installs of packages, ... Debian will never die!,See the social ...
    (comp.unix.sco.misc)
  • Suggestion for Common Third Party Install system
    ... I have been working over strategies for Linux on the desktop. ... Third party applications are tricky. ... they currently have two options - to include packages for all the ... Perhaps on the install CD, or in the /etc/ directory, or with the ...
    (Debian-User)
  • Re: Simple HowTo
    ... Install location by years of convention from the roots of UNIX ... Linux distribution has ... the software packages all ready compiled and standardized as for file ... don't think apache and tomcat would be. ...
    (Fedora)
  • Re: No space left on device
    ... > I'm a VERY new linux user trying to administer an existing linux box to ... The distribution comes with many packages which duplicate each ... and only support hard drives up to 8Gig (try ... you want, and install it). ...
    (alt.os.linux)
  • Re: No space left on device
    ... > I'm a VERY new linux user trying to administer an existing linux box to ... The distribution comes with many packages which duplicate each ... and only support hard drives up to 8Gig (try ... you want, and install it). ...
    (alt.os.linux.redhat)