Dumb question! Can I delete the tarball and compile directories after I make / make install?

Issues related to applications and software problems and general support
Post Reply
User avatar
oceanjeremy
Posts: 43
Joined: 2020/05/29 15:01:00

Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by oceanjeremy » 2020/07/06 19:24:33

I have a feeling this is a really dumb question, but I've googled around and can't find any answers so I'm asking here.

I just installed GoAccess on my server and it's the first time I've actually used the make command, or done any kind of compiling.

So it's installed, it's in /usr/local/bin/goaccess, it's in /usr/local/etc/goaccess, and I can call it as a command.

My question is: Can I now delete the tarball and the directory I extracted it in, along with all the config logs and scripts and whatnot inside that directory?

Is there any reason I'd need to keep ahold of that stuff?
Please be kind! I've only been a Linux user for two months.

bonedome
Posts: 173
Joined: 2017/04/22 08:11:04

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by bonedome » 2020/07/06 21:44:53

Hello
yes you can delete the tarball and the extracted files you used to compile it with, but if you need to uninstall it would have to be done manually, if you keep the extracted directory you can cd into it and uninstall with make uninstall.
If space is an issue but you want to be able to easily uninstall at a later date, delete the tarball and (re)compress the directory.

User avatar
oceanjeremy
Posts: 43
Joined: 2020/05/29 15:01:00

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by oceanjeremy » 2020/07/06 21:55:14

Thanks, bonedome!

Space is not an issue. So it does make a great deal of sense to keep it in case I need to uninstall in the future.

So yeah, it's not drive space — it's more of a desire for order. Right now it's in the root user home directory, and I'd prefer for it to not be there.

I'm still getting a grasp of where things "ought" to go in a Linux directory tree. Very soon I'm going to be setting up servers for friends, and I'd like to make sure that however I leave things will be comprehensible if another Linux or CentOS admin steps in to take care of things.

Where would you put it?

If you took over a CentOS server from someone else and needed it, where would you go looking for it?
Please be kind! I've only been a Linux user for two months.

User avatar
jlehtone
Posts: 3106
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by jlehtone » 2020/07/07 06:47:17

bonedome wrote:
2020/07/06 21:44:53
if you keep the extracted directory you can cd into it and uninstall with make uninstall.
Assuming the makefile contains instructions for uninstall. Not all do.
All do not even have the install command, but place the binaries within the source tree.

Ideally, every application would be come in RPM packages and install/update/removal would be manageable.
Alas, that does not happen either.

Another hurdle is that the package management basically restricts you to one version (the latest) for application.
Software Collections (SCL) works around that somewhat; each SCL application is in separate location and one
has to make it visible with environment variables (on need to know basis). SCL was introduced for RHEL 6 and RHEL 7.
RHEL 8 (and hence CentOS 8) seems to act differently, with its "application streams" and "yum modules".

There is also environment-modules package. That is way older than SCL, but same idea.
Each (version of) application is built and installed into distinct directory. More often to shared network volume than locally.
An environment module config has what it takes to find/use that application (first on PATH, LD_LIBRARY_PATH, etc.)
This is what "super-computers" with thousands of servers tend to use.

Basically, I don't want to put any source install into "the Linux tree". Not even to /usr/local. I do add config to
/etc/profile.d/ that points the environment module command to path that does contain module-files for
applications.

Overall, maintenance of "source installs" is a problem. They are so diverse.

User avatar
oceanjeremy
Posts: 43
Joined: 2020/05/29 15:01:00

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by oceanjeremy » 2020/07/07 19:57:14

Thanks jlehtone!

This is good info, in that it reassures me that my instinct (there's no place to put this stuff!) is somewhat on point.

I sniffed around some other message boards and it looks like GoAccess does indeed include uninstall instructions in its makefile. So I should hang onto this directory.

For now I'll leave it in the root user home directory, under a directory I'll name /root/source_installs, alongside any other source installs I get.

I guess that's as good a place as any for it. ¯\_(ツ)_/¯
Please be kind! I've only been a Linux user for two months.

User avatar
jlehtone
Posts: 3106
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by jlehtone » 2020/07/07 21:09:18

A makefile tends to have target "clean" too, which removes the object files created during build.

oceanjeremy wrote:
2020/07/07 19:57:14
For now I'll leave it in the root user home directory, under a directory I'll name /root/source_installs, alongside any other source installs I get.

I guess that's as good a place as any for it. ¯\_(ツ)_/¯
No. Do not build as root. Do that as regular user. You don't want to run who-knows-what as root.
The "make install" requires sudo, if files get copied into, e.g. /usr/local.
That is another reason to choose an install target that your regular user has write access to.

User avatar
oceanjeremy
Posts: 43
Joined: 2020/05/29 15:01:00

Re: Dumb question! Can I delete the tarball and compile directories after I make / make install?

Post by oceanjeremy » 2020/07/07 21:13:55

jlehtone wrote:
2020/07/07 21:09:18
No. Do not build as root. Do that as regular user. You don't want to run who-knows-what as root.
The "make install" requires sudo, if files get copied into, e.g. /usr/local.
That is another reason to choose an install target that your regular user has write access to.
Sheesh, I do everything as root. I haven't even made a superuser yet, I just su as soon as I ssh in.

Oops.
Please be kind! I've only been a Linux user for two months.

Post Reply

Return to “CentOS 8 - General Support”