Skip to content

May 6, 2015

1

Upgrading ICU to Install OroCRM on CentOS 5

Recently the crew over at Classy Llama decided to finally jump on board the OroCRM train and begin the process of implementing the software for our own internal use. Sometimes I’m known as the server dude internally, and that’s exactly how I come into play in this endeavor. The question always must be answered, where will we host it? In my neck o’ the woods we run our software on old-fashioned bare-metal servers, which does mean we have some older software than I’d like at times. And the server we’ve got over here which will have OroCRM added to it’s responsibility list is one of those machines which has been around a few years. It’s running CentOS 5 still! Who runs CentOS 5? Yeah. Old. And with OroCRM being a modern piece of software and all, it quickly became upgrade time.

What needed upgrading? A few things. PHP, MySql… and ICU. The first two were obvious, and needed to be upgraded anyways, so I did, missing the latter. Found that one when I tried to run composer install on the code to deploy it. OroCRM uses a Symfony component which requires ICU v4.4 or higher. The latest packaged version available in this case is v3.6. Even CentOS 6 only has packages for ICU v4.2! Solution? Turns out it’s not all that complicated. Install our own versions of ICU and the PHP intl extension compiled against this version of the ICU lib.

In my case, I chose to install ICU 4.4 instead of the latest version since there are pre-compiled binaries of ICU 4.4 for CentOS 5 available on http://site.icu-project.org. Were I running CentOS 6 I would have most likely gone with the very latest version of ICU.

Here’s how… (running as root):

    # remove the php-intl package built against the native icu version
    yum remove php-intl

    # make sure we have the developer packages needed for procedure
    yum -y install php-devel php-pear

    # download and unpackage tar which code for relevant ICU lib version
    mkdir src
    cd src/
    wget http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.tgz
    tar zxf icu4c-4_4_2-src.tgz

    # build and install the library into /opt/icu4c-44_2
    cd icu/source/
    ./configure --prefix /opt/icu4c-44_2 && make && make install

    # build and install the php-intl version
    # enter /opt/icu4c-44_2 at prompt for ICU library location
    pecl install intl
    ldconfig

    # add an ini file wity contents: extension=intl.so
    vi /etc/php.d/intl.ini

    # you can now check to see if it's loaded
    php -i | grep intl

    # restart the apache web server and you're good to go
    service httpd restart

Now go have fun playing with your new OroCRM setup!

Read more from SysOps
1 Comment Post a comment
  1. Sep 18 2015

    Thank you; you probably just saved me a lot of messing around. It took me long enough to figure out that an insufficient ICU version for the version of intl I was trying to build was even the problem!

    One note for anyone else trying this: if you’re currently using the version of intl compiled into php, when you try to enable your shiny new module, you will get warnings like this in your php log: PHP Warning: Module ‘intl’ already loaded in Unknown on line 0. That’s because the built-in version is conflicting with the module. You need to recompile php without the –enable-intl flag.

    Reply

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments