3

I recently learned that linux does not have any installation wizards. I needed the following software, so I downloaded them and put them in a folder.

enter image description here

As you can see, I've extracted one of them. Now, I'm really confused as to how the installation works.

1) Is it necessary to install these software in specific location only, for them to work, or can they be installed anywhere?

2) How do you use a package manager to install something already downloaded? Will it overwrite any older version of the similar software if I use it?

The reason I'm confused is: Whenever I've needed any software till now, I did

sudo apt-get install software_name

But that was for things like diffuse and firefox. I didn't download diffuse or firefox before that, so apt-get install seemed to be both downloading and installing. So how do you direct this thing to specifically install what you already downloaded? And if the folder is a tar, you need to first extract it right?

3
  • 1
    Do you need these specific versions of software, or will latest available be good?
    – loa_in_
    Dec 5, 2016 at 8:47
  • Latest will do, but I would like to learn how to install specific versions, incase that comes handy later. Dec 5, 2016 at 8:48
  • I finished editing my answer, I think I covered all necessary concepts. I didn't actually look at the repositories, but the software should be there.
    – loa_in_
    Dec 5, 2016 at 9:32

5 Answers 5

3

It looks like you're using ubuntu. Are you sure you can't install tomcat and these other programs using apt? https://stackoverflow.com/questions/17360868/setting-up-tomcat-in-ubuntu

apt-cache search openjdk
apt-cache search tomcat7
apt-cache search maven

All return reasonable results for me. If you want to run the latest and greatest versions (or just really control versioning and not have a package manager screw you which can happen), then manually installing is fine. Each of these programs has copious online documentation for how to install - just google "install jdk linux", "install tomcat linux" etc. The short summary is that java apps don't usually have much of an install need - just untar them into /opt using:

$cd /opt
$tar zxvf ~/Downloads/apache-tomcat-blah.tar.gz

and then start following the configuration guides. Start with the jdk first.

2
  • I did what you said, cd into /opt and tarred the jdk archive, but when I did java -version, the version that was previously there on my machine still showed up Dec 5, 2016 at 6:09
  • You'll need to get familiar with $PATH, and either update it to look under /opt/java-blah-blah before checking /usr/bin, /usr/local/bin etc. stackoverflow.com/questions/24641536/… Dec 6, 2016 at 0:55
1

Looking at the image you attached, I can say you are using Ubuntu. Ubuntu provides different package managers like Synaptic package manager if you are a GUIna pig, apt package manager which is a command line tool.

I do really wonder for your comment,

I recently learned that linux does not have any installation wizards.

So, as you are trying to install jdk tomcat and maven, Either find the package in synaptic package manager or use the apt to search and install the package.Synaptic is a GUI tool and it is straight forward to install any package.

For apt you can use the below commands,

  • Update your repository, sudo apt-get update

  • Search for the package in repository. apt-cache search maven (or any other package you want to install)

  • Once you find the right package in repo, Install it using, sudo apt-get install package-name.

If you are trying to install from the third party packages from third party repositories which is not warrantied by Ubuntu or any other distribution which you are using, then you should install those packages with your own risk. There might be chances of breaking your packages due to unhandled dependencies.

In that case add the third party repositories to /etc/apt/sources.list and follow the above mentioned steps.

UPDATE

FWIW, If you are trying to install jdk then just install the default-jdk which is provided in your distribution itself.

1

1) Is it necessary to install these software in specific location only, for them to work, or can they be installed anywhere?

By default the installed package using apt will go under /usr (/usr/lib ,/usr/share ...) , after installing some package you can run dpkg -L some_package to find the locations of all installed files.

2) How do you use a package manager to install something already downloaded?

So how do you direct this thing to specifically install what you already downloaded? And if the folder is a tar, you need to first extract it right?

it depend on your downloaded package e,g (.deb, tarballs...):

a .deb file can be installed through dpkg -i pckge_name.deb followed by apt-get -f install , because dpkg cannot solve the dependencies

To solve the dependencies you can use apt to install the .deb file on your computer or the gdebi tool .

A tarball : First the tarball should be uncompressed , then read the Readme , intall.txt file to get some informations how to install it e,g : You can install the program through install.sh or after running : :./configure to configure your program (with/without options) make to compile the source files & make install to install the binaries into the appropriate locations .

Will it overwrite any older version of the similar software if I use it?

Using apt or gdebi the newest package can be installed and overwrite easily , but the compiled package should be more complicated.

1

For Oracle Java (as opposed to OpenJDK) you really do have to follow separate instructions, because it's not present in Ubuntu repositories (as far as I know - I infer from existence of these instructions).

For rest of software listed, the packages are included in repositories and installing them is as simple as using Synaptic.

Actually once you add the PPA for Oracle Java 8 (there might be others, this is maintained by webupd8team):

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

it will be also available in Synaptic (for you). That's the point of PPAs - a type of repository known also as Personal Package Archive.

As for installation of specific version of software see this answer. I will not describe the process as I'm not using Debian/Ubuntu and wouldn't want to talk you into trouble.

As for installing software you already downloaded - don't download software like that unless it's unavailable in the repositories. If it's not in the repositories - search for PPAs. If it's not in PPAs - follow the instructions included with the software.

If you decide to maintain a version of the software that isn't installed through the package manager apt then in general you can install it anywhere and add appropriate directories to PATH or symlink the executables / configuration files, unless bundled instructions say that you can't or should not.

0

Myh issue is stuff like android studio and java, I don't want to spend hours downloading when I have tarballs and gdebi will only do .debs, I prefer package manager/dpkg to makefile

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .