virtualbox虛擬機器中的centos與macos共用資料夾

來源:互聯網
上載者:User

標籤:

開發中需要用到linux環境,所以使用共用模式開發。通過samba伺服器來實現。

環境:

虛擬機器 virtualbox

虛擬系統 centos 6.6  

本機 macos  192.168.1.102

虛擬機器選擇橋接模式串連。在centos中使用ifconfig查看IP 得到192.168.1.107

主機和客機防火牆都關掉並且相互ping通 service iptables status

參考:http://www.cnblogs.com/mchina/archive/2012/12/18/2816717.html

1.安裝samba

yum -y install samba samba-client

2.配置samba

cp /etc/samba/smb.conf.bak /etc/samba/smb.conf #備份配置

vi /etc/samba/smb.conf

#======================= Global Settings =====================================        workgroup = WORKGROUP       //定義工作群組,也就是windows中的工作群組概念# ----------------------- Standalone Server Options ------------------------        security = share                 //共用層級,使用者不需要帳號和密碼即可訪問#============================ Share Definitions ==============================[public]                                                  //設定針對的是共用目錄個別的設定,只對當前的共用資源起作用        comment = Public Stuff                            //對共用目錄的說明檔案,自己可以定義說明資訊        path = /var/www/html                                    //用來指定共用的目錄,必選項        public = yes                                      //所有人可查看,等效於guest ok = yes

service smb restart #重啟服務

3.串連測試

 mac下 finder,前往,串連伺服器  或者是 command+K

smb://192.168.1.107

 

virtualbox虛擬機器中的centos與macos共用資料夾

相關文章

聯繫我們

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