原文:https://gist.github.com/rothgar/cecfbd74597cc35a6018
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make
sudo make install
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.9a.tar.gz
tar -xvzf tmux-1.9a.tar.gz
cd tmux-1.9a
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
sudo make install
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V
===============================
如果安装报错:
tmux的使用–窗口管理器
Tmux介绍:
Tmux是BSD实现的Screen替代品,相对于Screen,它更加先进:支持屏幕切分,而且具备丰富的命令行参数,使其可以灵活、动态的进行各种布局和操作。它可以做到一条命令就启动起来(强大的配置),左侧是终端,右侧是Vim,下面来一个gdb――总之它就是一个灵活的IDE,任仍你配置。
效果如下图:
(1)tmux执行make时报错:
control.c: In function ‘control_callback’:
control.c:103: warning: implicit declaration of function ‘evbuffer_readln’
control.c:103: error: ‘EVBUFFER_EOL_LF’ undeclared (first use in this function)
control.c:103: error: (Each undeclared identifier is reported only once
control.c:103: error: for each function it appears in.)
make: *** [control.o] Error 1