sinewalker
3/12/2017 - 10:45 AM

tmux centos/scientific

tmux centos/scientific

Great posibilities if we could have tmux on our servers:

http://www.howardism.org/Technical/Linux/tmux.html

http://tmuxp.readthedocs.io/en/latest/about_tmux.html

http://perlstalker.vuser.org/blog/2012/10/16/emacsclient-and-tmux/

but tmux isn't available in the standard Scientific/CentOS repositories

however it is available in EPEL:

# yum install -y epel-release && yum install -y tmux

(EPEL for SL 6* has tmux 1.6-3, so iTerm2 will NOT integrate with it... but tmux-within-tmux is a Thing... you can integrate iTerm2 with tmux on your Mac at least, and then tmux remote hosts from within [a] local Session[s])

Now... we have shared root (for better or worse), so, to run tmux with per-sysadmin settings:

  • have a .tmux.user file for each person (e.g. .tmux.mlo)
  • have a '/root/t` which wraps tmux similar to how Howard describes, perhaps taking an argument for which tmux settings to load
  • ssh to the host like this: ssh root@host -t /root/t mlo

that will either attach to a running tmux session, or start a new one. You can then set up tailing certain logs, changing to certain directories and connecting to certain databases etc.

I need to do a proof of concept.