1. Procedure for Linux servers in the LAN:
1. Install samba (CentOS Linux ):
Yum install samba system-config-samba-client samba-common
2. Create a www account
/Usr/sbin/groupadd www
/Usr/sbin/useradd-g www
Mkdir-p/data0/knose/
Chmod 777/data0/knose/
Mkdir-p/data0/htdocs/
Chown-R www: www/data0/htdocs/
Chmod 777/data0/htdocs/
Cat/etc/passwd | mksmbpasswd. sh>/etc/samba/smbpasswd
3. Create a samba configuration file
Mv-f/etc/samba/smb. conf/etc/samba/smb. conf. bak
Vi/etc/samba/smb. conf
Enter the following content:
Reference [global]
Server string = Samba Server
Security = user
Encrypt passwords = yes
Smb passwd file =/etc/samba/smbpasswd
[Knose]
Workgroup = root
Netbios name = root
Path =/data0/knose
Browseable = yes
Writeable = yes
[Web]
Workgroup = www
Netbios name = www
Path =/data0/htdocs
Browseable = yes
Writeable = yes
4. Set a password for samba users www and root:
Smbpasswd-a www
Smbpasswd-a root
5. Start samba:
/Sbin/service smb start
2. procedure on a Windows server in the LAN:
1. Access samba on Windows and enter:
\ Xxx. xxx \
2. In Windows, disconnect samba from the shared connection, choose Start> RUN> cmd and press Enter:
Net use */del
3. Map the Linux directory shared by samba to a drive letter of Windows:
Iii. cross-platform C/C ++ code compilation and debugging:
Write and modify cross-platform C/C ++ code in a Windows Editor. Save the code and use Visual Studio in Windows without copying it to other places, in Linux, the g ++, gcc, and gdb programs are compiled and debugged.
Note: executing the ". bat" batch processing script on the samba shared drive will result in a Windows blue screen.