Skip to content

Instantly share code, notes, and snippets.

@edderrd
Last active August 29, 2015 14:07
Show Gist options
  • Save edderrd/7451da41d049460f291d to your computer and use it in GitHub Desktop.
Save edderrd/7451da41d049460f291d to your computer and use it in GitHub Desktop.
#!/bin/bash
# vvv execute it directly vvv
# wget -O - https://gist.githubusercontent.com/edderrd/7451da41d049460f291d/raw/7360ed286a77ffafed43c4c3b829dbead72d940d/installtmux.sh | bash
wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
[ -e tmux-1.8.tar.gz -a -e libevent-2.0.21-stable.tar.gz ] || {
echo "ERROR: Archive not found"
exit 1
}
tar zxvf tmux-1.8.tar.gz
tar zxvf libevent-2.0.21-stable.tar.gz
yum install gcc kernel-devel make ncurses-devel -y
# cd to libevent2 src
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make && make install
# cd to tmux src
cd ../tmux-1.8
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make && make install
cd ~/
export PATH=$PATH:/usr/local/bin
rm -rf tmux-1.8 libevent-2.0.21-stable tmux-1.8.tar.gz libevent-2.0.21-stable.tar.gz
echo ""
echo "------------------"
echo "Installed tmux 1.8"
echo "------------------"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment