Skip to content

Instantly share code, notes, and snippets.

@scottames
Forked from ekiara/how_to_install_tmux_on_centos
Last active December 11, 2015 06:48
Show Gist options
  • Save scottames/3f05aafc3a3314e8e8d0 to your computer and use it in GitHub Desktop.
Save scottames/3f05aafc3a3314e8e8d0 to your computer and use it in GitHub Desktop.
HOW TO: Install tmux on Centos release 6.5
## Install tmux on Centos release 6.x
### http://superuser.com/questions/738829/attempting-to-install-tmux-on-centos-6-4-or-centos-6-5-fails-with-error-evbuff
#
LIBEVENT_URL="https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz"
TMUX_URL="https://github.com/tmux/tmux/archive/2.1.tar.gz"
## MAKE SURE YOU HAVE BUILD TOOLS/COMPILERS TO BUILD STUFF FROM SOURCES
yum -y groupinstall "Development Tools"
## INSTALL NCURSES DEVEL
yum -y install ncurses-devel
## create a workspace
mkdir tmux_install
cd tmux_install
## DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
# wget $LIBEVENT_URL -O libevent.tar.gz
curl -L $LIBEVENT_URL -o libevent.tar.gz
mkdir libevent
tar -xvzf libevent.tar.gz -C libevent --strip-components 1
cd libevent
./configure
make
make install
cd ..
## DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
# wget $TMUX_URL -O tmux.tar.gz
curl -L $TMUX_URL -o tmux.tar.gz
mkdir tmux
tar -xvzf tmux.tar.gz -C tmux --strip-components 1
cd tmux
sh autogen.sh
./configure
make
make install
cd ../..
## Cleanup
rm -Rf tmux_install
## Add to bashrc or zshrc exports
if ! $(echo $LD_LIBRARY_PATH | grep -q /usr/local/lib); then
if [[ -d /usr/local/lib ]]; then
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment