Jump to content

Guide - How to update cURL in CentOS - Centmin Mod


Recommended Posts

Posted

For us guys that use centOS and CentminMod, we know that that it brings allways a set of well established (and often a bit old) libraries. Stability, they say, but sometimes it gets annoying, as it happens with cURL, and consequently libCurl in PHP.

Well the problem with updating cURL in PHP is that in CentminMod's PHP is compiled when installed. So this means that when it is compiled it hardcodes the cURL library that you have at the moment.

The best solution is to:

1) Delete the cURL version that you have.
2) Install the new one
3) Update PHP version (recompile)

 

Here is the step-by-step process:

1) Remove the cURL version that you have:

yum remove curl curl-devel

2) Download the cURL version you need (for example: 7.45.0)

wget http://curl.haxx.se/download/curl-7.45.0.tar.bz2

3) Extract it:

tar xfj curl-7.45.0.tar.bz2

4) Install it (execute each line after finishing the previous one):

cd curl-7.45.0
./configure --prefix=/usr
make
make install

5) Check the cURL version (you should see now the version you have just finished installing)

curl -V

 

At this point you are ready shall now reinstall/update PHP (compiling it) through the centmin.sh. If you don't do it, as libCURL is hardcoded in PHP, you will still see php as using the old version. If you cannot access to centmin.sh, you can use the following options to compile php (this is for the 64-bit CentOS):

../configure  --enable-fpm --enable-intl --enable-pcntl --with-mcrypt --with-snmp --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --with-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-vpx-dir=/usr --with-t1lib=/usr --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --disable-fileinfo --with-config-file-scan-dir=/etc/centminmod/php.d

 

Posted

Ha, I was just looking for this over on the Centmin Mod forum!  Good timing.

Hmmm... I get an error.  

Error: Trying to remove "yum", which is protected

Why would it be trying to remove yum?

Posted

Guess you folks need to join up on Centmin Mod Community forums - already taken care of via custom curl 7.45+ rpm packages via customcurl.sh Centmin Mod addon outlined at https://community.centminmod.com/threads/centmin-mod-curl-7-43-custom-rpms.3703/:)

As to yum, Centmin Mod uses yum priorities as outlined at http://centminmod.com/yum.html

oh DO NOT yum remove curl as CentOS OS has alot stuff dependent on this and you can break stuff !

Posted
6 hours ago, Bluto said:

Ha, I was just looking for this over on the Centmin Mod forum!  Good timing.

Hmmm... I get an error.  


Error: Trying to remove "yum", which is protected

Why would it be trying to remove yum?

It tries but it can't. :) I suppose it's has some kind of related dependency.

3 hours ago, p4guru said:

oh DO NOT yum remove curl as CentOS OS has alot stuff dependent on this and you can break stuff !

I've done it in 3 CentOS 6.x servers, no problems till now.

I agree that it should be included by default in centmin mod, though :)

Posted

I'm on Centos 7... maybe that's the issue.  I guess it's trying to remove the dependencies.  But why would yum be a dependency?  It was a weird error.  Maybe I should post it on the forum and see what eva2000 thinks.

I'm having a real issue with any posting of twitter / instagram on my 4.1 install.  Youtube is working fine.

Posted

Oh yes, now that i see maybe i've screwed postfix. 

I've put it working again, but my suggestion it's not worth the work... I cannot edit my first post to prevent someone doing this, please and if you have the centminmod just do it though their addon.

Posted

Do your twitter embeds work?  I updated to the latest cURL but can't get the twitter embeds or instagram embeds to work on the forum.

Pasting the link below and hitting return just gives me a white "iframe" box.

https://twitter.com/RollingStone/status/667131242601717760

Youtube works fine, videos are showing up great.  They both use an iframe but twitter uses ipsEmbeddedOther vs. ipsEmbeddedVideo. 

I made a test post in the test post forum here and the twitter works here.  

I also tested by clearing everything out of the vhost file, thinking that something was blocked.  Still nothing.  I'm running on a stock system with no additional plugins added to the suite.

Are your Twitter embeds working on your install?

Posted

On RHEL7/Centos7 I did this. Hopefully it helps someone.

wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.45.0-1.0.cf.rhel7.x86_64.rpm

wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-7.45.0-1.0.cf.rhel7.x86_64.rpm

wget http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/libssh2-1.6.0-3.0.cf.rhel7.x86_64.rpm

 wget http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/libssh2-devel-1.6.0-3.0.cf.rhel7.x86_64.rpm

yum update libcurl-7.45.0-1.0.cf.rhel7.x86_64.rpm curl-7.45.0-1.0.cf.rhel7.x86_64.rpm libssh2-1.6.0-3.0.cf.rhel7.x86_64.rpm libssh2-devel-1.6.0-3.0.cf.rhel7.x86_64.rpm 

service php70-php-fpm restart

 

Using REMI repo for php70 and php70-php-fpm 

Using official Nginx repo for nginx1.9.7

 

 

Posted
4 minutes ago, maddog107_merged said:

On RHEL7/Centos7 I did this. Hopefully it helps someone.


wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.45.0-1.0.cf.rhel7.x86_64.rpm

wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-7.45.0-1.0.cf.rhel7.x86_64.rpm

wget http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/libssh2-1.6.0-3.0.cf.rhel7.x86_64.rpm

 wget http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/libssh2-devel-1.6.0-3.0.cf.rhel7.x86_64.rpm

yum update libcurl-7.45.0-1.0.cf.rhel7.x86_64.rpm curl-7.45.0-1.0.cf.rhel7.x86_64.rpm libssh2-1.6.0-3.0.cf.rhel7.x86_64.rpm libssh2-devel-1.6.0-3.0.cf.rhel7.x86_64.rpm 

service php70-php-fpm restart

 

Using REMI repo for php70 and php70-php-fpm 

Using official Nginx repo for nginx1.9.7

 

 

This thread is actually for CENTMIN MOD which is a customized LEMP stack.

http://centminmod.com/

Anyone who wants to upgrade cURL using CENTMIN MOD will have to do so using the scripts in the addons folder.  According to the developer, installing any outside direct update could break the system.

Obviously, anyone who is using their own LEMP stack could download the links you provided and update cURL.

Posted

^ Yeah I forgot to say sorry to change the topic, dont think it merited another thread for my post, so I just hijacked your guys. I found this thread looking for a solution to my own LEMP stack so figured its as good place as any. Sorry :)

Posted
1 minute ago, maddog107_merged said:

^ Yeah I forgot to say sorry to change the topic, dont think it merited another thread for my post, so I just hijacked your guys. I found this thread looking for a solution to my own LEMP stack so figured its as good place as any. Sorry :)

You should take a look at CENTMIN MOD.  I wouldn't use anything else.  Some people want to customize everything, but I've found that the developer of CENTMIN MOD has already done most everything I was going to do anyway. :grin:

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...