CentOS叢集安裝Tmux

來源:互聯網
上載者:User

標籤:

對於Linux的常用者,如果你說你不會tmux,那你就out啦~

 

1. 什麼是Tmux?

先來看看Tmux長什麼樣。

tmux是一個優秀的終端複用軟體,類似GNU Screen,但來自於OpenBSD,採用BSD授權。使用它最直觀的好處就是,通過一個終端登入遠程主機並運行tmux後,在其中可以開啟多個控制台而無需再“浪費”多餘的終端來串連這台遠程主機;當然其功能遠不止於此。(摘自百度百科)

更多關於Tmux的介紹,詳見http://blog.chinaunix.net/uid-26285146-id-3252286.html

 

2. 如何在Ubuntu上安裝Tmux

在Ubuntu上安裝tmux非常簡單,只需要在terminal上輸入一條命令

sudo apt-get install tmux

運行時,只需要在terminal上輸入tmux就可以使用啦~

 

3. 如何在CentOS叢集上安裝Tmux

在CentOS叢集上,我們往往沒有root許可權。所以想安裝Tmux,需要下載源碼編譯。步驟如下:

1) 下載並編譯tmux的依賴庫libevent

* 登入http://libevent.org下載libevent源碼(如libevent-2.0.22-stable.tar.gz)

* 解壓tar包

tar -zxvf libevent-2.0.22-stable.tar.gz

* 進入解壓後的libevent目錄,編譯

cd libevent-2.0.22-stable./configure --prefix=/libevent_pathmakemake install

其中,/libevent_path為自訂的安裝目錄

2) 下載並編譯tmux

* 登入https://github.com/tmux/tmux下載tmux源碼

* 解壓zip包

unzip tmux-master.zip

* 進入tmux-master目錄,編譯(因為libevent沒有安裝在預設路徑,所以編譯tmux時,要通過CFLAGS和LDFLAGS環境變數改變搜尋標頭檔和庫檔案的路徑)

cd tmux-masterCFLAGS="-I/libevent_path/include" LDFLAGS="-L/libevent_path/lib" ./configure --prefix=/tmux_pathmakemake install

* 在.bashrc中添加libevent-2.0.so.5

export D_LIBRARY_PATH=/libevent_path/lib:$LD_LIBRARY_PATH

* 最後更新.bashrc

source .bashrc

3) 輸入tmux命令,大功告成~

 

CentOS叢集安裝Tmux

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.