CentOS 7.x 升级系统内核
安装EPEL源$ rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org$ yum install -y https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
内核升级查看内核版本并安装最新版本(这里安装LT长期支持的版本 5.4.225 ):
$ yum --disablerepo="*" --enablerepo="elrepo-kernel" list availableLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * elrepo-kernel: mirrors.tuna.tsinghua.edu.cnAvailable Packageskernel-lt.x86_64 ...
CentOS 7.6 编译安装 Git 2.x.x
卸载旧版本Git$ yum remove -y git
下载Git源码包$ wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.36.2.tar.gz
安装依赖包$ yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel$ yum install -y gcc perl-ExtUtils-MakeMaker# 解决 SSL connect error$ yum update -y nss curl libcurl
编译安装新版本Git# 解压缩软件包$ tar -zxvf git-2.36.2.tar.gz$ cd git-2.36.2# 创建要安装的目录$ mkdir -p /usr/local/git# 编译安装$ ./configure --prefix=/usr/local/git$ make && make install
添加环境变 ...
Linux 编译安装 Python3.8
下载源码包进入Python官网,下载指定版本的源码包。
这里以python3.8.13为例:
$ wget https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz
编译源码安装编译所需的依赖:
$ yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
进行编译安装:
$ tar xf Python-3.8.13.tgz$ cd Python-3.8.13$ ./configure --prefix=/usr/local/python3.8/ # /usr/local/python3.8/ 是安装的目录$ make && make install
配置环境变量$ echo -e " ...