The basics
Building software
Linux software consists of one or more packages. A package gives your VPS server additional new commands.
These packages are usually stored in online repositories that will be downloaded by your VPS server. In the most frequent cases, your VPS is configured to use the nearest geographically-based repository for you to get the fastest downloads (Of course, the speed of a repository is not just about its location, it all depends on the bandwidth capacity available on the deposit, etc etc ...)
A package has its dependencies
On Linux, a package works a few times with dependencies. Dependencies are the other packages that are necessary for the proper operation of the package you want to install.
The case study
Imagine that you want to be able to run the command "php / myfile.php" on your server.
The "
php" command is provided by the
php7.2 package.
This package depends on
libapache2-mod-php7.2 and
php7.2-common ...
- The
libapache2-mod-php7.2 package depends on
apache2-api-20120211 packages,
apache2-bin,
libc6 (and other packages, the list is longer ...)
- The
php7.2-common package depends on the
libc6,
libssl1.1,
php-common packages, and
uCF
So to have the "
php" functional command on your server, all these packages at once will be installed or updated (if some of them are already installed on the machine)
It is good to know that dependencies are related to a version of a package. Thus, you may find it impossible to install your software because it will require the update of a package (libc6 for example) to a higher version, version not supported by one of your packages already installed.
Intuitive installation
There are two ways to install "packages" on your server ...
APT
The preferred tool is "
apt". Apt is a software manager that will allow you to do your operations fairly easily, and fairly securely.
The reflex to adopt is to perform:
[COMMAND] apt-get update [/ COMMAND] before any new installation. This will update the list of available packages known by your server.
Then, launch the command
[COMMAND] apt-get install
the_package_name i> [/ COMMAND] This command will look for the necessary dependencies and will prompt you for the installation confirmation after listing the dependencies
APTITUDE
"aptitude" is a tool (not installed by default on a server) that allows the resolution of "unsatisfactory dependencies" (This is what you will return apt when a package can not be installed without breaking another package, because of an addiction)
It is important to use this command with extreme caution because for troubleshooting, it may be suggested that you uninstall or update a package. This manipulation may delete another package!
To install aptitude:
[COMMAND] apt-get update [/ COMMANDE] root@votre-machine:~# apt-get install aptitude
Once aptitude is installed, to install a package with this utility, the command to use is as follows:
root@votre-machine:~# aptitude install php
And you will have some suggestions to accept or refuse to try to resolve the dependencies needed to install your package.
Advanced installation
There are other ways to install / force the installation of packages on a server: dpkg, direct compilation, manual installation of files, and so on. Unfortunately, these manipulations are more complex to document because they are not generic and must be adapted on a case by case basis. The risk of mishandling is all the greater if the Linux environment is not mastered or little known.
We recommend that you refer to our outsourcing solutions if necessary and get closer to the technical support, who will be able to offer you a solution