Skip to content

Instantly share code, notes, and snippets.

@suhlig
Forked from philipsd6/install-tmux
Last active October 12, 2023 21:25
Show Gist options
  • Save suhlig/c8b8d70d33462a95d2b0307df5e40d64 to your computer and use it in GitHub Desktop.
Save suhlig/c8b8d70d33462a95d2b0307df5e40d64 to your computer and use it in GitHub Desktop.
Install tmux on rhel/centos
# Install tmux on rhel/centos 7
# What do we want?
libeventversion=2.1.11
tmuxversion=3.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL "https://github.com/libevent/libevent/releases/download/release-$libeventversion-stable/libevent-$libeventversion-stable.tar.gz"
tar -xvzf "libevent-$libeventversion-stable.tar.gz"
cd "libevent-$libeventversion-stable"
./configure --prefix=/usr/local
make
sudo make install
cd ..
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -OL "https://github.com/tmux/tmux/releases/download/$tmuxversion/tmux-$tmuxversion.tar.gz"
tar -xvzf "tmux-$tmuxversion.tar.gz"
cd "tmux-$tmuxversion"
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
sudo make install
cd ..
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V
@otasyn
Copy link

otasyn commented May 4, 2020

Thanks from me, too!

Also, I updated the version numbers in the script, and it still worked fine.

libevent version: 2.1.11
tmux version: 3.1

@suhlig
Copy link
Author

suhlig commented May 17, 2020

Thanks @otasyn et al. I updated the script to keep the version numbers on top for easier updates.

@febs
Copy link

febs commented Jul 13, 2020

Thanks for this. You might want to update tmux version to 3.1b (some bugfixes)

@surebee
Copy link

surebee commented Oct 30, 2020

Awesome instructions!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment