note 95270 added to imagick.installation
| From: | scottchu dot tw at gmail dot com | Date: | Wed, 23 Dec 2009 03:17:17 +0000 |
| Subject: | note 95270 added to imagick.installation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164267@lists.php.net to get a copy of this message | ||
PECL install imagick contantly fails due to the server is behind some firewall, so one may try
'phpize' way to install.
However, someone like me who doesn't want to use default options may experience thru failure
situation. And if you google thru the cloud, you may find many people tell you to rpm imagick-devel
with yum or apt. That does solve the problem.
However, In my case, my server already has php 5.3.1 installed under /usr/lcal/php & the linux
doesn't have yum or apt service. Furthermore, I just installed imagemagick yesterday (Also
quite a battle =.=) under /usr/local/imk
(note: You may see that I don't like default options, I like to install each package under
different dir under /usr/local).
Today, I want to install imagick, so this is what I do:
1> add /usr/local/php/bin & /usr/local/imk/bin to path.
2> download imagick source of intended version (I use 3.0.b1).
3> enter that dir & issue 'phpize'.
(note:I got a habit to issue './configure --help > oo' & 'view oo' to see
all the options first before installation)
4> 'vi configure' & find LIBS, then add '-l/usr/local/imk/lib' after it.
5> issue './configure --prefix=/usr/local/ik4php'
5> --with-imagick='/usr/local/imk'.
(note: with-imagick points out where you install the imagicmagick package before, this name
'imagick' is not appropriate since it incurs ambiguity with imagick for php =.=)
6> after it's done, issue 'make'.
7> after make is done, issue 'make install'.
(note:the last two output lines will tell you where to find the generated shared object library
file: imagick.so)
8> go to that dir & copy imagick.so to the extension dir defined in php.ini.
(note: in my case it's /usr/local/php/ext)
9> edit php.ini to add 'extension=imagick.so' line.
10> stop & start apache or just restart apache.
(note: if you have tomcat + apache + jk module installation style as mine, shutdown tomcat, stop
apache, then startup tomcat first, then start apache)
If you have similar server environment & situation as mine, hope this article helps you.
Scott Chu @ Taiwan
----
Server IP: 60.244.128.222
Probable Submitter: 211.20.177.117
----
Manual Page -- http://www.php.net/manual/en/imagick.installation.php
Edit -- https://master.php.net/note/edit/95270
Del: integrated -- https://master.php.net/note/delete/95270/integrated
Del: useless -- https://master.php.net/note/delete/95270/useless
Del: bad code -- https://master.php.net/note/delete/95270/bad+code
Del: spam -- https://master.php.net/note/delete/95270/spam
Del: non-english -- https://master.php.net/note/delete/95270/non-english
Del: in docs -- https://master.php.net/note/delete/95270/in+docs
Del: other reasons-- https://master.php.net/note/delete/95270
Reject -- https://master.php.net/note/reject/95270
Search -- https://master.php.net/manage/user-notes.php