The only requirement to run relink is Perl 5.6 or higher.
It looks cool, but how do I install relink?The man page provides useful information on how to install relink, however many of us like a tutorial or HOWTO walking us through the install process. You can install relink in any prefix you desire. For example: /app, $HOME/app, $HOME/myprograms, $HOME/your_choice I have a freshly installed Slackware 9.1 system specifically for the purpose of demonstrating how to install relink. In my demonstration I will use /app (/a/app) as my prefix for installing applications and the user jpiszcz as the owner the /a directory.
Step 01: Download relink
root@jpt2:~# wget http://aleron.dl.sourceforge.net/sourceforge/relink/relink-1.71.tar.gz
=> `relink-1.71.tar.gz'
Resolving aleron.dl.sourceforge.net... 204.157.3.229
Connecting to aleron.dl.sourceforge.net[204.157.3.229]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33,925 [application/x-gzip]
100%[====================================>] 33,925 91.77K/s
22:48:11 (91.70 KB/s) - `relink-1.71.tar.gz' saved [33925/33925]
root@jpt2:~#
Step 02: Decompress the package
root@jpt2:~# tar zxvf relink-1.71.tar.gz relink/ relink/bin/ relink/bin/conf relink/bin/relink relink/doc/ relink/doc/relink.pdf relink/doc/relink.txt relink/doc/relink.ps relink/doc/relink.html relink/man/ relink/man/man1/ relink/man/man1/relink.1 root@jpt2:~#
Step 03: Setup your directory structure
root@jpt2:~# mkdir /a # this is the base directory. root@jpt2:~# mkdir /a/app # this is where the programs are stored. root@jpt2:~# mkdir /a/vapp # this is where the symlinks are stored root@jpt2:~# ln -s /a/app /app # this is for convenience root@jpt2:~# ln -s /a/vapp /vapp # this is used for your $PATH variables. root@jpt2:~# chown jpiszcz:users -R /a root@jpt2:~#The last line allows jpiszcz:users to be the owner of /a, this is a good idea for a single user system and more secure then running make install as root. For some installations, creating a 'relink' user for the sole purpose of installing and maintaining packages is recomended.
Step 04: Setup your PATHs
You may place the path wherever you choose, however I prefer to put them in /etc/profile (Slackware) or /etc/bashrc (RedHat).Add the following entries to the appropriate file.
######################################################### # UNIX SYSTEM PATHS ######################################################### # set the path export PATH=/vapp/bin:/vapp/sbin:$PATH # set the manpath export MANPATH=/vapp/man:$MANPATH # set the library path export LD_LIBRARY_PATH=/vapp/lib:$LD_LIBRARY_PATH ######################################################## # GCC COMPILER PATHS ######################################################## # set the c_include_path for gcc so when you compile programs # it will search the headers in /vapp/include export C_INCLUDE_PATH=/vapp/include:$C_INCLUDE_PATH # the same but for C++ headers export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH # the same but for libraries export LIBRARY_PATH=/vapp/lib:$LIBRARY_PATH ######################################################## # The following may be optional or not depending on # whether or not you use GNOME or wish to install various # gnome system programs or libraries into /app. ######################################################## export ACLOCAL_FLAGS="-I /vapp/share/aclocal -I /usr/share/aclocal" export GNOME_PATH="/vapp" export PKG_CONFIG_PATH="/vapp/lib/pkgconfig:/usr/lib/pkgconfig" export QTDIR="/app/qt-3.3.1" ######################################################## # The following is highly recommended: ########################################################To make sure the system knows about the new libraries, you should also add the following line into /etc/ld.so.conf: /vapp/lib and run /sbin/ldconfig afterwards. This ensures that the system knows where the libraries are and in addition, OpenBSD's OpenSSH secure ftp (sftp) daemon requires that this step be done or else it will not be able to locate the paths for openssl if you only have openssl in your /app.
root@jpt2:~# cat /etc/ld.so.conf /vapp/lib /usr/local/lib /usr/X11R6/lib /usr/i486-slackware-linux/lib /opt/kde/lib /usr/lib/qt/lib /lib root@jpt2:~# ldconfig root@jpt2:~#
Step 05: Check your PATHs
After you have added the PATHs into /etc/profile or /etc/bashrc:root@jpt2:~# grep . /etc/profile | tail -n 25 # set the path export PATH=/vapp/bin:/vapp/sbin:$PATH # set the manpath export MANPATH=/vapp/man:$MANPATH # set the library path export LD_LIBRARY_PATH=/vapp/lib:$LD_LIBRARY_PATH ######################################################## # GCC COMPILER PATHS ######################################################## # set the c_include_path for gcc so when you compile programs # it will search the headers in /vapp/include export C_INCLUDE_PATH=/vapp/include:$C_INCLUDE_PATH # the same but for C++ headers export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH # the same but for libraries export LIBRARY_PATH=/vapp/lib:$LIBRARY_PATH ######################################################## # The following may be optional or not depending on # whether or not you use GNOME or wish to install various # gnome system programs or libraries into /app. ######################################################## export ACLOCAL_FLAGS="-I /vapp/share/aclocal -I /usr/share/aclocal" export GNOME_PATH="/vapp" export PKG_CONFIG_PATH="/vapp/lib/pkgconfig:/usr/lib/pkgconfig" export QTDIR="/app/qt-3.3.1" root@jpt2:~#Then source the new file your environment is aware of the new paths.
root@jpt2:~# . /etc/profile To check that your settings worked properly, simply check a PATH. root@jpt2:~# echo $PATH /vapp/bin:/vapp/sbin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin: /bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin: /usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin root@jpt2:~#
Step 06: Move relink into /app and set permissions to the user that you will be running relink as
root@jpt2:~# mv relink /app root@jpt2:~# chown jpiszcz:users -R /a
Step 07: Run relink to set the paths and initialize the database
Note the user change: I am now user 'jpiszcz'jpiszcz@jpt2:~$ /app/relink/bin/relink RELINK_ERROR>> $HOME/.relinkrc does not exist. RELINK_ERROR>> try relink --setup options, use only one option at a time -h|-help|--help : this menu -i|-init|--init : initialize relink system -k|-keep|--keep : keep files generated in /tmp, for debug -s|-setup|--setup : setup directories -v|-verbose|--verbose : verbose output of progress -V|-version|--version : output version information jpiszcz@jpt2:~$ /app/relink/bin/relink -s Enter Application Directory (e.g. /a/app): /a/app Run relink again jpiszcz@jpt2:~$ relink -su: relink: command not found jpiszcz@jpt2:~$ # There is a small bug in the installation as you can see here. jpiszcz@jpt2:~$ # To remedy: jpiszcz@jpt2:~$ /app/relink/bin/relink -i APPDIR: /a/app RELINK>> Delete all files in current directory RELINK>> DIRECTORY: /a/vapp vapp RELINK>> CTRL-C to abort, 'Y' to continue: Y Removing all vapp symbolic link files /a/vapp Removing rdb files Executing relink: [/a/app/relink/bin/relink] diff: /a/rdb/rdb.dat: No such file or directory diff: /a/rdb/rdb.dat: No such file or directory /bin/cp: cannot stat `./rdb/rdb.dat': No such file or directory jpiszcz@jpt2:~$ # This is the second and last but during installation. jpiszcz@jpt2:~$ # To remedy: jpiszcz@jpt2:~$ /app/relink/bin/relink -i APPDIR: /a/app RELINK>> Delete all files in current directory RELINK>> DIRECTORY: /a/vapp rdb.dat RELINK>> CTRL-C to abort, 'Y' to continue: Y Removing all vapp symbolic link files /a/rdb rdb.dat Removing rdb files Executing relink: [/a/app/relink/bin/relink] 14 link(s) installed jpiszcz@jpt2:~$Congratulations, you have successfully installed relink!
Ok that's great I have installed relink, now how do I use it?
In the proceeding text I will show three things 1] Install a library into /app.
2] Install a program that depends on the library installed in /app.
2] Remove a program.
3] Upgrade a program.
- "Relink, Page 1/5"
- "Relink, Page 2/5"
- "Relink, Page 3/5"
- "Relink, Page 4/5"
- "Relink, Page 5/5"



