源码编译tmux
(1)clone 源代码仓库:
$ git clone https://github.com/tmux/tmux.git
(2) 编译之前先安装libevent,去官网下载tar包:
http://libevent.org
选择需要下载的版本复制链接地址,使用wget下载到本地(图形化的也可以直接下载),如(选择合适的版本,一般选stable即可):
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xzf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable/
$ ./configure && make
$ sudo make install
(3) 编译tmux:
cd tmux/
sh autogen.sh
./configure && make
安装编译过程可能会提示一些错误:
1)aclocal command not found
原因:自动编译工具未安装,安装上即可:
centOS: yum install automake
- configure: error: "curses or ncurses not found"
ubuntu:apt-get install libncurses5-dev
centos: yum install ncurses-devel
(4) 编译成功之后会在tmux下生成一个可执行程序:tmux
./tmux
执行的时候可能会出现找不到库的情况:
./tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
把安装好的libevent库的路径使用软链接到对应的目录:
64位:
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
32位:
ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5
(5)设置环境变量
export PATH=xxx
(6)常用的tmux配置:
[root@c936a812-4ccb-491f-8eee-1dd4f670494b ~]# cat .tmux.conf
set -g prefix C-x
unbind C-b
setw -g mode-keys vi
#允许用鼠标切换窗口/调节分屏大小
setw -g mouse-resize-pane on
setw -g mouse-select-pane on
setw -g mouse-select-window on
setw -g mode-mouse on set-option -g history-limit 5000 bind -t vi-copy 'v' begin-selection # Begin selection in copy mode.
bind -t vi-copy 'C-v' rectangle-toggle # Begin selection in copy mode.
bind -t vi-copy 'y' copy-selection # Yank selection in copy mode. bind Left swap-window -t -1
bind Right swap-window -t +1 bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}" bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10 bind ^u swapp -U
bind ^d swapp -D bind ^a last
bind ^q killp set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black # Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum' # Plugin configure
set -g @continuum-restore 'on' run '~/.tmux/plugins/tpm/tpm'
You have new mail in /var/spool/mail/root
其中需要用到插件管理,需要先安装插件管理器:
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
源码编译tmux的更多相关文章
- debian下如何源码安装tmux
一.源码安装ncurses库 1.1 获取源码 wget https://invisible-island.net/datafiles/release/ncurses.tar.gz tar xvf n ...
- Android 5.0源码编译问题
如果是自己通过repo和git直接从google官网上download的源码,请忽略这个问题,但是由于google在国内被限制登录,通过这一种方法不是每个人都能download下来源码,通常的做法就是 ...
- Android stdio Apktool源码编译
Android Apktool源码编译 标签(空格分隔): Android Apktool 源码编译 需求 习惯NetBeans调试smali需要用Apktool反编译apk,需要用-d的参数才能生成 ...
- SSH/SSL 源码编译安装简易操作说明
环境:CentOS 6.7 安全加固需求,由于某盟扫描系统主机有SSL系列漏洞,客户要求必须修复: 解决方案:将SSH/SSL升级到最新版本,删除SSL旧版本(实测不删除旧版本某盟扫描无法通过). 当 ...
- Hadoop源码编译过程
一. 为什么要编译Hadoop源码 Hadoop是使用Java语言开发的,但是有一些需求和操作并不适合使用java,所以就引入了本地库(Native Libraries)的概念,通 ...
- World Wind .NET源码编译问题处理
World Wind .NET源码编译问题处理 下载了World_Wind_1.4.0_Source源码(http://worldwindcentral.com/wiki/NASA_World_W ...
- 源码编译安装 MySQL 5.5.x 实践
1.安装cmakeMySQL从5.5版本开始,通过./configure进行编译配置方式已经被取消,取而代之的是cmake工具.因此,我们首先要在系统中源码编译安装cmake工具. # wget ht ...
- Linux 安装node.js ---- 源码编译的方式
一 : 普通用户: 安装前准备环境: 1.检查Linux 版本 命令: cat /etc/redhat-release 2.检查 gcc.gcc-c++ 是否安装过 命令: rpm -q gcc rp ...
- 烂泥:mysql5.5数据库cmake源码编译安装
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 以前也写过一篇有关mysql5.0源码编译的文章,该文章为<烂泥:mysql5.0数据库源码编译安装>.但是MySQL自5.5版本以后,就开 ...
随机推荐
- Python3.x:BeautifulSoup()解决中文乱码问题
Python3.x:BeautifulSoup()解决中文乱码问题 问题: BeautifulSoup获取网页内容,中文显示乱码: 解决方案: 遇到情况也是比较奇葩,利用chardet获取网页编码,然 ...
- 20135320赵瀚青LINUX内核分析第三周学习笔记
赵瀚青原创作品转载请注明出处<Linux内核分析>MOOC课程http://mooc.study.163.com/course/USTC-1000029000 概述 本周是学习的主要是构造 ...
- MR案例:定制Partitioner
可以继承基类Partitioner,也可以继承默认的HashPartitioner类,覆写其中的 getPartition() 方法实现自己的分区. 需求:本例是对上一个实例的改写,需求不变 pack ...
- Spring Cloud OAuth2(二) 扩展登陆方式:账户密码登陆、 手机验证码登陆、 二维码扫码登陆
概要 基于上文讲解的spring cloud 授权服务的搭建,本文扩展了spring security 的登陆方式,增加手机验证码登陆.二维码登陆. 主要实现方式为使用自定义filter. Authe ...
- heartbeat 编译安装配置
一.heartbeat介绍 heartbeat是HA高可用集群的一个重要组件,heartbeat实现了资源转移和心跳信息传递.它的常用组合方式为heartbeat v1,heartbeat v2+cr ...
- 远程线程注入shellcode笔记
#include "stdafx.h" #include <windows.h> #include <stdio.h> char shellcode[] = ...
- Redis可以做哪些事儿?
Redis可以作为数据库,提供高速缓存,消息队列等功能,这里介绍Redis可以做的其中两件事: 1.提供缓存功能,作为缓存服务器; 2.轻量级的消息队列(MQ)进行使用. /// <summar ...
- 高质量的C++博客
陈硕 :http://blog.csdn.net/Solstice 孟岩: http://blog.csdn.net/myan
- jquery阻止冒泡和阻止默认事件
event.stopPropagation(); event.preventDefault(); http://www.cnblogs.com/qixuejia/archive/2013/10/10/ ...
- Android6.0------权限申请管理(单个权限和多个权限申请)
Android开发时,到6.0系统上之后,有的权限就得申请才能用了. Android将权限分为正常权限 和 危险权限 Android系统权限分为几个保护级别.需要了解的两个最重要保护级别是 正常权限 ...