ubuntu12.04 Open samba,windows Direct deployment

Source: Internet
Author: User

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

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.