Installing Libmcrypt on a Godaddy Virtual Dedicated Server

UPDATE: Using this article at http://www.hagrin.com/315/installing-mcrypt-a-godaddy-linux-virtual-dedicated-server-vds I was able to install mcrypt on a Godaddy Virtual Dedicated Server in just a few steps:

  1. SSH into your VDS with your favorite SSH client or the SSH Java applet offered by GoDaddy.
  2. Login with your credentials.
  3. Su to the root user.
  4. Type “yum install libmcrypt”. Say yes to the prompts.
  5. Type “yum install php-mcrypt”. Say yes to the prompts.
  6. Restart the server using “/usr/sbin/apachectl restart”.

 

We recently deployed a web site using GoDaddy’s virtual dedicated server. Everything about the default PHP installation was fine, except that libmcrypt was not available. When I asked the godaddy support staff “How do we enable libmcrypt for PHP?” their response was far from helpful:

Thank you for contacting Server Support. Unfortunately 3rd party installations and configurations are not supported.

Rather than argue with the support team about what constitutes a 3rd party installation, I decided to google around and see if I could do it myself. Hours later, I succeeded. Here are the steps for installing libmcrypt:

  1. su root
  2. yum install gcc-c++
  3. yum install lex
  4. yum install libxml2
  5. yum install libxml2-devel
  6. yum install flex
  7. wget http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0
  8. tar -xzvf libmcrypt-2.5.8.tar.gz
  9. cd libmcrypt-2.5.8
  10. ./configure
  11. make
  12. make install
  13. wget http://museum.php.net/php5/php-5.1.6.tar.gz
  14. tar -xzvf php-5.1.6.tar.gz
  15. cd php-5.1.6
  16. ./configure –with-mcrypt=shared,/usr/local/lib
  17. make (after running ‘make’, DO NOT RUN ‘make install’)
  18. cp modules/mcrypt.so /usr/lib/php/modules/
  19. Add a file /etc/php.d/mcrypt.ini
    ; Enable mcrypt extension module
    extension=mcrypt.so
  20. /usr/sbin/apachectl restart

That’s it! To confirm a successful install, just run phpinfo() and look for the mcrypt section

Tags: , ,
Related posts
Bookmark: Post to Del.icio.us Post to Digg Post to Google Post to Ma.gnolia Post to MyWeb Post to Newsvine Post to Reddit Post to Simpy Post to Slashdot Post to Technorati

6 Responses to “Installing Libmcrypt on a Godaddy Virtual Dedicated Server”

  1. Bookmarks about Module Says:

    [...] – bookmarked by 3 members originally found by strexy on 2008-07-18 Installing Libmcrypt on a Godaddy Virtual Dedicated Server [...]

  2. Jason Johnson Says:

    A few notes:

    1. Check your PHP version. On our new GoDaddy Virtual Dedicated account, they installed 5.2.4 for us. Change “5.1.6″ in the above instructions to your version, otherwise Step 18 will fail since no “mcrypt.so” module was created.

    2. Be careful copying and pasting Step 16. There’s an em-dash in there that my Linux terminal translated into “.”. Try this string instead: “./configure -with-mcrypt=shared,/usr/local/lib”

  3. John Says:

    Thanks for the revisions. Wordpress must have converted the two repeating dashes into an em dash, similar to how MS Word does it.

  4. Jason Johnson Says:

    I figured as much. Thanks for the great writeup — I have a web app that relies heavily on the mcrypt module and this guide worked perfectly for us!

  5. Jane Says:

    Useful info, nice blog, thanks.

  6. Gerald Frederick Says:

    This is why I love blogs. Wouldn’t have know this otherwise.

Leave a Reply