Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make
sudo make install
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.9a.tar.gz
tar -xvzf tmux-1.9a.tar.gz
cd tmux-1.9a
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
@johnhunt

This comment has been minimized.

Copy link

@johnhunt johnhunt commented Aug 10, 2015

Thank you 👍 Saves me having to install another repo just to get tmux.

@mr-daydream

This comment has been minimized.

Copy link

@mr-daydream mr-daydream commented Sep 1, 2015

This worked great for me on CentOS 6.7. Thanks!

@caipre

This comment has been minimized.

Copy link

@caipre caipre commented Sep 9, 2015

tmux 2.0 released earlier this year. This gist still works, just use this url to download: https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz

@pebcac

This comment has been minimized.

Copy link

@pebcac pebcac commented Sep 27, 2015

Following up on the comment from Caipre, here are the 3 changes to your "DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL" section to use tmux 2.0

curl -OL http://downloads.sourceforge.net/tmux/tmux-2.0.tar.gz
tar -xvzf tmux-2.0.tar.gz
cd tmux-2.0

Thanks again for the nice script!

@ckoparkar

This comment has been minimized.

Copy link

@ckoparkar ckoparkar commented Sep 28, 2015

Very helpful script. But yum -y install ... would be better? Prevents the yes/no prompt.

@ghost974

This comment has been minimized.

Copy link

@ghost974 ghost974 commented Oct 6, 2015

FWIW, using the sourceforce tar.gz didn't worked for me, I had to use the github link. Didn't investigate why...

@nickleefly

This comment has been minimized.

Copy link

@nickleefly nickleefly commented Oct 8, 2015

works, thanks

@pranavps

This comment has been minimized.

Copy link

@pranavps pranavps commented Oct 8, 2015

Great! works nicely.

@veve90

This comment has been minimized.

Copy link

@veve90 veve90 commented Oct 20, 2015

worked for me for Centos 6.7

@phub1

This comment has been minimized.

Copy link

@phub1 phub1 commented Nov 4, 2015

Worked for me on Centos 6.7! Thank you!

Still works after replaced with the latest version of libevent and tmux:
wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz
wget https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz

@Valloric

This comment has been minimized.

Copy link

@Valloric Valloric commented Nov 12, 2015

Works with tmux 2.1 on RHEL 6.6 (just use 2.1 tmux source code).

@beigeforce

This comment has been minimized.

Copy link

@beigeforce beigeforce commented Nov 23, 2015

Thanks! Worked for me using CentOS 6.7 and tmux 2.1, and libevent-2.0.22 (see phub1's comment above)

@anujsethi

This comment has been minimized.

Copy link

@anujsethi anujsethi commented Jan 15, 2016

Wonderful! worked like a charm, thanks a ton :)

@yang-wei

This comment has been minimized.

Copy link

@yang-wei yang-wei commented Jan 23, 2016

work for CentOS 7.0 too =)

@appleboy

This comment has been minimized.

Copy link

@appleboy appleboy commented Jan 29, 2016

Work for CentOS 6.7

Thanks.

@StrangeBubble

This comment has been minimized.

Copy link

@StrangeBubble StrangeBubble commented Feb 24, 2016

Thank you ! It works fine on CentOS release 6.7 👍

@cygnes82517

This comment has been minimized.

Copy link

@cygnes82517 cygnes82517 commented Feb 27, 2016

not working for me, i get an error when running LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local

configure: error: "curses not found"

I Also can't run make and i get -bash: Make: command not found

any ideas ?

@keke1123

This comment has been minimized.

Copy link

@keke1123 keke1123 commented Mar 7, 2016

It works fine on RHEL 6.5. Thanks.

@ctash

This comment has been minimized.

@relaxdiego

This comment has been minimized.

Copy link

@relaxdiego relaxdiego commented Apr 12, 2016

The general steps worked for me on Centos 7.1 using tmux 2.2

@infotek

This comment has been minimized.

Copy link

@infotek infotek commented Jun 14, 2016

updated to tmux-2.2 and libevent-2.0.22

current as of 20160614

yum install gcc kernel-devel make ncurses-devel
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
make
make install
cd ..
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar -xf tmux-2.2.tar.gz
cd tmux-2.2
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
make install

@etcnix

This comment has been minimized.

Copy link

@etcnix etcnix commented Jul 13, 2016

