Downloads:
- libevent: http://sourceforge.net/projects/levent/files/latest/download?source=files
- tmux: http://sourceforge.net/projects/tmux/files/latest/download?source=files
Yum Packages:
- gcc
- kernel-devel
- make
- ncurses-devel
Download the latest libevent2 and tmux:
$ sudo su -
$ mkdir ~/downloads && cd ~/downloads
$ curl http://sourceforge.net/projects/levent/files/latest/download?source=files -L -o libevent2.tar.gz -w 'Last URL was: %{url_effective}'
$ curl http://sourceforge.net/projects/tmux/files/latest/download?source=files -L -o tmux.tar.gz -w 'Last URL was: %{url_effective}'
Install dependencies:
$ yum install gcc kernel-devel make ncurses-devel
Compile libevent:
$ cd ~/downloads
$ tar zxvf libevent2.tar.gz
$ cd /libevent-2.x.xx-stable
$ ./configure --prefix=$HOME/local
$ make
$ make install
Compile tmux:
$ cd ~/downloads
$ tar zxvf tmux.tar.gz
$ cd tmux-n.n
$ LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
$ make
$ make install
Download the latest libevent2 and tmux:
$ sudo su - <user_name>
$ mkdir ~/local # local folder for libevent, tmux dependencies, binaries, etc.
$ mkdir ~/downloads && cd ~/downloads
$ curl http://sourceforge.net/projects/levent/files/latest/download?source=files -L -o libevent2.tar.gz -w 'Last URL was: %{url_effective}'
$ curl http://sourceforge.net/projects/tmux/files/latest/download?source=files -L -o tmux.tar.gz -w 'Last URL was: %{url_effective}'
Install dependencies (you will need sudo privileges):
$ sudo yum install gcc kernel-devel make ncurses-devel
Compile libevent:
$ cd ~/downloads
$ tar zxvf libevent2.tar.gz
$ cd /libevent-2.x.xx-stable
$ ./configure --prefix=$HOME/local
$ make
$ make install
Compile tmux:
$ cd ~/downloads
$ tar zxvf tmux.tar.gz
$ cd tmux-n.n
Configure: Add your newly compiled header in ~/local/lib to configuration parameters:
$ LDFLAGS="-L/usr/local/lib -L$HOME/local/lib -Wl,-rpath=/usr/local/lib:$HOME/local/lib" ./configure --prefix=$HOME/local
Makefile: This needs to be altered to include newly created files in ~/usr/local/include:
- open vi with a search for "am_append_6 =":
$ vi +/am__append_6\ = Makefile
- change
am__append_6 = -iquote. -I/usr/local/include
toam__append_6 = -iquote. -I/usr/local/include -I$(prefix)/include
- save and quit
Continue on as normal:
$ make
$ make install
According to the output, the executable has been installed to ~/local/bin:
make[1]: Entering directory `/home/robert/downloads/tmux-1.8'
/bin/mkdir -p '/home/robert/local/bin'
/usr/bin/install -c tmux '/home/robert/local/bin'
/bin/mkdir -p '/home/robert/local/share/man/man1'
/usr/bin/install -c -m 644 tmux.1 '/home/robert/local/share/man/man1'
make[1]: Leaving directory `/home/robert/downloads/tmux-1.8'
In case another version of tmux is already globally installed on the system, you might want to add the following line to your ~/.bashrc, ~/.zshrc, etc:
alias tmux=$HOME/local/bin/tmux
Reload your .bashrc/.zshrc/etc settings:
$ source ~/.bashrc
Make sure you're now pointing to the correct version of tmux:
$ tmux -V
>> tmux 1.n
- In your home folder, edit or create a .tmux.conf file.
- Add the following settings to .tmux.conf:
# Enable mouse support (tested in iTerm)
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mouse-select-window on