I recently wanted to install imagemagick as a php extension on my Debian Squeeze web server. Unfortunately most existing howtos just install it through apt-get install php5-imagick, which of course requires that php itself was also installed trough apt-get. Doesn't fit my case, because I like to build my own PHP :-).
So here's another guide how imagemagick can be installed as a PHP extension on a Debian system (currently Squeeze).
Install pre-requirements (the imagemagick libraries and development files):
apt-get install imagemagick libmagickwand-dev
This will install a ton of dependency packages... As an alternative you can also grab the source code file of imagemagick and compile it yourself.
Now download the PECL package of imagemagick, which is called 'imagick'. Check out http://pecl.php.net/package/imagick for new versions.
Unzip/unpack the tgz file and change directory:
The next step is to get information from the currently installed PHP version. All these informations will be gathered trough the program phpize. After this, the compilation is made:
Usually there would be a 'make install' at the end where the imagick extension would be copied to PHP's extension_dir but I prefer to set my own path.
So I created a new folder (/usr/local/imagick) and place the extension manually in there.
cp modules/imagick.so /usr/local/imagick/
Now the extension must be activated in PHP's configuration file php.ini. As I already have ioncube as extension loaded, I just place it below:
# grep "; Extensions" -A 7 /etc/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.3_ts.so
extension = /usr/local/imagick/imagick.so
Now just an Apache restart and the extension is active.
No comments yet.
AWS Android Ansible Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Container Containers CouchDB DB DNS Database Databases Docker ELK ElasticSearch Elasticsearch Filebeat FreeBSD GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java Kibana Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Rancher SSL Security Shell SmartOS Solaris Surveillance SystemD TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder