Archive

Posts Tagged ‘centos’

Installing php-imagick on CentOS 5

October 31, 2010 3 comments

For some reason I find myself having to work with CentOS a lot these days. I hate to say I hate something, but I can’t help saying I don’t like CentOS at all. Its packaging system is just so inconsistent and error prone I can’t understand how this could ever be considered an appropriate server platform for so many hosting companies. Why not use Debian? I don’t get it.

Anyway, installing the ImageMagick extension to PHP can be a challenge. Apparently, in some cases, you can easily get out of that problem issuing this series of commands as root (thanks to the author of this page for that):

yum install ImageMagick.i386
yum install ImageMagick-devel.i386
pecl install imagick

echo “extension=imagick.so” > /etc/php.d/imagick.ini
/etc/init.d/httpd restart

However, in my case I got a little error in the middle of the execution of pecl install imagick:

checking if ImageMagick version is at least 6.2.4… found version 6.2.8
checking for magick-wand.h header file… found in /usr/include/wand/magick-wand.h
checking PHP version is at least 5.1.3… /tmp/tmpi10iXi/imagick-3.0.0/configure: line 3339: test: Usage: /usr/bin/php-config [–prefix|–includes|–ldflags|–libs|–extension-dir|–include-dir|–php-binary|–version]: integer expression expected
configure: error: no. found 5.1.6
ERROR: `/tmp/tmpi10iXi/imagick-3.0.0/configure –with-imagick’ failed

So obviously, although I have PHP 5.1.6, this is not above 5.1.3… go figure.

The problem is complex, because you’re using PECL to download and install the package, and when it fails, PECL cleans its downloaded files, so you can’t directly take it from there (not without a little trickiness). In short, we’ll have to issue a CTRL+C in the middle of PECL’s execution, then go to /tmp/tmpSomething/ and hack the system. The commands below are not to be considered best practices. I am no system administrator nor am I very familiar with compilation nor the way PECL works (I have a good idea, but still).

Go to /tmp/tmpSomething (there shouldn’t be too many of these around)

cd imagick-3.0.0

vim configure

find the string 50103 (for some reason that’s how a version superior to 5.1.3 is looked for) around line 3339

Remove the if … condition (only leave the echo… result: yes. found line). Also remove the fi line. There should only be two lines eventually, both echoing “yes. found” in the middle

Save the file and exit

./configure

make

make install

echo “extension=imagick.so” > /etc/php.d/imagick.ini

/etc/init.d/httpd restart

And all that should make it…

Categories: Documentation, English, php Tags: ,

Installing BigBlueButton 0.64 on CentOS5.5

October 24, 2010 2 comments

The documentation to install BigBlueButton 0.64 on CentOS (and on most other distributions) is really excellent. However, I found that CentOS 5.5 had not been documented yet, so I tried it and run into a few problems. I explain below how to get it all sorted out. I installed CentOS5.5 from a DVD in “server” mode, so without graphical interface. Once installed, I proceeded with the following.

I followed the first directions from http://code.google.com/p/bigbluebutton/wiki/RPMPackaging#How_to_Install_BigBlueButton_on_CentOS_5.4

However, I ran into my first problem: the epel could not be found by the script, so I had to update the script to change epel-release-5-3.noarch.rpm for epel-release-5.4-noarch.rpm, then launch the script again.

Probably because the script had a problem, I had another problem later during the install: /etc/init.d/asterisk conflicted with asterisk14, so I had to remove Asterisk first: “yum remove asterisk14-core-1.4.36-1_centos5.x86-64”, then launch again “yum -y install bigbluebutton”

At this point, bigbluebutton should work fine from the local machine (if you are doing that on a CentOS5.5 server without graphical interface, try installing lynx and launching lynx localhost. If you see text saying BigBlueButton, you’re OK), but accessing this server from another machine might not work (could not connect, error 500, etc). This is (most probably) because your server has an iptables (default firewall) configuration preventing access on port 80 to your server from another computer. The quick solution to try it is to shut down iptables with “/etc/init.d/iptables stop” and try connecting again. If that works, then you’ll have to setup your firewall properly.

Finally, to install the desktop sharing utility, you will have to launch “yum install bbb-apps-deskshare”.

You might also be interested (as a backup- into a guide that explains how to install BigBlueButton on CentOS5.4 step by step: http://code.google.com/p/bigbluebutton/wiki/InstallingBigBlueButtonCentOS

BBB 0.70 seems to install fine on top of the 0.64, but the sound doesn’t work and the whiteboard features are not registering write operations (just showing on screen).