Installing Imagemagick, bc and yum on centos

I have been persuaded to install Image magick on a centos server; I know nothing about servers or Centos !

I have some instructions and have had a trawl around the net:

I need to turn safe mode off - edit php.ini file and restart.
Looking at the Apache page there are quite a few ways I can do it. Another site says:

  1. Login to your Web server machine using SSH or telnet.
  2. Su to root - IS THIS ssh root@website.com ?
  3. Run the apache control program:
    apachectl graceful
  4. You can also run the apache control program in this way:
    apachectl restart

I have to install python-iniparse, yum and imagemagick and these steps all look straight forward unless something goes wrong.

Finaly I need to install/activate bc math which I can not find any instructions for.

Has anyone any comments or a site which explains this sort of thing in laymans terms ?

Yum is normally installed by default on centos.
You should be able to install it via yum

yum install ImageMagick

else you’ll have to install from source which takes a couple steps http://www.imagemagick.org/script/install-source.php#unix

Thanks for the reply and as you say yum is installed; I have found Imagemagick is installed but version 6.2.8 but I need a newer version and it it is not being found by php for some reason.

I have followed some other instructions by another IM forum member here: http://www.imagemagick.org/Usage/api/#building
But the problem I am having now is that where do I put the file to be read by:

sudo rpm -Uhv --force --nodeps  ImageMagick-6.6.0-0.i386.rpm

Note bc is installed as I used bc --version to find it all I need to do now is the php.ini bit

Sorted the php.ini file as well now and the only problem is updating as 6.2.8 seems to be the latest version for Centos. This version is probably about 2 years old !

Well Imagemagick installed OK BUT php can not see it and finds the old 6.0.7 version.
I pressume there must be a path problem.

Anyway its a bit scary pressing the enter button and seeing all this code polling across the screen :confused:

Anyway still looking for some good tutorials or a book recomendation.

locate mogrify

should give you an idea where there are imagmagick binaries (normally /usr/bin, might also be /usr/local/bin)
you can tell which is which by e.g

/usr/bin/mogrify -version

or

which mogrify

It may be the case you need to recompile the imagick php extension which is referencing the older binary

You can get newer version of imagmagick for centos by using rpm
have a look at http://andrewduck.name/2009/01/imagemagick-64x-on-centos-5/

Thanks for the help EastCoast; I think my main problem is the person who setup the original server has about 3 /usr/bin/ paths.

When I do which convert the path comes out as /usr/bin/ but looking in each one I can not find it.

Anyway I will report back when I finaly sort it.

P.S. This could help me if I new how the path part was worked out:

By default, ImageMagick is installs binaries in /…/usr/local/bin, libraries in /…/usr/local/lib, header files in /…/usr/local/include and documentation in /…/usr/local/share. You can specify an alternative installation prefix other than /…/usr/local by giving configure the option --prefix=PATH. This valuable in case you don’t have privileges to install under the default paths or if you want to install in the system directories instead.

About to give up and gave it one last chance and Imagemagick was installed but would still not work.

I found I had been installing on one server using Putty with details I was given but the website was actualy on a different server and thats why the version was not updating :nono:

Ouch, that’s got to be a painful mistake!

Glad that you finally got it sorted, though.