Skip to content

Instantly share code, notes, and snippets.

@achimnol achimnol/install-tmux.sh forked from suhlig/install-tmux
Last active Jun 2, 2019

Embed
What would you like to do?
Install tmux on rhel/centos 7
# Install tmux on rhel/centos 7
# install deps
yum install gcc kernel-devel make ncurses-devel
LIBEVENT_VERSION=2.1.8
TMUX_VERSION=2.9
PREFIX="${HOME}/.local/bin" # user-only install (change to /usr/local for global install)
SUDO="" # change to "sudo" to install on /usr/local
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-${LIBEVENT_VERSION}-stable/libevent-${LIBEVENT_VERSION}-stable.tar.gz
tar -xvzf libevent-${LIBEVENT_VERSION}-stable.tar.gz
cd libevent-${LIBEVENT_VERSION}-stable
./configure --prefix=${PREFIX}
make
$SUDO make install
cd ..
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -OL https://github.com/tmux/tmux/releases/download/${TMUX_VERSION}/tmux-${TMUX_VERSION}.tar.gz
tar -xvzf tmux-${TMUX_VERSION}.tar.gz
cd tmux-${TMUX_VERSION}
LDFLAGS="-L${PREFIX}/lib -Wl,-rpath=${PREFIX}/lib" ./configure --prefix=${PREFIX}
make
$SUDO make install
cd ..
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.