Thanks a lot, guys!
It works fine on Oracle Linux Server release 6.8 with tmux-2.2.

@docertabum

This comment has been minimized.

Copy link

@docertabum docertabum commented Sep 20, 2016

Thanks Rothgar&Infotek, nicely installed on CentOS 6.8

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Oct 5, 2016

Thanks for this script. Saves me the hassle of setting up tmux on each new dev VM that I get to work on.

@kenichi-shibata

This comment has been minimized.

Copy link

@kenichi-shibata kenichi-shibata commented Oct 13, 2016

for the incredibly lazy people

curl https://gist.githubusercontent.com/rothgar/cecfbd74597cc35a6018/raw/1f96ddcae45419788b2076d965851e072c3f201c/install-tmux | bash
@agargiulo

This comment has been minimized.

Copy link

@agargiulo agargiulo commented Nov 15, 2016

I tried to follow the updated instructions here and it's not working for me, I get the same output from make when I set the LDFLAGS and when I don't. This is for both tmux 2.2 and 2.2 (with the version of libevent specified above). The only difference was that I had PREFIX=${HOME} instead of PREFIX=/usr/local/

@agargiulo

This comment has been minimized.

Copy link

@agargiulo agargiulo commented Nov 15, 2016

[12:21:54] % make
depbase=`echo control.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	gcc -DPACKAGE_NAME=\"tmux\" -DPACKAGE_TARNAME=\"tmux\" -DPACKAGE_VERSION=\"2.4\" -DPACKAGE_STRING=\"tmux\ 2.4\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"tmux\" -DVERSION=\"2.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_PATHS_H=1 -DHAVE_PTY_H=1 -DHAVE_STDINT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_TERM_H=1 -DHAVE_DIRFD=1 -DHAVE_FLOCK=1 -DHAVE_PRCTL=1 -DHAVE_SYSCONF=1 -DHAVE_CFMAKERAW=1 -DHAVE_NCURSES_H=1 -DHAVE_B64_NTOP=1 -DHAVE_FORKPTY=1 -DHAVE_DAEMON=1 -DHAVE_SETENV=1 -DHAVE_ASPRINTF=1 -DHAVE_STRCASESTR=1 -DHAVE_STRSEP=1 -DHAVE_CFMAKERAW=1 -DHAVE_DECL_OPTARG=1 -DHAVE_DECL_OPTIND=1 -DHAVE_DECL_OPTRESET=0 -DHAVE_BSD_TYPES=1 -DHAVE___PROGNAME=1 -DHAVE_PROGRAM_INVOCATION_SHORT_NAME=1 -DHAVE_PR_SET_NAME=1 -DHAVE_PROC_PID=1  -I.  -DTMUX_CONF="\"/etc/tmux.conf\"" -DDEBUG -iquote.     -D_GNU_SOURCE -std=gnu99 -O2 -g -Wno-long-long -Wall -W -Wformat=2 -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -Wundef -Wbad-function-cast -Winline -Wcast-align -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes     -MT control.o -MD -MP -MF $depbase.Tpo -c -o control.o control.c &&\
	mv -f $depbase.Tpo $depbase.Po
control.c: In function ‘control_callback’:
control.c:80: warning: implicit declaration of function ‘evbuffer_readln’
control.c:80: error: ‘EVBUFFER_EOL_LF’ undeclared (first use in this function)
control.c:80: error: (Each undeclared identifier is reported only once
control.c:80: error: for each function it appears in.)
make: *** [control.o] Error 1
@huangcong12

This comment has been minimized.

Copy link

@huangcong12 huangcong12 commented May 25, 2017

OH , you are a good man ,Keisuke Emperor.

@ablueday

This comment has been minimized.

Copy link

@ablueday ablueday commented Jun 20, 2017

thinks!

@mrThe

This comment has been minimized.

Copy link

@mrThe mrThe commented Jan 29, 2021

Update for latest (2021) version:

# Install tmux on Centos release 6.5

# install deps
yum install gcc kernel-devel make ncurses-devel

# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make
sudo make install

# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
curl -OL https://github.com/tmux/tmux/releases/download/3.1c/tmux-3.1c.tar.gz # https://github.com/tmux/tmux/releases
tar -xvzf tmux-1.9a.tar.gz
cd tmux-1.9a
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