Installing tmux

Discussion in 'Systems Administration' started by Kait18, Jul 30, 2014.

  1. Hello! I am planning to install tmux on my dedicated server, but I was wondering, does anyone have any tutorials that aren't too complicated on how to install it on CentOS 6.5 (64bits)? I found this script on a gist a while ago, should I use that? Thanks for reading my thread! :)
     
  2. MikeA

    MikeA Retired Moderator
    Retired Benefactor

  3. jflory7

    jflory7 Retired Moderator
    Retired Benefactor

    Shouldn't be more complicated than installing it with yum!
    Code (Text):
    sudo yum install tmux
     
    • Agree Agree x 1
    • Useful Useful x 1
  4. I haven't tried it yet, but I think i'll go with the yum install method @jflory7 just suggested. Thanks for the reply by the way! :)

    Okay! Thanks for suggesting that. One question though; does tmux have any dependencies? If so, any idea on how to install them? :)

    Thanks for helping guys! I really appreciate it.
     
  5. jflory7

    jflory7 Retired Moderator
    Retired Benefactor

    That's what yum is for – it handles all the dependencies for you. It's literally as simple as typing in the command and letting it install everything. :)
     
    • Informative Informative x 1
  6. Too difficult for me. Anything easier?
     
    • Funny Funny x 1
  7. jflory7

    jflory7 Retired Moderator
    Retired Benefactor

    There's always OS X
     
    • Funny Funny x 2
    • Winner Winner x 1
    • Friendly Friendly x 1
  8. Okay, I'll try using yum later today then. I got to go right now, it's a bit late where I live. Thanks for your help! :)
     
  9. jflory7

    jflory7 Retired Moderator
    Retired Benefactor

    No problem, and best of luck with your server!
     
    • Friendly Friendly x 1
  10. Hi, I just tried with "sudo yum install tmux" a while ago, but I'm getting this:
    [​IMG]
    Any idea why? :) I'm running CentOS 6.5 by the way. Thanks for your help!
     
  11. jflory7

    jflory7 Retired Moderator
    Retired Benefactor

  12. Adding the EPEL repository actually worked! "sudo yum install tmux" works now, thanks! By the way, do you know about any guides on how to use it to run a server? At the moment I've only found this gist. Thanks for all of your help, I can't thank you enough. :)
     
  13. tmux attach - get on tmux.
    ctrl + b + c - create new page
    ctrl + b + n - scroll to next page
    ctrl + b + number of page - go to that page number
    ctrl + b + & - kill current page
     
  14. Hi, sorry for the late reply. Thanks for that list of commands, but I have four simple questions I wanted to ask you if you don't mind. First, how do I make it for tmux to run the server with the start-up script? Also, it's one page per server, or one session per server? Any idea on how to stop the server (should I just run the stop command and kill the current page)? Also, in which directory should I upload the server files? Sorry for asking so many questions! :)
     
  15. Infinite pages per session. You can also split pages up diagonally or horizontally into panes (Screenshot below of panes in a page) To run the MC server simply go as normal, cd to your dir, and sh start.sh.

    [​IMG]
    (this is my test VPS) Top left is HTOP, bottom left is IOTop, top right is a Minecraft server, and bottom right is IPTraf. If you want to fully automate the creation of pages and the MC server, you can send commands to it via bash, google it.
     
  16. @superpeanut911 Okay, thanks for your reply. So, if I were to host a bungeecord server and some spigot servers, should I host them in panes in a single window, or make different windows for each of them? Also, how do I run the minecraft servers? This is what I've done so far:
    Code (Text):
    sudo tmux new -s session
    Ctrl + b + c
    But now, how can I run a server in tmux? Also, thanks for your help! :)
     
  17. Okay, after a bit of researching, I am thinking about trying this:
    Code (Text):
    tmux new-session -d -s Minecraft
    tmux new-window -t Minecraft:1 -n 'Bungeecord' 'java -Xms512M -Xmx1024M -jar /home/Minecraft/Bungeecord/bungeecord.jar'
    tmux new-window -t Minecraft:2 -n 'Lobby' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/Minecraft/Lobby/spigot.jar'
    tmux new-window -t Minecraft:3 -n 'server1' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/Minecraft/server1/spigot.jar'
    tmux new-window -t Minecraft:4 -n 'server2' 'java -Xms512M -Xmx4096M -XX:MaxPermSize=128M -jar /home/Minecraft/server2/spigot.jar'
    Would that be correct in order to run 4 servers? Also, how do I stop the servers? Just by running the 'stop' command in the servers' console, or do I have to run something on tmux as well?
     
  18. @superpeanut911 Can you also run x (for example 24) servers on the same configuration?
    And have them all copy a template directory, and run the server in there.

    Or any other way to easily maintain many game types at once
     
  19. Does anyone know if the method I'm using to try to run 4 servers is correct, and how to stop all of the servers? I posted more details my post above. :)
     
  20. Dead-i

    Wiki Team

    Just wanted to quickly make you aware of some software I used called tmuxinator, which allows you to setup and create pre-configured tmux sessions like that. ;)