首先下载tmux的安装包:
代码语言:javascript复制https://github.com/tmux/tmux/releases
下载依赖库
代码语言:javascript复制wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
安装库
代码语言:javascript复制tar xvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable/
./configure && make
sudo make install
安装tmux
代码语言:javascript复制tar xvf tmux-3.1-rc4.tar.gz
cd tmux-3.1-rc4/
./configure && make
sudo make install
sudo ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
此时,目录下车下生成tmux程序。将这个目录添加到PATH即可。