一、需要用到wget指令,先安装wget指令:
curl -O http://ftp.gnu.org/gnu/wget/wget-1.13.4.tar.gz
tar -xzvf wget-1.13.4.tar.gz
cd wget-1.13.4
./configure --with-ssl=openssl
make
sudo make install
要说的是注意这句话,很多 安装教程中都没写这个,结果会到这./configure的时候产
configure: error: --with-ssl was given, but GNUTLS is not available.
The reason for this is that GNUTLS isn’t included with Mac OS X, but the equally usable library OpenSSL is available. 这个是原因
二、安装item2iterm2是一个与terminal一样的指令窗口item2 下载地址,http://iterm2.com/downloads.html,下载后解压缩就能运行
三、安装Homebrewruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
四 、 使用brew 安装lrzsz(就是sz、rz指令)sudo brew install lrzsz如果出现如下错误:Cowardly refusing to `sudo brew install`?则直接执行:brew install lrzsz这是因为当前用于已经拥有brew指令的权限。
安装完成后检查 ls -alh /usr/local/bin/sz 是否存在
如果出现ls: /usr/local/bin/sz: No such file or directory 执行如下命令
xxx-air:bin xxx$ ln -s /usr/local/bin/lrz /usr/local/bin/rz
xxx-air:bin xxx$ ln -s /usr/local/bin/lsz /usr/local/bin/sz
五、下载iterm2-zmodemiterm2-zmodem是rz、sz传输数据的一种协议。
xxx-air:bin xxx$ pwd
/usr/local/binxxx-air:bin xxx$ sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-send-zmodem.sh
xxx-air:bin xxx$ sudo wget https://raw.github.com/mmastrac/iterm2-zmodem/master/iterm2-recv-zmodem.sh授权:xxx-air:~ xxx$sudo chmod 777 /usr/local/bin/iterm2-*
六、运行下载的 iterm 添加trigger打开iterm2 --> 同时按 command和,键(偏好设置) --> Profiles --> Default --> Advanced --> Triggers的Edit按钮
Regular expression Action Parameters \*\*B0100 Run Silent Coprocess /usr/local/bin/iterm2-send-zmodem.sh \*\*B00000000000000 Run Silent Coprocess /usr/local/bin/iterm2-recv-zmodem.sh