Skip to content

Instantly share code, notes, and snippets.

@kitos9112
Forked from suhlig/install-tmux
Last active June 20, 2020 09:21
Show Gist options
  • Save kitos9112/8907c420435ce1e1fc6e99de0e994131 to your computer and use it in GitHub Desktop.
Save kitos9112/8907c420435ce1e1fc6e99de0e994131 to your computer and use it in GitHub Desktop.
Install from source TMUX VERSION 3.1 on rhel/centos/fedora/amazonLinux2 7 -- This gist also takes care of installing developer dependencies for the compilation phase
#!/bin/bash
TMUX_VERSION=3.1b
# Install tmux version 3.1 on rhel/centos 7
# Single command:
###$> curl -Ls https://gist.githubusercontent.com/kitos9112/8907c420435ce1e1fc6e99de0e994131/raw/d5c4965b541e6348c882c9546bcfb08f74788784/get-tmux | bash
# install deps
sudo -E yum install gcc kernel-devel make ncurses-devel -y
# DOWNLOAD SOURCES FOR LIBEVENT, CONFIGURE, MAKE, AND INSTALL
curl -o /tmp/libevent-2.1.11-stable.tar.gz -L https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -xvzf /tmp/libevent-2.1.11-stable.tar.gz -C /tmp
cd /tmp/libevent-2.1.11-stable
./configure --prefix=/usr/local && make
sudo make install
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -o /tmp/tmux-${TMUX_VERSION}.tar.gz -L https://github.com/tmux/tmux/releases/download/3.1/tmux-${TMUX_VERSION}.tar.gz
tar -xvzf /tmp/tmux-${TMUX_VERSION}.tar.gz -C /tmp
cd /tmp/tmux-${TMUX_VERSION}
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment