Fork me on GitHub

从源码安装tmux

方案一:从二进制包安装

On Debian/Ubuntu based

1
$ sudo apt-get install tmux

On RedHat/CentOS based

1
$ sudo yum isntall tmux

方案二:从源码安装

1.下载源文件和依赖

2.安装依赖

1
$ sudo yum install gcc kernel-devel make ncurses-devel y

3.安装libevent2

1
2
3
4
$ export DIR="$HOME/.local"
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR/lib
$ ./configure --prefix=$DIR CFLAGS="-I$DIR/include" LDFLAGS="-L$DIR/lib"
$ make && make install

4.安装tmux

1
2
3
$ sh aotogen.sh
$ ./configure && make
$ sudo make install

注:如果没有管理员权限,那么需要配置prefix到自己目录

参考文献