1. 获取源码
git clone https://github.com/tmux/tmux.git ~/tmux
2. 准备工作
2.1 安装ncurses开发库
yum install ncurses-devel -y
2.2 安装libevent
git clone https://github.com/libevent/libevent.git ~/libevent
cd libevent
sh autogen.sh
./configure
make -j 4
make install
cd ..
3. 编译安装
cd ~/tmux
sh autogen.sh
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
make -j4
su root
make install
ln -sf /usr/local/lib/libevent-2.2.so.1 /lib64/libevent-2.2.so.1