Adapted from https://gist.github.com/rothgar/cecfbd74597cc35a6018
Remove existing tmux package, if any:
yum remove tmux
Install dependencies:
yum install -y gcc kernel-devel make ncurses-devel
Download and install libevent:
curl -LO https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar xvzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
make
sudo make install
Download and install libevent:
cd -
curl -LO https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
tar xvzf tmux-2.3.tar.gz
cd tmux-2.3
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
sudo make install
Clear bash's command hash for tmux, then check version:
hash -d tmux
tmux -V