惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
Engineering at Meta
Engineering at Meta
美团技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 司徒正美
I
InfoQ
S
SegmentFault 最新的问题
博客园 - 叶小钗
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
IT之家
IT之家
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
月光博客
月光博客
The Cloudflare Blog
U
Unit 42
GbyAI
GbyAI
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - Showker

ecstore-bbc-本地做域名-验证码不显示 mac 源码安装php8.4 免费ssl证书在线生成 验证码平台 Shopify应用开发创意与盈利指南 shopify-app开发实战 ssl免费在线生成 git自动拉取脚本 佳能单反相机连接抖音直播伴侣没有画面只有Eos Webcam Unity问题解决办法 thinkphp5碰到mysql占用CPU100%问题,原来是大量的SHOW COLUMNS FROM导致 centos7 升级curl命令,php不变问题 mysql联合索引优化 msyql leftjoin及大表-分表优化 等保-linux-三权分立账号设置 阿里云负载均衡全过程:ECS图片资源迁移OSS操作全过程 设置PHP最大连接数及php-fpm -static高并发+ab测试 谷歌ai平台测试。真的很好用 通义1.8B开源大模型实战及微调 php对接海康卫视NVR监控设备全过程-互联网(公网)快速集成设备
centos 更新curl版本
Showker · 2024-07-24 · via 博客园 - Showker

How to Build and Install Latest cURL Version on CentOS

# Written by The Suhu (2021).

# Tested on CentOS 7 and CentOS 8

Previously I've written about How to Build and Install Latest cURL Version on Ubuntu. In this article in this article explain how to build and install latest cURL version on CentOS.

The default cURL installed on the operating system may not be the latest version. if you want the latest version, then you need to build from the source. Let’s check the cURL version installed with the following command.

[thesuhu@centos-8-1 ~]$ curl --version
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.6 libidn2/2.2.0 libpsl/0
.20.2 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.33.0
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps 
telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSocke
ts HTTPS-proxy PSL 

Above shows the installed cURL version 7.61.0. While currently the latest version of cURL is 7.80.0. Go to https://curl.se/download/ to check the latest cURL version.

Download cURL latest version

Before we download the latest version of cURL, let’s update the system. It’s optional but I prefer to do this to keep the installed packages up to date.

Install required packages.

sudo yum install wget gcc openssl-devel make -y

Download the latest cURL source. In this tutorial we will download 7.80.0 version.

wget https://curl.haxx.se/download/curl-7.80.0.tar.gz

Then extract the downloaded.

tar -xzvf curl-7.80.0.tar.gz

Building cURL

Go to the extracted directory of downloaded cURL source file.

Now it’s time to build with configure command.

./configure --prefix=/usr/local --with-ssl

Make sure there are no errors from the above command execution. If there are no errors, finally we can install it with the make command.

make
sudo make install
sudo ldconfig

New version check

To make sure the new version is installed successfully, open a new session from terminal/ssh and run the command:

[thesuhu@centos-8-1 ~]$ curl --version
curl 7.80.0 (x86_64-pc-linux-gnu) libcurl/7.80.0 OpenSSL/1.1.1k-fips zlib/1.2.11
Release-Date: 2021-11-10
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet 
tftp 
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

The cURL version should be 7.80.0.

The fast way

If you don't want to bother running commands one by one, you can create the script file below and run it.

#! /bin/bash

# Tested on CentOS 7 and CentOS 8
# Check the latest version at https://curl.se/download/
VERSION=7.80.0

cd ~
sudo yum update -y
sudo yum install wget gcc openssl-devel make -y
wget https://curl.haxx.se/download/curl-${VERSION}.tar.gz
tar -xzvf curl-${VERSION}.tar.gz 
rm -f curl-${VERSION}.tar.gz
cd curl-${VERSION}
./configure --prefix=/usr/local --with-ssl
make
sudo make install
sudo ldconfig
cd ~
rm -rf curl-${VERSION}

That's all and if you find it useful please star (⭐) & share.