The Linux environment is needed in development, so it is developed using shared mode. Implemented through the Samba server.
Environment:
Virtual Machine VirtualBox
Virtual System CentOS 6.6
Native MacOS 192.168.1.102
The virtual machine chooses a bridging mode connection. Use ifconfig to view IP in CentOS to get 192.168.1.107
Both the host and the passenger firewall are turned off and ping each other service iptables status
Reference: http://www.cnblogs.com/mchina/archive/2012/12/18/2816717.html
1. Installing Samba
Yum-y Install Samba Samba-client
2. Configure Samba
Cp/etc/samba/smb.conf.bak/etc/samba/smb.conf #备份配置
Vi/etc/samba/smb.conf
#======================= Global Settings ===================================== workgroup = Workgroup // Define workgroups, the workgroup concept in Windows #-----------------------Standalone Server Options------------------------ security = Share //sharing level, users do not need an account and password to access #============================ share definitions ==============================[ Public] //settings for the individual settings of the shared directory, only for the current shared resources comment = public Stuff //description file for the shared directory, you can define the description information path =/var/ www/html //used to specify shared directory, mandatory option public = yes //Everyone can view, equivalent to guest OK = yes
Service SMB Restart #重启服务
3. Connection test
Mac Finder, go to, connect to server or Command+k
smb://192.168.1.107
VirtualBox CentOS and MacOS Shared folders in a virtual machine