YUM: Can I specify installation folder of package?

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
I'm attempting to install a few packages. When I do, the install folder is typically the package name + version number.

For instance, if I yum install tomcat, it gets put here:

/opt/apache-tomcat-7.0.41

I want to simplify this to say /tomcat

Is this possible? I'm googling but not finding much.
 

adreamer

Member
Mar 26, 2009
61
0
0
That is part of the RPM (where stuff gets installed).. so you would need to rebuild the RPM.

Just an idea, you might be able to create a softlink called /opt/apache-tomcat-7.0.41 and point it to /tomcat Then install the RPM..in my head anything put in /opt/apache-tomcat-7.0.41 would actually be in /tomcat. I've not tested this but give it a shot.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm attempting to install a few packages. When I do, the install folder is typically the package name + version number.

For instance, if I yum install tomcat, it gets put here:

/opt/apache-tomcat-7.0.41

I want to simplify this to say /tomcat

Is this possible? I'm googling but not finding much.

No, RPMs specify the directories for all of their files and there's no good way to change that. You can try the relocate option, but chances are that it would be much less problematic to just install tomcast from source so you can specify it there.