首页 > 系统相关 >Ali Cloud Linux3 : Installing ImageMagick for PHP 7.4

Ali Cloud Linux3 : Installing ImageMagick for PHP 7.4

时间:2024-01-30 18:22:33浏览次数:14  
标签:Linux3 ImageMagick Ali sudo installed Step install php

Step 1: If not already installed, install the php-devel and gcc packages.
$ sudo yum install php-devel gcc

To check if the packages are installed, use the following commands. If either command returns an empty result (or both do), you’ll need to install that package (or both).

$ sudo yum list installed | grep php-devel
$ which gcc

Step 2: Install the ImageMagick packages
$ sudo yum install ImageMagick ImageMagick-devel ImageMagick-perl

Step 3: Compile ImageMagick packages.
$ sudo pecl install imagick
if pecl not installed, run below command to get pecl.
$ sudo yum install php-pear

Step 4: Change the permissions on the compiled module.
$ sudo chmod 755 /usr/lib64/php/modules/imagick.so

Step 5: Add imagick to the libraries that are loaded when php starts.
$ cd /etc/php.d
$ sudo vim 20-imagick.ini

You can use either vim or nano to create and edit the 20-imagick.ini file. When the file opens, enter the following lines (first line is just a comment describing file purpose).

; Enable ImageMagick extension module
extension=imagick

Step 6: Restart the php service (php-fpm in my case), and then restart the web service.
$ sudo systemctl restart php-fpm
$ sudo systemctl restart httpd
If all goes well, you should have ImageMagick installed and running on your server in 5 minutes or less.


$php -m|grep imagick
imagick

 

标签:Linux3,ImageMagick,Ali,sudo,installed,Step,install,php
From: https://www.cnblogs.com/rusking/p/17997715

相关文章

  • IEqualityComparer接口实现对象去重
    //Licensedtothe.NETFoundationunderoneormoreagreements.//The.NETFoundationlicensesthisfiletoyouundertheMITlicense.//SeetheLICENSEfileintheprojectrootformoreinformation.usingSystem;usingSystem.Collections;usingSyste......
  • "command failed" err="failed to run Kubelet: validate service connection: valida
    场景:更换版本1.18.0为1.26.0启动kubelet报错,""commandfailed"err="failedtorunKubelet:validateserviceconnection:validateCRIv1runtimeAPIforendpoint\"unix:///run/containerd/containerd.sock\":rpcerror:code=Unimplement......
  • 关于ufw 报错ip6tables v1.6.1: can't initialize ip6tables table `filter': Table d
    背景在ubuntuarm版本上安装ufw,设置规则时报错发现报错ip6tablesv1.6.1:can'tinitializeip6tablestable`filter':Tabledoesnotexist(doyouneedtoinsmod?)Perhapsip6tablesoryourkernelneedstobeupgraded.解决办法一.升级ip6tables二.禁用i......
  • AlipayGlobal集成备忘录
    一、获取clientId,publicKey,privateKey登录开发者中心https://global.alipay.com/developer如果当前账号尚未配置publicKey,则需要你下载阿里官方提供的工具去生成一个最终你要使用的publicKey和privateKey分别来自以下两个地方另外开发者中心提供如图所示工具,进行一系......
  • Windows安装MySql时出现“Failed to find valid data directory”的错误
    1、......
  • 英语一课一练一年级扩展阅读05The World of Alice-爱丽丝的世界
    PDF格式公众号回复关键字:YYYKYLY05记忆树1Hello!MynameisAlice.翻译你好,我的名字是爱丽丝。简化记忆名字2Thisismyface.It'sround.翻译这是我的脸,它是圆的。简化记忆圆脸3Lookatmyeyes.They'rebig.翻译看我的眼睛,它们很大。简化记忆眼睛4......
  • FluentValidation在C# WPF中的应用
    1.引言在.NET开发领域,FluentValidation以其优雅、易扩展的特性成为开发者进行属性验证的首选工具。它不仅适用于Web开发,如MVC、WebAPI和ASP.NETCORE,同样也能完美集成在WPF应用程序中,提供强大的数据验证功能。本文将深入探讨如何在C#WPF项目中运用FluentValidation进行属性验证,......
  • .NET问题:The remote certificate is invalid because of errors in the certificate c
    错误信息:内部异常1:HttpRequestException:TheSSLconnectioncouldnotbeestablished,seeinnerexception.内部异常2:AuthenticationException:Theremotecertificateisinvalidbecauseoferrorsinthecertificatechain:NotTimeValid解决方法跳过验证......
  • dealing with msys2 slow startup
    Alltoolsfromshellareveryslow·Issue#138·msys2/MSYS2-packages·GitHubhttps://github.com/msys2/MSYS2-packages/issues/138msys2.exetakesalmost40secondstolaunch·Issue#1785·msys2/MSYS2-packages·GitHubhttps://github.com/msys2/MSYS2-p......
  • FluentValidation在C#的应用
    FluentValidation在C#WPF中的应用  1.引言在.NET开发领域,FluentValidation以其优雅、易扩展的特性成为开发者进行属性验证的首选工具。它不仅适用于Web开发,如MVC、WebAPI和ASP.NETCORE,同样也能完美集成在WPF应用程序中,提供强大的数据验证功能。本文将深入探讨如何在C#......