Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do You manage different program versions? Post 302933618 by bakunin on Saturday 31st of January 2015 04:51:12 PM
Old 01-31-2015
I am not a specialist for FreeBSD, so my advice will be generic. It may well be that FreeBSD has some special provisions for some of the things mentioned, but what i am going to suggest should work on every UNIX- and UNIX-like system.

One possibility is to create different directories for different versions,then create a link for the default version: instead of installing a software to, say, /opt/software you install version 1 to /opt/software-v1, version 2 to /opt/software-v2, then create a link /opt/software -> /opt/sofware-v2, which will make version 2 accessible through /opt/software (which is probably the default path for it) as well. Instead of reinstalling over and over again you just recreate the link if the necessity arises.

You might even create the link prior to installation of the software so that you can use normal installation routines (which most times uses a fixed path) and still have different directories for the different versions.

Another option is to control different software versions through the envrionment: binaries are searched for in the order in which the directories appear in the PATH.

For example: you have a binary "mybinary" installed in /opt/software-v1/bin and in another version in /opt/software-v2/bin. If your path looks like:

Code:
PATH="$PATH:/opt/software/v1/bin

Then every time you enter "mybinary" without an explicit path version 1 would get executed, Would it be:

Code:
PATH="$PATH:/opt/software/v2/bin

instead, version 2 would be executed by default.

It is, btw., the same with other environment variables which accept a list of directories, like the ksh-specific "FPATH" for instance.

Finally, this is a variation on this method, you can create different users, one with an environment pointing to one version, the other pointing to the other.

I hope this helps.

bakunin

Last edited by Don Cragun; 01-31-2015 at 07:07 PM.. Reason: Fix a couple of ICODE tags.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

manage the wtmp file

Here's a usefull perl script to trim the wtmp file, in case it got too big, which happens sometimes, or got curropted (which also happens often). You could learn from here how to parse the wtmp file... but of course for just reading its content always simply use "last" like Neo said.... ... (0 Replies)
Discussion started by: me2unix
0 Replies

2. Shell Programming and Scripting

How to manage multiple versions of a set of shell and SQL script utilities

Hi all --- I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)
Discussion started by: DennisB
2 Replies

3. Programming

Executing an .ec program in different informix versions

Hi all, I tried writing an .ec program connecting to informix database from solaris platform Sun 5.7 informix version that i had to used when i compiled the program was 9.21.UC3 the binary when i ported solaris box with informix version 9.40.UC5 i am unable to run that i am encountering... (0 Replies)
Discussion started by: matrixmadhan
0 Replies

4. UNIX for Dummies Questions & Answers

Manage Mail

I have recently taken over a UNIX system from another programmer and am just beginning to learn UNIX. When I enter the MAIL command, the data scrolls off the screen for five minutes. Some of it is several years old. Can I tell the MAIL command to give me the last few items or the last few... (1 Reply)
Discussion started by: SUSANR9999
1 Replies

5. Shell Programming and Scripting

manage function's output

Hi all, how i can get an calculated value from a function for exemple my function is like function getMyPseudo { .. .. echo "Rambler" } i need to put the printed string into a variable sommeting like : MYPSEUDO=getMyPseudo print $MYPSEUDO in that case, the out put i... (3 Replies)
Discussion started by: rambler
3 Replies

6. Shell Programming and Scripting

How to manage several versions of Perl modules during the install?

Hello, I would really appreciate any advice on this issue: My Perl Module Environment: /usr/lpp/perl/lib/5.8.7 => has the Perl modules that come with the base Perl installation. Comes first in @INC concatination. /usr/lpp/perl/lib/site_perl/5.8.7 => has all my installed Perl modules... (1 Reply)
Discussion started by: genya01
1 Replies

7. UNIX for Dummies Questions & Answers

Thrown in position, need to manage AIX 5.3

Hey Everyone, First post and I'm coming here for help. Basically, the company I work for has been put in a weird situation with staff turnover. I used to manage an application on our IBM p5 running AIX 5.3, but I am now managing the whole server itself. I have no experience, no box to test... (1 Reply)
Discussion started by: pvpkife
1 Replies

8. UNIX for Beginners Questions & Answers

How to manage parameter in alias?

I make alias in bashrc file and typed it on prompt, alias tes='echo "$1"xx"$2"xxx"$3"xxxx' $ tes a b c xxxxxxxxx a b c what's happened to the shell here ?, and also, alias tes='echo "$3"xx"$2"xxx"$1"xxxx $ tes a b c xxxxxxxxx a b c anyone sincerely is to help me.. (2 Replies)
Discussion started by: abdulbadii
2 Replies
mkepmlist(1)						      Easy Software Products						      mkepmlist(1)

NAME
mkepmlist - make an epm list file from a directory. SYNOPSIS
mkepmlist [ -g group ] [ -u user ] [ --prefix directory ] directory [ ... directory ] DESCRIPTION
mkepmlist recursively generates file list entries for files, links, and directories. The file list is send to the standard output. The -g option overrides the group ownership of the files in the specified directories with the specified group name. The -u option overrides the user ownership of the files in the specified directories with the specified user name. The --prefix option adds the specified directory to the destination path. For example, if you installed files to "/opt/foo" and wanted to build a distribution that installed the files in "/usr/local", the following command would generate a file list that is installed in "/usr/local": mkepmlist --prefix=/usr/local /opt/foo >foo.list SEE ALSO
epm(1) - create software packages epminstall(1) - add a directory, file, or symlink to a list file epm.list(5) - epm list file format COPYRIGHT
Copyright 1999-2007 by Easy Software Products, All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 3 April 2006 ESP Package Manager mkepmlist(1)
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy