Home Backend Development PHP Tutorial PHP installation imagick under Linux

PHP installation imagick under Linux

Aug 08, 2016 am 09:32 AM
imagick nbsp nginx php

Instructions: php installation directory: /usr/local/php5 php.ini configuration file path: /usr/local/php5/etc/php.ini Nginx installation directory: /usr/local/ nginxNginx website root directory: /usr/local/nginx/html1. Install the compilation toolsyum install wget make gcc gcc-c++ gtk+-devel zlib-devel openssl openssl-devel pcre-devel kernel keyutils patch perl2. Install ImageMagick
System Operation and Maintenance www.osyunwei.com Warm reminder: qihang01 original content is copyrighted. Please indicate the source and original text link when reprintingcd /usr/local/src #Enter the software package storage directory wget http://www.imagemagick.org/download/ImageMagick.tar.gz #Download ImageMagicktar zxvf ImageMagick.tar.gz #Unzipcd ImageMagick-6.7.9-3 #Enter the installation directory./configure --prefix=/usr/local/imagemagick #Configuremake #Compile make install #Install export PKG_CON FIG_PATH=/ usr/local/imagemagick/lib/pkgconfig/​​#Set environment variables3. Install imagickcd /usr/local/srcwget http://pecl.php.net/get/imagick-3.0.1.tgz #Download imagicktar zxvf imagick-3.0.1.tgzcd imagick-3.0.1 /usr/local/php5/bin/phpize #Use phpize to generate the configure configuration file ./configure --with-php-config=/usr/local/php5/bin/php-config -- with-imagick=/usr/local/imagemagick #Configurationmake #Compilemake install #InstallNote: An error occurs during the installation process, usually due to the lack of a compilation tool package As a result, you can follow the prompts and refer to the first step to install the corresponding tool package. After the installation is completed, the following interface will appear. Remember the following path, which will be used later. Installing shared extensions: /usr/local/php5 /lib/php/extensions/no-debug-non-zts-20090626/ #imagick module path 4. Configure php to support imagick vi /usr/local/php5/etc/php.ini #Edit the configuration file and add the following content in the last lineextension="imagick.so"5. Testvi /usr/local/nginx/html/phpinfo.php #Edit, enter The following code phpinfo();?>wq! #Save and exitvi /usr/local/nginx/html/imagick.php #Edit, enter the following code header('Content-type: image/jpeg');$image = new Imagick('www.osyunwei.com.jpg'); // If 0 is provided as a width or height parameter,// aspect ratio is maintained$image->thumbnailImage(300, 225);echo $image;?>

The above introduces the PHP installation imagick under Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

See all articles