1.ubuntu 12.04 Installing Samba
Input Apt-get Install samba smbclient Smbfs, Samba is installed automatically, and dependency packs are installed
2. Configure Samba
Last added in/etc/samba/smb.conf
[Share]
Path=/home/tomcat/apache-tomcat/webapps
Public=yes
Valid Users=tomcat
Available=yes
Browseable=yes
Writeable=yes
Path is a shared directory
Valid users are user names that are required to be entered through Windows access
To create a new user:
sudo smbpasswd-a Usersamba
sudo vim/etc/samba/smbusers
Add the following line to the newly created file and save the code:
Usersamba= "Usersamba"
If you need to change the Polly Network access password in the future, use this command to change
Code:
sudo smbpasswd-a Usersamba
Delete the network user's account command to change the above-A to-X
If you already have a user, you have to set the password here, the password that Samba uses, and the user's system login is two different things, using sudo smbpasswd-a tomcat to modify the Tomcat password
After configuration, ubuntu12.04 server does not restart, some of the internet said to use SUDO/ETC/INIT.D/SMBD restart reboot
3. Catalog Mapping
Open Network Places in Windows, \\ubuntu IP, you can see the/etc/samba/smb.conf configured in the [Share] as a shared folder appear, before entering the password
On the share right, click on the mapped network drive, select the letter, check the login to reconnect, My computer appears in the corresponding letter.
4. Establish a deployment batch
To deploy the project, you can create a bat file, as follows, Y: for the mapped disk character:
rd/s/q Y:\ABC
xcopy D:\apache-tomcat\webapps\abc y:\abc\/e
RD deletes the corresponding folder ABC
xcopy copy all content in Windows tomcat under ABC folder in the Ubuntu deployment folder under ABC