5/22/2018 - 10:18 AM

Install the latest tmux (2.3 now) on CentOS 6.8

## you may need sudo permission to execute some commands or swith to root
# if installed old version by yum, remove it first
# sudo yum remove tmux libevent libevent-devel libevent-headers

# install deps
sudo yum install gcc kernel-devel make ncurses-devel

# create temp dir
mkdir /tmp/for-latest-tmux

# downloads libenvent and install
cd /tmp/for-latest-tmux/ && mkdir ./libenvent && cd ./libenvent
tar -zxvf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable/
./configure && make
sudo make install

# downloads tmux and install
cd /tmp/for-latest-tmux/ && mkdir ./tmux && cd ./tmux
tar -zxvf tmux-2.3.tar.gz
cd tmux-2.3/
# other examples are missing this LDFLAGS part to correctly link the new copy of libevent
./configure LDFLAGS="-Wl,-rpath,/usr/local/lib" && make
sudo make install

# kill the running tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
pkill tmux
tmux -V

# remove temp dir if needed
rm -rf /tmp/for-latest-tmux