Build tmux on CentOS 7
If you need to install tmux 2.8 or tmux 2.9 on CentOS 7, here’s the quick way to get it installed.
cd /tmp
sudo yum remove -y tmux
git clone https://github.com/tmux/tmux.git
cd tmux
git checkout 2.9a
sudo yum install -y libevent-devel ncurses-devel automake
sh autogen.sh
./configure && make
sudo make install
cd -
tmux -V
Breakdown
Move to /tmp directory since we don’t really care about where we download the source file.
cd /tmp
Remove previously installed tmux
sudo yum remove -y tmux
Download source from GitHub.
git clone https://github.com/tmux/tmux.git
Move into source directory
cd tmux
Check out current stable version. Change 2.9a to whatever version is most current at the time.
git checkout 2.9a
Install libevent, ncurses, and automake as they are requirements.
sudo yum install -y libevent-devel ncurses-devel automake
Run autogen.sh.
sh autogen.sh
Configure, make, and install.
./configure && make
sudo make install
Go back to previous directory.
cd -2
Check tmux version.
tmux -V