centos 安装或更新最新版本软件包(git python etc)的方法 SCL IUS
使用centos 经常发现官方提供的软件包版本过低,很多时候大家会选择下载源码自行编译,带来了很多麻烦。
centos安装最新版本软件包,例如git,python等,可以通过红帽官方提供的software collection,或者社区提供的ius实现。
IUS
IUS是一个社区维护的软件源,全名是Inline with Upstream Stable,官网为https://ius.io/,通过github组织社区https://github.com/iuscommunity
IUS被git帮助文档推荐作为centos等系统安装新版本git的第三方源:https://git-scm.com/download/linux
安装IUS是直接安装软件包,并不像SCL还带了虚拟环境的概念。所以使用起来相对简单。
安装git命令:
yum install epel-release
rpm -U https://centos7.iuscommunity.org/ius-release.rpm
yum remove git
yum install git2u
IUS为了避免与官方源冲突,所以对软件包名进行了修改, 规则为:{name}{major_version}{minor_version}u 。
IUS支持的软件包,可通过github查询
IUS直接访问速度不是很理想,可以设置国内镜像可编辑 /etc/yum.repos.d/ius.repo,将官方网址修改为镜像地址
IUS 站点根目录为:https://dl.iuscommunity.org/pub/ius/
对应的阿里云镜像为:https://mirrors.aliyun.com/ius/
镜像列表:https://mirrors.iuscommunity.org/mirrors
清华大学镜像:https://mirrors.tuna.tsinghua.edu.cn/ius/
同济大学镜像:https://mirrors.tongji.edu.cn/ius/
[ius]
name = IUS for Enterprise Linux 7 - $basearch
baseurl = https://mirrors.tuna.tsinghua.edu.cn/ius/7/$basearch/
enabled = 1
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
[ius-debuginfo]
name = IUS for Enterprise Linux 7 - $basearch - Debug
baseurl = https://mirrors.tuna.tsinghua.edu.cn/ius/7/$basearch/debug/
enabled = 0
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
[ius-source]
name = IUS for Enterprise Linux 7 - Source
baseurl = https://mirrors.tuna.tsinghua.edu.cn/ius/7/src/
enabled = 0
repo_gpgcheck = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-IUS-7
参考:
https://www.cnblogs.com/f-ck-need-u/p/8494992.html
SCL
scl不是一个简单的包管理工具,而是类似python的venv(virtualenv) 。它可以支持系统同时安装多个版本的软件,然后通过scl enable命令来激活相应软件环境,而不会对原始的软件环境产生影响。
以git安装和启用为例:
yum install centos-release-scl
yum install rh-git29
scl enable rh-git29 bash ##激活git的打开bash
git --version
但是对于我们而言,如果不需要这么复杂的虚拟环境功能,单纯想要使用其提供的最新版本软件,可以通过 source scl_source enable 命令实现。
如果需要系统重启后,能够自动启动最新版本软件环境,可进行以下配置:
#通过bash环境来设定,仅对特定用户启用
vi ~/.bashrc # or ~/.bash_profile
source scl_source enable rh-git29
或者
#对全局用户启用
vi /etc/profile.d/enable_scl.sh
#!/bin/bash
source scl_source enable rh-git29
或者
scl enable rh-git29 bash
which git
/opt/rh/rh-git29/root/usr/bin/git
ln -s /opt/rh/rh-git29/root/usr/bin/git /usr/bin/git
参考:
https://www.softwarecollections.org/en/docs/
http://xmodulo.com/enable-software-collections-centos.html
https://unix.stackexchange.com/questions/175851/how-to-permanently-enable-scl-centos-6-4
https://serverfault.com/questions/751155/permanently-enable-a-scl
https://access.redhat.com/solutions/527703
通过上述两个源,大家在使用centos时,或许可以减少安装软件的工作量。
centos 安装或更新最新版本软件包(git python etc)的方法 SCL IUS的更多相关文章
- Ubuntu18.04 LTS 安装部署golang最新版本1.10
1 步骤 //1 直接安装golang-go 目前最新版本是1.10 sudo apt-get install golang-go //2 向/etc/profile追加以下代码 sudo vim / ...
- 在 CentOS 6.x 上安装最新版本的 git
在 CentOS 的默认仓库中有git,所以最简单的方法是: $ sudo yum install git 这种方法虽然简单,但是一般仓库里的版本更新不及时,比如 CentOS 仓库中的 git 最新 ...
- centos7 安装docker-ce ,最新版本docker,docker阿里云加速
直接用yum install docker -y安装的docker版本为1.12,但是docker发展很快,现在都17.06.2了.docker-ce是指docker的社区版 卸载老版本的 docke ...
- Centos安装JIRA 7.13版本(自己在官方下载最新版)以及破解
后半部分流程来自:https://www.cnblogs.com/kaola8023/p/6950481.html 安装准备(切记将许可证号备份) 1.准备mysql需要5.6以及以上的版本(注意:建 ...
- CentOS安装JAVA后JAVA版本不对的问题
今天用CentOS安装JDK,发觉在安装完成后,输入java命令来验证是否安装成功时,出现 Usage: gij [OPTION] ... CLASS [ARGS] ... to i ...
- 安装node的最新版本
前段时间小试了一下node 这段时间就差不多忘了 恩 然后现在自己想去回顾一下,然后流程想再好好弄一遍 争取掌握node 因为我现在已经安装了 一个node版本 那我想安装最新版本吧 首先,看看你的n ...
- CentOS 安装 git2.x.x 版本
方法一 源码方式安装 第一步:卸载旧的git版本. $ yum remove git 第二步:下载git $ wget --no-check-certificate https://www.kerne ...
- CENTOS 升级Nodejs 到最新版本
1.去官网下载和自己系统匹配的文件: 英文网址:https://nodejs.org/en/download/ 中文网址:http://nodejs.cn/download/ 通过 uname -a ...
- Centos安装(更新)git(亲测有效)
Centos 6.5默认安装的是git 1.7.X 版本,使用过程中会有一些奇怪的问题,对于用户名.密码支持不是很友好.将Centos6.5上的git更新到2.0.5,方法如下: 1.安装编译git时 ...
随机推荐
- C++官方文档-常量成员函数
#include <iostream> using namespace std; class MyClass { public: int x; static int n; const in ...
- ucenter 认证登录
1==>new RegisterBase($email, $password, $repassword, $client_id, $client_secret, $is_from) 1.1 ...
- sqoop2的安装配置
1.下载 wget http://mirror.bit.edu.cn/apache/sqoop/1.99.7/sqoop-1.99.7-bin-hadoop200.tar.gz 2.解压 tar -z ...
- leetcode349
public class Solution { public int[] Intersection(int[] nums1, int[] nums2) { var list1 = nums1.ToLi ...
- IdUDPServer中文汉字乱码 及IdTCPClient
官网 http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=TIdTCPServer_OnExec ...
- EOF与子过程返回
在2000及其以上系统,P处理语句GOTO新增了:EOF系统标签,意思是移动到当前P处理文件的结尾,EOF==END OF FILE的缩写,意为文件结尾,主要表现形式为:GOTO :EOFOR ...
- select 实现多路复用IO的server_socket
select 对程序进行同时检测,当发生响应时,数据被拷贝到内核区域,内核区通知用户程序来进行读取数据,内核区域并不知道是客户端连接,因此需要进行循环 server_socket 端 import s ...
- RESTful介绍和使用教程
出自:https://blog.csdn.net/x541211190/article/details/81141459 一.REST起源REST(Representational State Tra ...
- 使用Eclipse对FFmpeg进行调试
在研究代码的过程中,调试运行是一种非常有效的方法.我们常用的Visual Studio建立的工程可以很方便地对程序进行调试运行.但是对于FFMpeg这样的工程,想要进行单步调试就没这么容易了.如果一定 ...
- postgresql 的操作
基本操作: \o /tmp/11.txt ,查询结果输出到文件 \d 查询table结构 \x 切换显示方式 postgresql中可以导出某个sql的执行结果到文件中,方法是在psql中首先执行\o ...