To facilitate the upgrade of the deployed application, you can configure samba in linux to implement the application directory of windows Shared linux, which simplifies and speeds up application upgrade and deployment in the future.
[Root @ tomcat ~] # Uname-
Linux tomcat 2.6.9-89. ELsmp #1 SMP Mon Jun 22 12:32:43 EDT 2009 i686 i686 i386 GNU/Linux
[Root @ tomcat ~] # Cat/etc/issue
CentOS release 4.8 (Final)
Kernel \ r on an \ m
[Root @ tomcat ~] # Rpm-qa | grep sam
Samba-3.0.33-0.17.el4
Samba-client-3.0.33-0.17.el4
System-config-samba-1.2.21-1.el4.1
Samba-common-3.0.33-0.17.el4
[Root @ tomcat ~] # Find/-name smb. conf
/Etc/samba/smb. conf
The configuration file to be modified is/etc/samba/smb. conf. Add the following lines:
[Tomcat]; just give the name you want
Path =/opt/tomcat; shared directory
Valid users = tomcat; shared Login User
Public = no;
Writable = yes; whether to allow write
Printable = no;
Create mask = 0765; default permission for creating a file directory
Www.2cto.com
After setting, you can use testparm to verify the configuration file.
[Root @ tomcat ~] # Testparm
Load smb config files from/etc/samba/smb. conf
Processing section "[printers]"
Processing section "[tomcat]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[Global]
Workgroup = MYGROUP
Server string = Samba Server Version % v
Passdb backend = tdbsam
Idmap uid = 16777216-33554431
Idmap gid = 16777216-33554431
Cups options = raw
.....
.....
Set the access user and password
[Root @ tomcat ~] # Smbpasswd tomcat
Enter the password you want to set. Note that this user password is used during win access, and the user may already exist. For example, here I am using the application user.
Disable Firewall
[Root @ tomcat ~] # Service iptables stop
Disable Firewall
[Root @ tomcat ~] # Chkconfig iptables off
Start SMB manually
[Root @ tomcat ~] # Service smb start
Start the SMB service:
Start NMB service:
Configure SMB auto-start
[Root @ tomcat ~] # Chkconfig smb on
OK. You can enter \ ip on the win client to access the shared directory provided by linux.
-The End-
From Gtlions