How to link to different install location
1 Attachment(s)
Hi
I want to install some application, but not on default install location, rather to another. See the attached screenshot. Look how pgsql is linked to /home/pgsql from its default /var/lib/pgsql so whenever I go to /var/lib/pgsql it points or take me to /home/pgsql. Actually I want to install two new application, grafana and Influxdb. Instead of them installing on default location, I have added a new storage drive, mounted and created partition like /mnt/influx So instead of them installing at default /var/lib/Influxdb I want them to be here /mnt/influx/Influxdb , so that whenever I go to /var/lib/Influxdb it will take me to /mnt/influx/Influxdb and same for grafana too to /mnt/influx/grafana . the attached screenshot I have collected, so I don't know how it was done (pointing the pgsql location to somewhere else). I found it is done using ln command, but not sure how to and what exact parameters to use. |
You have two options. You can actually install it to the intended location, or you can install it to the default location and then move it and symlink it back.
Installing to the intended location is usually only possible with codes you build from source, you can pass the installation directory to the configure script. Installing to the default location and then moving it is easy and works with anything, but it does result in slightly more "clutter" (symlinks hanging around pointing to the actual location). Code:
# install program |
I'll check and report back to you, however one question, does symlinking cause the application not to work properly? Like if I install postgreSQL or Nginx on a different location and also the data moved there?
|
It should behave as if it's still in the normal spot. The program still thinks it's running from the default location while the symlink transparently redirects all I/O to the actual location. Unless the program goes out of the way to check if its directory is actually a symlink (which I can't think of any reason why it would) it should be none the wiser.
|
The system or at least mine does, even links itself to other directories
Code:
%userx@voided 07:33:54 ~ >>$ cd / this is simply what links are designed for |
it depends a bit on WHAT it is
i build a lot of programs in a second tree the OS is / and /usr i install my software to /DATA/SUSE/ if i am installing programs to /usr or /DATA/SUSE/ i add the install location to the "prefix" in configure Code:
./configure --prefix=/DATA/SUSE |
All times are GMT -5. The time now is 10:31 PM. |