Skip to content

Instantly share code, notes, and snippets.

@sinewalker
Last active May 20, 2017 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sinewalker/025e2b4c79b8d6ea191058865bcabee6 to your computer and use it in GitHub Desktop.
Save sinewalker/025e2b4c79b8d6ea191058865bcabee6 to your computer and use it in GitHub Desktop.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment