How to Install ImageMagick on CentOS & RHEL 在服务器环境是CentOS安装处理图片的组件ImageMagick
如果不安装 ImageMagick ,是无法使用
gem 'carrierwave'
gem 'mini_magick'
gem 'ckeditor'
这三个gem上传图片的。
Step 1. Install Required Packages
First we need to install required packages in order to install ImageMagic and IMagick PHP extension.
# yum install gcc php-devel php-pear
Step 2. Install ImageMagick
After installing required packages, let’s install ImageMagick using following command.
# yum install ImageMagick ImageMagick-devel
Step 3. Install ImageMagick PHP Extension
At this point you have successfully installed ImageMagick package on your system. Now are are going to install ImageMagick php extension, So that we can use it through php code.
# pecl install imagick # echo "extension=imagick.so" > /etc/php.d/imagick.ini
Step 4. Restart Apache and Check Extension
After completing above steps you need to reload apache service to enable php exension using following command
# service httpd reload
Click here to read more details about ImageMagick setup and there uses.