Windows vs. Linux file sharing
1. Use the WINSCP tool to implement file sharing between Windows and virtual machines.
2. Use the Samba service to implement file sharing between Windows and virtual machines.
1. A VMware virtual machine with RHEL6 installed.
2. WINSCP tool.
1.PC Machine one set.
WinSCP is an open-source graphical SFTP client that uses SSH in a Windows environment. The SCP protocol is also supported. Its main function is to copy files securely between local and remote computers.
2. The concept of samba:
Samba is an implementation of the SMB (Server Message Block) protocol, which is primarily used to implement file and print services for Linux systems. Linux users can share resources with Windows users by configuring them to use the Samba server. There are two services that make up Samba, one is SMB and the other is NMB. SMB is the core of Samba boot services, only the SMB service can be started to achieve file sharing, and the NMB service is responsible for parsing, similar to the DNS implementation of the function, NMB can put the Linux system shared workgroup name and its IP corresponding. If the NMB service does not start, it can only access the shared file over IP.
WinSCP Server usage
1. According to the experimental requirements, Windows through the network to log on to Linux for file sharing, so according to the knowledge of the 13th lesson, configure the Windows and Linux network environment, using bridging mode to connect to the network, and then ensure that Windows can ping Linux, while shutting down Linux with Windows Firewall.
2. In the relevant software \winscp514 find the WinSCP software to be used in the experiment. Run the application "WinSCP"; Configured as shown in 3-137.
WinSCP Configuration Interface
3. When the WinSCP first landing, the following window will pop up, select "Yes", as shown in 3-133;
4. Login success, 3-139, the left and right sides represent the Windows and Linux directory, WINSCP can achieve a different file directory between Windows and Linux copy, like a copy between different Windows folders, you can directly drag files.
WinSCP operator Interface
Samba Server Use
5. Install the Samba server; "Mount/dev/cdrom/mnt" uses the command to mount the Linux CD to/mnt
Directory, locate the Samba installation package in the/mnt/packages directory, and use the "RPM–IVH
samba-3.5.10-125.el6.i686.rpm "Install the Samba server.
Samba Server Installation
6. Add the Samba service user win; First use the command "Useradd win" to add the win user and set the win password, and then set the Samba service user win password; 3-141, as shown in
The addition of Samba users
7. Configure Samba services;
Using the VIM editor to open the configuration file, "vim/etc/samba/smb.conf"
/etc/samba/smb.conf File Modification
Hint: Share definitions under each parameter and use method:
8. Restart the Samba service, using the command "/ETC/INIT.D/SMB restart", as shown in 3-143;
Restart Samba Services
9. Log in to the Samba server in Windows, open IE Browser (or Windows Explorer), enter in the Address bar: \\192.168.1.138 (192.168.1.138 is the IP address of the Linux system), 3-144, In the Popup interface figure 3-145 Enter the Samba user information added in step 6th.
Use IE to log into Samba server
Samba User Login
10. Successfully login to Samba server; As shown in 3-146.
Successfully logged into Samba
The Windows Samba Login folder displays
Samba folder display under Linux
When Samba access to Linux is slow, and many directory access failures, 3-147 hints, because Linux prohibits the violation of SELinux behavior. Workaround: Enter "Setenforcepermissive" in the Linux terminal to allow the violation of SELinux, and the system will log the violation information.
Using WinSCP to access Linux files through this section, installing Samba servers and accessing Linux using the Samba service, we can familiarize ourselves with how to install, configure, start, and test Samba services in Linux. Here's a tip, when using samba, sometimes for convenience, you can add the root user after the valid users parameter in the configuration file, namely: valid Users=root, so you can log in to samba using the root user. Root to Samba, you also need to set a samba password for root, using the command: Smbpasswdroot. With root login, the user will gain root privileges on all original Linux systems.
14.Windows and Linux file sharing