Руководство по установке Bash 5+ в CentOS. Bash — усовершенствованная и модернизированная вариация командной оболочки Bourne shell.
Проверка используемой версии Bash
В CentOS 8 Stream используется Bash 4.4.20, првоерить используемую версию можно командой
bash --version
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Установка Bash 5 в CentOS 7/8
На данный момент последний стабильный релиз Bash - 5.1.16. Этот выпуск недоступен в стандартных репозиториях, потребуется собрать его из исходников.
Перед началом установки рекомендуется обновить систему
yum -y update
Уста наливаем инструменты разработчика
yum -y groupinstall "Development Tools"
Скачиваем архив с Bash 5.1.16
curl -O https://ftp.gnu.org/gnu/bash/bash-5.1.16.tar.gz
Распаковываем скачанный архив
tar xvf bash-5.1.16.tar.gz
Переходим в директорию и создаем makefile необходимый для сборки
cd bash-5.1.16
./configure
по окончании сборку, необходимо убедится что нет ошибок
configure: creating ./config.status
config.status: creating Makefile
config.status: creating builtins/Makefile
config.status: creating lib/readline/Makefile
config.status: creating lib/glob/Makefile
config.status: creating lib/intl/Makefile
config.status: creating lib/malloc/Makefile
config.status: creating lib/sh/Makefile
config.status: creating lib/termcap/Makefile
config.status: creating lib/tilde/Makefile
config.status: creating doc/Makefile
config.status: creating support/Makefile
config.status: creating po/Makefile.in
config.status: creating examples/loadables/Makefile
config.status: creating examples/loadables/Makefile.inc
config.status: creating examples/loadables/perl/Makefile
config.status: creating support/bash.pc
config.status: creating support/bashbug.sh
config.status: creating config.h
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing default commands
собираем и устанавливаем Bash 5 в системе
make
make install
По окончанию установки, проверяем версию bash:
bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.