LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-11-2011, 12:12 AM   #1
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Rep: Reputation: 31
Application Installation suggestions


Hello,

It's my first time having my own application in the system. Could anyone give me some comment on the way to place the directories in an installation. Thanks.

This is what a release tree look like for my application:
Code:
.
\--bin
\--ini
and have /etc/profile.d/myapp.sh so that the application home can be addressed by the interested user as $MYAPP_HOME:
Code:
#/bin/bash
MYAPP_HOME=/usr/myapp
export MYAPP_HOME
But then, to cater for newer releases in the future, or even fallback, I need to keep each release in a separate directory.
Code:
$MYAPP_HOME/release-0001/{bin,ini}
$MYAPP_HOME/release-0002/{bin,ini}

# and a symbolic link to point to the current release.
$MYAPP_HOME/cur -> release-0002
Well then, you might wonder why I didn't set MYAPP_HOME as /usr/myapp/cur instead. It's because the application needs some extra directory for holding data and stuff, as:
Code:
$MYAPP_HOME/data
$MYAPP_HOME/incoming
These directories has files being the same for each release-XXXX. I don't want to move them around or create links inside the release directory.

So, it all comes to the following:
Code:
$MYAPP_HOME/release-0001
$MYAPP_HOME/release-0002

$MYAPP_HOME/cur -> release-0002

$MYAPP_HOME/bin -> cur/bin
$MYAPP_HOME/ini -> cur/ini

# other supporting directories for the installation
$MYAPP_HOME/data -> /var/myapp/data
$MYAPP_HOME/incoming -> /var/myapp/incoming
How is that?

J.
 
Old 09-11-2011, 12:26 AM   #2
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
/etc for configuration files
/opt for 3rd party installation files
/bin for symbolic links (or direct files) to actually run the program
/var for log files
/ini I have never seen in Linux
/cur " " " " " "
 
Old 09-11-2011, 12:37 AM   #3
Jerry Mcguire
Member
 
Registered: Jul 2009
Location: Hong Kong SAR
Distribution: RedHat, Fedora
Posts: 201

Original Poster
Rep: Reputation: 31
Sounds good. But I'll need my application contained rather than spreaded to the various location for easy maintenance. tomcat installation is what my design references at.
 
Old 09-11-2011, 12:41 AM   #4
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
Right. Most of it could be in a directory in the /opt directory. Then just have a symbolic link created wherever it needs to be executes - /usr/bin usually.

My suggestions have just been standard *nix directory structure.

Also, documentation goes in /usr/share/docs and man pages go in /usr/share/man
 
Old 09-11-2011, 08:56 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As above; here is the 'Official' answer https://secure.wikimedia.org/wikiped...archy_Standard
 
  


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
back up application / code suggestions sir-lancealot Linux - Server 3 01-07-2011 03:52 PM
Need advice / suggestions for an application using older pc Topher_AL Linux - Newbie 9 06-04-2009 09:43 AM
OCR Application for Linux-Suggestions? BobNutfield Linux - Software 5 05-10-2008 03:17 PM
Suggestions for a shared journal application ? rastavideo Linux - Software 2 03-29-2007 05:34 PM
Need application suggestions mylo2003 Linux - Newbie 6 08-06-2003 02:56 PM

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

All times are GMT -5. The time now is 01:32 AM.

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