[Tutorial] How to Install Imagick on YunoHost / [Tutoriel] Comment installer Imagick sur YunoHost

Hardware: AMD64

YunoHost version: 11.0.9.913 (stable).

I have access to my server : yes

Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description:

Question?

I need imagick how to install it correctly for YH?

Answer:

Prerequisites

  • Recommended OS: [Debian 11 Bullseye]

  • User account: A user account with sudo privilages or root access (su command).

  • Required Packages: wget

Updating Operating System

Update your Debian 11 operating system to make sure all existing packages are up to date:


sudo apt update && sudo apt upgrade

Root or Sudo Access

By default, when you create your account at startup with Debian compared to other distributions, it does not automatically receive sudoers status. You must either have access to the root password to use the su command.

Install PHP-IMAGICK from Debian 11 Bullseye Repository

The first option is to use the official Debian 11 default repository, and this is one of the most preferred options and arguably the most stable. The only drawback will be outdated for new builds and improvements compared to the other two options.

Install php-imagick with the following command:


sudo apt install php-imagick

Alternatively, you can use the preferred version such as 7.4:


sudo apt install php7.4-imagick

Next, verify the installation:


php -m | grep imagick

Example output:


imagick

Then, use any text editor and open the php.ini as follows:


sudo nano /etc/php/7.4/fpm/php.ini.

Next, add the following line under the [PHP], which is located on line 2:


extension=imagick

Now, save the file CTRL+O and exit after saving, CTRL+X.

To finish off, restart PHP-FPM:


sudo systemctl restart php7.4-fpm

Note, replace the 7.4 with your PHP version.

France

Avertissement, mon Français est pire que celui d’un bébé qui n’a même pas encore appris à parler. Alors ne me tuez pas si je dis quelque chose de mal.

Matériel: AMD64

Version YunoHost: 11.0.9.913 (stable).

J’ai accès à mon serveur : oui

Êtes-vous dans un contexte particulier ou avez-vous effectué des ajustements particuliers sur votre instance YunoHost ? : non

Description:

Question?

J’ai besoin d’imagick comment l’installer correctement pour YH?

RĂ©pondre:

Prérequis

Système d’exploitation recommandé : [Debian 11 Bullseye]

Compte d’utilisateur : Un compte d’utilisateur avec des privilèges sudo ou un accès root (commande su).

Packages requis : wget

Mise à jour du système d’exploitation

Mettez à jour votre système d’exploitation Debian 11 pour vous assurer que tous les paquets existants sont à jour :


sudo apt update && sudo apt upgrade

Accès Root ou Sudo

Par défaut, lorsque vous créez votre compte au démarrage avec Debian par rapport à d’autres distributions, il ne reçoit pas automatiquement le statut de sudoers. Vous devez avoir accès au mot de passe root pour utiliser la commande su.

Installez PHP-IMAGICK à partir du dépôt Debian 11 Bullseye

La première option est d’utiliser le dépôt officiel par défaut de Debian 11, et c’est l’une des options les plus préférées et sans doute la plus stable. Le seul inconvénient sera obsolète pour les nouvelles constructions et les améliorations par rapport aux deux autres options.

Installez php-imagick avec la commande suivante :


sudo apt install php-imagick

Alternativement, vous pouvez utiliser la version préférée telle que 7.4:


sudo apt install php7.4-imagick

Ensuite, vérifiez l’installation :


php -m | grep imagick

Exemple de sortie :


imagick

Ensuite, utilisez n’importe quel éditeur de texte et ouvrez le php.ini comme suit:


sudo nano /etc/php/7.4/fpm/php.ini.

Ensuite, ajoutez la ligne suivante sous [PHP], qui se trouve sur la ligne 2 :


extension=imagick

Maintenant, enregistrez le fichier **CTRL + O ** et quittez après l’enregistrement, **CTRL + X **.

Pour terminer, redémarrez PHP-FPM :


sudo systemctl restart php7.4-fpm

Remarque, remplacez la version 7.4 par votre version PHP.

1 Like

Maybe you should rename this topic, at first I thought you were looking for a tutorial.
Maybe something like :
[Tutorial] Install Imagick on YunoHost

Thank you for the tutorial!

Indeed, title changed. :slight_smile: I have also added a banner warning users facing such an issue when installing apps to report it before trying to install it manually like in this tutorial. :slight_smile:

2 Likes

I changed it again more to my liking. France version is now also there.

Question: what’s the need for Imagick that would not be already installed for existing packaged apps ?

It depends on your specific use case, in my case it was a request from my CMS. Or did you mean something else?

No, I’m just curious.

Well then it just depends on what you use YH for. Some web apps just need more than a basic feature set.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.