tmux終端複用安裝教程(非root用戶)
如果不是服務器管理員的話,需要從源碼安裝,首先下載安裝包:
執行命令:
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
wget http://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz
用 tar -zxvf 命令解壓
安裝
#libevent
./configure --prefix=$HOME/.local --disable-shared
make
make install
#ncurses
./configure --prefix=$HOME/.local
make
make install
#tmux
./configure CFLAGS="-I$HOME/.local/include -I$HOME/.local/include/ncurses" LDFLAGS="-L$HOME/.local/lib -L$HOME/.local/include/ncurses -L$HOME/.local/include" CPPFLAGS="-I$HOME/.local/include -I$HOME/.local/include/ncurses" LDFLAGS="-static -L$HOME/.local/include -L$HOME/.local/include/ncurses -L$HOME/.local/lib"
make
cp tmux $HOME/.local/bin
然後配置環境:
vim ~/.bashrc
#將下面的語句添加到.bashrc中
export $PATH="$HOME/.local/bin:$PATH"
重載環境
source .bashrc
安裝完成