linux下FTP的工具和使用以及rpmReadSignature failed錯誤

來源:互聯網
上載者:User

標籤:

  

 

安裝rpm檔案時提示rpmReadSignature failed 錯誤2011-09-23 11:04
現象:
  [[email protected] share]# rpm -ivh syslog-ng-3.1.0-1.rhel5.i386.rpm
  error: syslog-ng-3.1.0-1.rhel5.i386.rpm: rpmReadSignature failed: region trailer: BAD, tag 15872 type 2047 offset 28672 count 4096
  error: syslog-ng-3.1.0-1.rhel5.i386.rpm cannot be installed
   
  【解決方案】
  1、檢查下載使用的安裝包、壓縮包是否完整,否則從正規的鏡像戰點重新下載;
   
  2、一般新手可能是由於用ftp上傳到Linux上時沒有用binary模式造成的。需要在ftp>binary轉變為二進位方式傳輸。

源地址:  http://hi.baidu.com/somken/blog/item/069e62cbdfe19a21f8dc618e.html

 

 

目前為止ftp是一個標準的檔案網路傳輸協議,應用在osi模型的應用程式層,ftp支援兩種傳輸模式,分別為ascii(文本傳輸模式,最大的缺點是會過濾掉不符合格式的資料)和binary(二進位傳輸模式,不會過濾資料而全部接受)模式,每次登入成功時,預設的是ascii模式,可以採用輸入相關的命令來切換到,binary模式!

 首先linux下安裝配置好vsftp的伺服器端,並開啟ftp的服務,可以用netstat -tulnp|grep vsftp查看啟動成功與否

[[email protected] ~]# ftp 192.168.1.192

ftp> help(查看可以使用的命令,其中較為常用的為當然是:上傳、下載、建立、刪除、模式切換....等等  下邊示範介紹)
1、get(下載)

ftp> dir(也可以使用ls來查看要目錄下的文檔)

-rwxrwxrwx 1 ethnicity ethnicity 206666 Mar 15 22:00 222.184.88.146.txt
ftp> binary(切換成binary模式)
200 Switching to Binary mode.
ftp> hash(開啟雜湊,也就是顯示過程)
Hash mark printing on (1024 bytes/hash mark).

ftp> get 222.184.88.146.txt(下載到本地,並顯示過程)
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for 222.184.88.146.txt (206666 bytes).
################################################################################
####################226 File send OK.
ftp: 收到 206666 位元組,用時 0.02秒 10333.30KB/秒。

ftp> bye
221 Goodbye.

C:\>dir(這個就是剛才下載的檔案)

2011/05/08  02:21           206,666 222.184.88.146.txt

2、put(上傳,這裡有個技巧,上傳哪裡的文檔,你可以在那個目錄下ftp登入)

ftp> put install.log.syslog 
local: install.log.syslog remote: install.log.syslog
227 Entering Passive Mode (192,168,1,192,43,203)
150 Ok to send data.
226 File receive OK.
5341 bytes sent in 0.23 seconds (23 Kbytes/s)
ftp> dir(查看,上傳成功)
-rw-r--r--    1 500      500          5341 Mar 15 14:28 install.log.syslog

3、mkdir、rmdir 、rename(目錄的建立、刪除、重新命名)

ftp> mkdir laji(建立的命令)
257 "/home/ethnicity/laji" created
ftp> dir
drwxr-xr-x    2 500      500          4096 Mar 15 14:32 laji

ftp> rmdir laji(刪除的命令)
250 Remove directory operation successful.

ftp> rename wanzi wanle(重新命名的使用)
350 Ready for RNTO.
250 Rename successful.
4、delete、rname(文檔的刪除、重新命名)
ftp> delete web.crt(刪除文檔)
250 Delete operation successful.

ftp> rename install.log.syslog  syslog.conf(檔案的重新命名)
350 Ready for RNTO.
250 Rename successful.

5、status(查看當前的設定)

ftp> status
串連到 192.168.1.192。
類型: ascii;詳細: 開 ;鈴聲: 關
調試: 關 ;雜湊標記列印: 關 。
6、pwd(查看登入後的當前操作路徑)

ftp> pwd
257 "/home/ethnicity"

7、bell(開啟響鈴模式)

ftp> bell
鈴聲模式 開 。

8、help(查看當前模式下可以使用的命令)

 ftp> help

9、debug(顯示操作的詳盡資訊)

ftp> debug
調試 開 。

9、ls、dir(查看目前的目錄下的文檔和目錄,dir顯示資訊較為詳盡)

比如在開啟debug模式下的dir命令

ftp> dir
---> PORT 192,168,1,188,213,253(登入的主機的ip和連接埠)
200 PORT command successful. Consider using PASV.
---> LIST
150 Here comes the directory listing.
-rwxrwxrwx    1 500      500        206666 Mar 15 14:00 222.184.88.146.txt
-rw-r--r--    1 0        0              18 Mar 11 13:27 index.html
drwxr-xr-x    2 500      500          4096 Dec 24 13:43 public_html
ftp: 收到 345 位元組,用時 0.00秒 345.00KB/秒。

10、bye(退出)

ftp> bye
---> QUIT
221 Goodbye.

以上列出的命令在加上功能有類似的,大量操作命令,如下

 mdelete、 mdir、mget、mkdir、mls、mput

這些命令使用十分的頻繁,當然如果想瞭解更多的話,可以結合help並查閱相關的資料,這裡不再贅述!

linux下FTP的工具和使用以及rpmReadSignature failed錯誤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.