安裝命令:
yum install lrzsz
從服務端發送文件到客戶端:
sz filename
從客戶端上傳文件到服務端:
rz
在彈出的框中選擇文件,上傳文件的用戶和組是當前登錄的用戶
SecureCRT設置默認路徑:
Options -> Session Options -> Terminal -> Xmodem/Zmodem ->Directories
Xshell設置默認路徑:
右鍵會話 -> 屬性 -> ZMODEM -> 接收文件夾
測試:
開發板接收文件:
1. 進入開發板要接收文件的目錄
2. 開發板執行命令# rz
3. 在minicom下,按住Ctrl+A鍵不放,按下Z鍵
4. 按下S鍵選擇發送文件
5. 選擇zmodem,用回車鍵確認
6. 用空格選擇主機要發送的文件,用回車鍵確認
7. 傳輸完成後按任意鍵返回
開發板發送文件:
1. 進入開發板要發送文件的目錄
2. 進入主機要接收文件的目錄
2. 主機執行命令# rz
3. 開發板執行命令# sz filename
PS:同事和我說SecureCRT可以方便的上傳下載文件,而Xshell沒有。我上網一查原來用的是同一個sz/rz工具,Xshell下沒有菜單選擇要輸命令。
以上rz 和 sz就可以用了
1.1備份CentOS-Base.repo
cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
1.2替換源
用vi打開CentOS-Base.repo,並將內容清空,然後將下面的內容複製進去,並保存。
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.sohu.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://mirrors.sohu.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.sohu.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.sohu.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-5
1.3更新一下。
yum -y update