zsh5.9 is the latest right now, so I have updated this article
The zsh on CentOS7/8 is old, so I installed the latest version at this point, 5.9, by hand
Preparation
Since we use commands such as wget and make, install the developer tools first
$ export LANG=C
$ sudo yum groupinstall "Development Tools"
$ sudo yum install ncurses-develDownloading and installing
/usr/bin/zsh and /bin/zsh already exist, so install into /usr/local
$ wget https://jaist.dl.sourceforge.net/project/zsh/zsh/5.9/zsh-5.9.tar.xz
$ tar xf zsh-5.9.tar.xz
$ cd zsh-5.9
$ ./configure --prefix=/usr/local --enable-multibyte
$ make
$ sudo make installAppend it to /etc/shells
# echo /usr/local/bin/zsh >> /etc/shellsAfter that, switch to /usr/local/bin/zsh with the chsh command
Incidentally, for LDAP users a little bit of fixing is needed
Overriding the LDAP shell with a different shell
PATH
If you want programs inside /usr/local/bin to be used with priority across the whole system, change the PATH inside /etc/init.d/functions
-PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+PATH="/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin"
export PATH