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
  • Star 41 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • 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
@nguyentp
Copy link

Works like a charm! Thanks!

@Sharath-Chandra
Copy link

Perfect!

@artnikbrothers
Copy link

perfect!

@L0rdM0m0
Copy link

Thank you for this!

@RezaSajadian
Copy link

Quite straight forward. Thanks!

@nsukonny
Copy link

Thanks man!

@packetlifter
Copy link

thank you brother.

@abest0
Copy link

abest0 commented Sep 12, 2019

yessir!

@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