Rapid deployment of samba servers in CentOS

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.