Imagickのインストール
先に
[root@falcon21 ~]# yum -y install ImageMagick
確認
[root@falcon21 ~]# convert -version
Version: ImageMagick 6.7.8-9 2019-02-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
----------------------
Imagickのインストール ・・・ peclコマンドを使えるようにする
[root@falcon21 ~]# yum install php-pear
Running transaction
インストール中 : 1:php-pear-1.9.4-22.el7.noarch 1/1
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/li b64/php/modules/imagick.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/imagick.so .so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/pear/PEAR/Frontend.php on line 91
PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib64/php/modules/imagick.so (/usr/li b64/php/modules/imagick.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/imagick.so .so (/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
インストール:
php-pear.noarch 1:1.9.4-22.el7
完了しました!
New leaves:
php-pear.noarch
・・・・・ インストールは出来たが、警告あり。:PHPスタートアップ:ダイナミックライブラリ 'imagick.so'を読み込めません
imagick.soインストール
[root@falcon21 ~]# cd /usr/local/src
[root@falcon21 src]# git clone --depth 1 https://github.com/mkoppanen/imagick
Cloning into 'imagick'...
remote: Enumerating objects: 351, done.
remote: Counting objects: 100% (351/351), done.
remote: Compressing objects: 100% (247/247), done.
remote: Total 351 (delta 144), reused 200 (delta 100), pack-reused 0
Receiving objects: 100% (351/351), 319.32 KiB | 426.00 KiB/s, done.
Resolving deltas: 100% (144/144), done.
[root@falcon21 src]# cd imagick
[root@falcon21 imagick]# phpize ・・・コマンドが動かない --> phpdevel (これも、エラー、下記記事で解消)
[root@falcon21 imagick]# phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
[root@falcon21 imagick]# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
[root@falcon21 imagick]# make
Libraries have been installed in:
/usr/local/src/imagick/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
[root@falcon21 imagick]# make install
----------------------
yumリポジトリの一覧表示
[root@falcon21 ~]# yum repolist [all]
読み込んだプラグイン:fastestmirror, langpacks, priorities, show-leaves
Loading mirror speeds from cached hostfile
* base: ftp.nara.wide.ad.jp
* extras: ftp.nara.wide.ad.jp
* remi-safe: ftp.riken.jp
* updates: ftp.nara.wide.ad.jp
* webtatic: us-east.repo.webtatic.com
362 packages excluded due to repository priority protections
repolist: 0
リポジトリの優先度保護のために362個のパッケージが除外されました
リポジトリ:0
----------------------
リポジトリの優先度設定
全体の設定 - /etc/yum.confに記載する
リポジトリ固有の設定 - /etc/yum.repos.d/*.repoに記載する。*にはリポジトリ名が入る
。既存のyumのリポジトリではインストールできるバージョンが低い場合など利用する。
使用したいリポジトリを確認
remi.repoを有効化設定する
[root@falcon21 ~]# vi /etc/yum.repos.d/remi.repo
Repository: http://rpms.remirepo.net/
# Blog: http://blog.remirepo.net/
# Forum: http://forum.remirepo.net/
[remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php55/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php55/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php55/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php56/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php56/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/test/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/test/mirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/test/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-debuginfo]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php55-debuginfo]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php55/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php56-debuginfo]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php56/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test-debuginfo]
name=Remi's test RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-test/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
remiリポジトリのバージョンアップ php バージョンに合わせる
[root@falcon21 ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
http://rpms.famillecollet.com/enterprise/remi-release-7.rpm を取得中
準備しています... ################################# [100%]
更新中 / インストール中...
1:remi-release-7.8-1.el7.remi ################################# [ 50%]
整理中 / 削除中...
2:remi-release-7.7-2.el7.remi ################################# [100%]