天天看點

網絡主機VS本地資源

網絡主機VS本地資源

主機與本地資源如何共享和上傳下載下傳,應該是主機管理工作中一件十分常見的事,我以前分享過sshell做linux與本地互傳工具和遠端桌面的進階選項進行windows主機和本地資源的上傳于下載下傳,但是對于大檔案,這些工具就顯得吃力或無能為力了,這裡分享一下ftp和samba的一些認識,來解決這個問題。

1.windows下ftp架設

下圖是建立ftp連接配接後,ftp-w001便作為iis的一個特殊站點存在

<a href="http://blog.51cto.com/attachment/201209/213953637.png" target="_blank"></a>

,這時我們一般不使用證書通道,要取消證書選項:

我們單擊ftp ssl setting,對于證書政策我們選擇“allow ssl connection”,因為預設是“require ssl connnections”

<a href="http://blog.51cto.com/attachment/201209/214108388.png" target="_blank"></a>

然後授權使用者,我們可以單擊ftp authorization rules進行授權,單擊右邊的“add allow rule”添加使用者即可

<a href="http://blog.51cto.com/attachment/201209/214018279.png" target="_blank"></a>

為了進一步保護ftp的安全,我們最好進行ip授權,我們單擊ftp ipv4 address and domain restrictions,單擊右邊的“add allow entry”,我們這裡講我們辦公室的ip添加進去

<a href="http://blog.51cto.com/attachment/201209/214129731.png" target="_blank"></a>

然後我們還需要設定一個規則,規則就是将我們沒添加的ip都設為禁止,單擊右邊的“edit feature settings”,選擇deny即可

<a href="http://blog.51cto.com/attachment/201209/214255197.png" target="_blank"></a>

這樣我們基本就建立一個安全的ftp通路環境。

Samba是一個資源共享軟體,在windows和linux下都可以架設,這裡介紹一下linux它的架設。

Yum install samba*

<a href="http://blog.51cto.com/attachment/201209/214322263.png" target="_blank"></a>

配置samba

<a href="http://blog.51cto.com/attachment/201209/214350506.png" target="_blank"></a>

複制home的選項,建立一個web的目錄,重新開機服務

<a href="http://blog.51cto.com/attachment/201209/214411170.png" target="_blank"></a>

<a href="http://blog.51cto.com/attachment/201209/214459752.png" target="_blank"></a>

建立一個smb使用者

<a href="http://blog.51cto.com/attachment/201209/214432663.png" target="_blank"></a>

開始- 》運作-》\\192.168.211.128\web

<a href="http://blog.51cto.com/attachment/201209/214531999.png" target="_blank"></a>

<a href="http://blog.51cto.com/attachment/201209/214546609.png" target="_blank"></a>

<a href="http://blog.51cto.com/attachment/201209/214606183.png" target="_blank"></a>

也建立磁盤映射,作為windows的一個磁盤這樣更友善,計算機-&gt;映射網絡驅動器 進行添加

<a href="http://blog.51cto.com/attachment/201209/214631887.png" target="_blank"></a>

<a href="http://blog.51cto.com/attachment/201209/214657933.png" target="_blank"></a>

确定即可創立一個映射磁盤

<a href="http://blog.51cto.com/attachment/201209/214748597.png" target="_blank"></a>

我們知道apache使用apache使用者,我們最好讓映射磁盤也使用apache使用者,這樣可以保證windows下建立的檔案可以直接通路。

<a href="http://blog.51cto.com/attachment/201209/214819725.png" target="_blank"></a>

Net usr /delete *   //删除磁盤映射

<a href="http://blog.51cto.com/attachment/201209/214835587.png" target="_blank"></a>

建立新的使用者,我們使用新的apache使用者登入

<a href="http://blog.51cto.com/attachment/201209/214910595.png" target="_blank"></a>

建立檔案可以看到是apache使用者

<a href="http://blog.51cto.com/attachment/201209/214936213.png" target="_blank"></a>

這樣就實作了windows和linux的同步。

3、linux下ftp的建立可以參照&lt;網絡任我行&gt;,的牛人部落格。

<b>本文轉自zsaisai 51CTO部落格,原文連結:http://blog.51cto.com/3402313/988050</b>